HOWTO use ns-3 in the ORBIT testbed environment

From Nsnam
Revision as of 01:09, 31 December 2008 by Craigdo (Talk | contribs) (New page: {{TOC}} We provide a realtime emulation package that allows us to connect ns-3 to real networks on real machines. Typically the real network will be a testbed of some kind. ORBIT is a t...)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Main Page - Current Development - Developer FAQ - Tools - Related Projects - Project Ideas - Summer Projects

Installation - Troubleshooting - User FAQ - HOWTOs - Samples - Models - Education - Contributed Code - Papers

We provide a realtime emulation package that allows us to connect ns-3 to real networks on real machines. Typically the real network will be a testbed of some kind. ORBIT is a two-tier laboratory emulator/field trial network project of WINLAB (Wireless Information Network Laboratory), at Rutgers. This wireless network emulator provides a large two-dimensional grid of 400 802.11 radio nodes. THis HOWTO shows how ns-3 scripts can be used to drive these radio nodes.

HOWTO use ns-3 in the ORBIT testbed environment

We assume that you have some familiarity with the ORBIT system and have

1. Start the VMware virtual machines

   a.  Select the "Start this virtual machine" command on the "ns-3-test-1"
       virtual machine in the VMware Server Console;
   b.  Recall that you type <Ctrl>+<Alt> to exit the VM;
   c.  Select the "Start this virtual machine" command on the "ns-3-test-2"
       virtual machine in the VMware Server Console;

2. Clone and build the ns-3-emu experimental repositories on both machines

   a.  Select the "ns-3-test-1" virtual machine and click in the console to
       interact with the VM
   b.  Log in as your normal user;
   c.  Change into the repos directory;
   d.  Clone the repository
       hg clone http://code.nsnam.org/craigdo/ns-3-emu
   e.  Build the code
       ./waf -d debug configure
       ./waf
   f.  <Ctrl>+<Alt> to exit the VM
   g.  Select the "ns-3-test-2" virtual machine and click in the console to
       interact with the VM
   h.  Log in as your normal user;
   i.  Change into the repos directory;
   j.  Clone the repository
       hg clone http://code.nsnam.org/craigdo/ns-3-emu
   k.  Build the code
       ./waf -d debug configure
       ./waf

3. Configure the network interfaces

   a.  Select the "ns-3-test-1" virtual machine and click in the console to
       interact with the VM
   b.  Log in as root (su or sudo as you wish);
   c.  Put the test network interface into promiscuous mode
       ifconfig eth1 promisc
   d.  <Ctrl>+<Alt> to exit the VM
   e.  Select the "ns-3-test-2" virtual machine and click in the console to
       interact with the VM
   f.  Log in as root (su or sudo as you wish);
   g.  Put the test network interface into promiscuous mode
       ifconfig eth1 promisc
   h.  <Ctrl>+<Alt> to exit the VM

4. Run the server script as root (I habitually use ns-3-test-2 as the server) since the socket calls for the emulated net device require root privileges

   a.  Select the "ns-3-test-2" virtual machine and click in the console to
       interact with the VM
   b.  ./waf --run emu-udp-echo-server
   c.  <Ctrl>+<Alt> to exit the VM
   d.  You have about 50 seconds to get back and start the client
       before the server exits

5. Run the client script as root (I habitually use ns-3-test-1 as the client) since the socket calls for the emulated net device require root privileges

   a.  Select the "ns-3-test-1" virtual machine and click in the console to
       interact with the VM
   b.  ./waf --run emu-udp-echo-client
   c.  The client will run for about ten seconds;

6. Take a look at the client pcap file and find a couple of ARP exchanges and the expected UDP echo requests and replies.

   a.  tcpdump -nn -tt -r emu-udp-echo-client-0-0.pcap

Craigdo 01:09, 31 December 2008 (UTC)