Friday, April 15, 2005

Network Emulation: Multiple Network Stacks in One Kernel

While looking into the increasingly popular virtual machine technology, I realized my previous work on network emulation could be categorized into this broad area.

To be exact, "pure" machine virtualization refers to allowing for multiple complete OSes to run top of a middle layer (always called Virtual Machine Manager VMM). Systems falling into this class are VMWare, Microsoft Virtual PC, and User Mode Linux, among others.

But in the domain of network emulation/simulation, we don't really need to virtualize everything a general purpose OS will use. Instead, we may just focus on the network protocol stack in the kernel, and protocol instances.

IMUNES is such a multi-net-stack emulator. Based on a FreeBSD kernel, IMUNES adds a vnet kernel structure to maintain global and static symbols used by the network stack code for each virtual node of the underlying cloned stack. So within each virtual node, a process (for example, a routing daemon) will only see emulated interfaces, routing tables, etc, previously configured for the virtual node. The way to bind a process to a virtual node is done by modifying process control block of the kernel.

The creation of a virtual topology using multiple virtual nodes within a kernel is enabled by the netgraph framework in the FreeBSD kernel. Another way to build virtual links is to use virtual network interfaces. In both cases, packets are handed over between virtual nodes only by reference (the socket buffer sk_buf).

In IMUNES, queueing and traffic shaping are provided by a shaper called ng_pipe, a special netgraph node. Emulated network conditions include delay, bandwidth, and bit-error-rate.

As you may have already figured out, this approach performs much better than pure virtual machine based network emulation and user-space based virtual node in terms of supporting long route path with high throughput. The downside is apparently the heavy modification made to the FreeBSD kernel.

To dig further, read the IMUNES USENIX paper.

A very good summary of software tools for networking is here (IEEE COMSOC).

My outdated network emulation page @MSU has a list of emulators. I really need to update it.....

0 Comments:

Post a Comment

<< Home