This project aims at creating a wireless network simulator based on User Mode Linux and on the hostap driver. The idea of a virtualised kernel is extended to the virtualisation of an existing 802.11 driver. The driver is ported to the User Mode architecture and a prism2 based card is implemented in software so as to "fool" the driver. The simulator is writing in QT/C++ and features a network visualisation window where each machine is depicted as and icon in a 2D environment where it can be moved easily. The simulator is easily extended by implementing some models which correspond to a given physical layer model or a given mobilty model.

The driver used is the hostap driver (see this howto for detail) and the user mode linux kernel home page is here. .

Code download
At least, you should have installed the uml_utilities. You can find them on the uml kernel site
Next, you will need to download (See below) and compile the simulator server (wl). Then, download the binaries in this list:

  • root_fs_debian2.2_small.bz2 : This a the root filesystem image you can use for uml_wifi, after bunzip2'ing. (Found on the uml web site with a few packages installed, and some modules added)
  • linux-wl This is the uml linux (2.4.24) executable with netbus compiled in. (Use it for 2.4 hosts)
  • linux-wl-2.6host This is the uml linux (2.4.24) executable with netbus compiled in. (Use it for 2.6 hosts, there was a small patch to apply for these, you can get it here)
The modules hostap_uml.o, hostap.o, kernel_aodv_21.o and kernel_aodv_22.o are in the root fs. The firs time you start a machine, do
$ ./linux-wl-2.6host ubd0=cow01,root_fs_debian2.2_small
and if you want to use that machine again
$ ./linux-wl-2.6host ubd0=cow01
Once in the virtual machine, you are then ready to insert the modules. Before doing that, don't forget to START THE SIMULATION SERVER (wl), otherwise the machine goes in a loop. This is because they are no error checking in the netbus code (yes, I know, it is bad).
$ modprobe hostap_uml
You should see the machine in the simulation windows. You can then configure the wireless interface as usual.
$ iwconfig wlan0 mode ad-hoc
$ ifconfig wlan0

Start aodv if you wish:
$ modprobe kernel_aodv_22 use_dev=wlan0
And that's it !
Usefull related download
linux kernel 2.4.24linux-2.4.24.tar.gz
UML patch 2.4.24-1uml-patch-2.4.24-1.bz2
patch to apply on top of the 2.4.24-um1 to run it on 2.6 host uml2.6host.patch (doesn't apply properly but ver simple to patch by hand)
the hostap driver 0.1.2hostap-driver-0.1.2.tar.gz
linux example config fileuml-config-example.txt

The components of the simulator
The simulator serverwl-0.1.tgz, wl-0.2.tgz(small bug in WMachine::readw that sometimes makes the server crash when a driver is initialised)
The netbus patchuml-netbus-0.1.tgz
The hostap patchhostap-uml-0.1.tgz

Other components
An improved mobility model from Virginie Galtier (French National Institute of Telecommunications) : MobUml

SourceForge.net Logo Code is also vailable at the sourceforge project's homepage
There is also a public cvs access :
cvs -d:pserver:anonymous@cvs.sourceforge.net:/cvsroot/wifi4uml login
cvs -z3 -d:pserver:anonymous@cvs.sourceforge.net:/cvsroot/wifi4uml co modulename

where modulename is one of:
  • wl : for the wireless land server
  • hostap-wl : for the modified hostap driver

Download the 3 simulator's components from the 'download section', unpack the archives and read the respective INSTALL file.


Using it :usage.txt
Extending it :models.txt
You can report bugs and problems using the sourceforge tools at http://sourceforge .net/projects/wifi4uml/. You can also send me an e-mail at guffens at auto.ucl.ac.be and tell me what's wrong.


  • The hostap driver should run without modifications: In order to do that, a pci bus should be implemented in UML. This layer would export all pci_* symbols and any pci driver could than be inserted without missing symbols error. Of course, the initialisation of the driver would fail if the harware was not emulated in software. The design of this pci layer should be thought with care to be as extensible/flexible as possible.
  • Improve the performance: For now, the RTT between two adjacent machines is about 20 [ms]. I think this delay comes from the implementation of the so-called netbus link between the card and the driver which waits for an acknoledgement from the card after every commands. To avoid the necessity of this synchronisation delay, the card should be implemented in the kernel (as a module) and not in the WL server. The card would use a tcp connection between itself and the WL server to send packets to the world which does not require any synchronisation with contrast with writew/readw commands.

Related articles

V. Guffens, G. Bastin and O. Bonaventure. An emulation infrastructure for multi-hop wireless communication networks. Internal report, 2004 [pdf]


In this screenshot, a view of three uml machines is presented. The distance between uml01 and uml03 prevents a direct transmission between them. However, these 3 machines run the AODV protocol and traffic flow through uml02.

Six machines with a ping flood between uml05 and uml06, here is the result :

uml06:~# ping -f
PING ( 56 data bytes
--- ping statistics ---
251 packets transmitted, 239 packets received, 4% packet loss
round-trip min/avg/max = 47.6/413.3/1265.3 ms