ModelNet is a network emulation environment that enables experimentation with distributed systems on arbitrary network topologies with realistic propagation delays, bandwidths, drop rates, and queuing. In contrast to other network emulation platforms such as EmuLab or DETER, ModelNet runs entirely on low-cost commodity hardware and operating systems, which allows an investigator to setup their very own ModelNet environment within their research lab. In addition, ModelNet can easily scale to run applications on thousands of virtual end-hosts, which is beyond what is currently possible with Emulab or DETER.
Briefly, ModelNet's system architecture consists of Emulator machines that are responsible for emulating a specified network topology and virtual nodes that run applications on end-hosts within the emulated topology. An emulator runs as a FreeBSD kernel module. Virtual nodes run on Linux machines. More details about ModelNet's design and implementation can be found in Scalability and Accuracy in a Large-Scale Network Emulator published at OSDI '02.
The remainder of this page offers a step-by-step guide to ModelNet installation and configuration. For a high-level introduction to ModelNet, please see the primary ModelNet documentation.
Network emulation is handled by a FreeBSD kernel module running on at least one FreeBSD machine. For the purposes of easy explanation, we describe the installation and configuration process for one emulator machine, but the procedure generalizes to arbitrarily many emulator machines.
To install and setup a FreeBSD ModelNet emulator, follow these steps:
Next, run: cd /sys/i386/conf/
Add options HZ=10000 to the "GENERIC" file. Save the file and run: config GENERIC
Run: cd ../compile/GENERIC
Run: make ; make install
When the compilation and installation finish, reboot the machine.
You can check that kern.clockrate is now 10000 HZ by running sysctl kern.clockrate
You can verify that the emulator module (modelnet.ko) is loaded by running kldstat.
ModelNet virtual nodes use the 10.0.0.0/8 address space, so it's necessary to configure the emulator machine to route packets on the 10.0.0.0/8 network to the ModelNet virtual node host(s).
The first step is to configure the firewall.
00100 pipe 1 ip from any to 10.0.0.0/8 in
00200 pipe 1 udp from any to me dst-port 5347
00300 allow ip from any to any
65535 deny ip from any to any
You'll need to create topology files (the .model and .route files) for whatever virtual network you want to emulate. To load them into the ModelNet kernel module, execute:
modelload foo.model foo.route
(Replace foo with the name of your topology in both places, of course.)
ModelNet virtual nodes are simply end-hosts scattered throughout the virtual topology. These end-hosts may physically run on one (or more) Linux machine(s). Applications run at virtual nodes simply by specifying the desired end-host by its IP address using the LD_PRELOAD environment variable. For example, if you wish to run wget on the virtual host 10.0.0.1, simply run:
LD_PRELOAD=/usr/local/lib/libipaddr.so SRCIP=10.0.0.1 wget URL.
The first step to configure the virtual node machine(s) is to install the dependencies.
As root, run apt-get install libboost-graph-dev libxml-simple-perl libxerces-c2-dev libssl-dev
Also, follow the instructions above to install the perl Heap and Graph libraries.
Download the patched ModelNet source code. Run ./configure ; cd src ; make ; make install.
The best way to test the deployment is to run applications on a small topology. See the ModelNet documentation to instructions on setting up a small topology.
For additional ModelNet setup documentation, see: