-
Notifications
You must be signed in to change notification settings - Fork 0
netmap with ns 3
Mishal Shah edited this page Mar 8, 2019
·
1 revision
We have tried to explore the netmap capabilities with ns-3. It is a SOCIS2017 project. Following are the steps we followed to setup netmap with ns-3. These steps are referenced from here.
-
Clone the netmap repository
git clone https://github.com/luigirizzo/netmap
-
Netmap provides different modes according to the network drivers used. The generic mode doesn't modify the network drivers. You can check other modes available here.
cd netmap
./configure --no-drivers
- Then we generate the netmap kernel mode i.e. netmap.ko with
make
- Finally, install the netmap headers with
make install
- Now we need to clone the ns-3 repository with the netmap support.
git clone https://github.com/pasquimp/ns-3-dev-git -b socis
- Enter promiscuous mode, and unbind the kernel drivers from NIC and connect with netmap driver
sudo ifconfig $device_name promisc
sudo insmod netmap.ko
-
Change the variables(
deviceName
,clientAddress
,serverAddress
) in the example you are trying to run eg./src/fd-net-device/examples/fd-netmap-emu-onoff.cc
. Also set thetransportProt
to either Tcp/Udp. Modify the simulation timing as per requirement. -
On the server machine, start an
iperf
server using,
iperf -s -p 8000 -i 2
- Switching an interface in netmap mode requires that the raw-socket-creator program in ns-3 has sudo privileges. Then, the user must configure ns-3 with the --enable-sudo option such as in the following configuration. Build profile in ns-3 is to set as optimized to get the best throughput.
./waf configure --build-profile=optimized --enable-examples --enable-sudo