Using ns3 emulation to experiment with Wireless Mesh

  • Slides: 24
Download presentation
Using ns-3 emulation to experiment with Wireless Mesh Network Routing: Lessons learned José Núñez-Martínez

Using ns-3 emulation to experiment with Wireless Mesh Network Routing: Lessons learned José Núñez-Martínez Research Engineer Centre Tecnologic de Telecomunicacions de Catalunya 25/03/2011

Goal of this talk Give the implementation details of porting the implementation of a

Goal of this talk Give the implementation details of porting the implementation of a routing protocol to a real WMN testbed by means of ns-3 emulation framework Initial results on the performance evaluation of the ns-3 emulation framework in a real testbed 2

Outline • • • Testbed Setup Ns-3 WMR Main changes in the routing protocol

Outline • • • Testbed Setup Ns-3 WMR Main changes in the routing protocol Performance Evaluation Conclusions 3

Outline • • • Testbed Setup Ns-3 WMR Implications in the routing protocol Performance

Outline • • • Testbed Setup Ns-3 WMR Implications in the routing protocol Performance Evaluation Conclusions 4

Wireless Mesh Node • Motherboard: • Portwell Mini-ITX 1. 6 Ghz processor • Storage:

Wireless Mesh Node • Motherboard: • Portwell Mini-ITX 1. 6 Ghz processor • Storage: • 80 Gb PATA hard disk. • Wireless Interfaces • up to four mini-PCI CM 9 atheros wireless • 54 Mbps • 5 Ghz band pseudo ad-hoc mode, one antenna • 3 G Femtocell connected through Ethernet iface via Switch • OS • Linux Fedora Core 2. 6. 32 • Madwifi 0. 9. 4 5

Wireless Mesh Testbed • Deployed in the first floor of the CTTC building •

Wireless Mesh Testbed • Deployed in the first floor of the CTTC building • An approximate area of 1200 square meters • 12 Wi. Fi nodes acting as Wireless Mesh Routers • Static and non-power constrained • Backbone wireless mesh network • Using 1 Wi. Fi interface and 1 Ethernet to connect Femtocells • Wifi Mesh initially set up to single radio single channel • Network control via Ethernet LAN Controller for remote management purposes 6

Wireless Mesh Tesbed Deployment 7

Wireless Mesh Tesbed Deployment 7

Testbed Routing Configuration • Flows directed to a Femtocell • Add static routes to

Testbed Routing Configuration • Flows directed to a Femtocell • Add static routes to packets directed to the Femtocell connected by Ethernet Interface • Backpressure to route packets to another Femtocell not directly connected by Ethernet Interface • Flows coming from a Femtocell • Static Default route added to reach the WMR directly connected via Ethernet Interface • Static Default route of the GW in the mesh to reach Core Network • Flows originated at the WMR • Generate them within ns-3 8

Outline • • • Testbed Setup Ns-3 WMR Implications in the routing protocol Performance

Outline • • • Testbed Setup Ns-3 WMR Implications in the routing protocol Performance Evaluation of ns 3 Conclusions 9

Ns-3 WMR configuration • Emu. Net. Device associated to each interface • associated to

Ns-3 WMR configuration • Emu. Net. Device associated to each interface • associated to ath 0 Ptr<Emu. Net. Device> device = Create. Object<Emu. Net. Device> (); device->Set. Attribute ("Address", Mac 48 Address. Value ("00: 0 b: 6 b: 81: ce: 2 a"); device->Set. Attribute ("Device. Name", String. Value (device. Name)); • Static Routing and Backpressure Routing • Static routing more priority than backpressure routing and removed routes associated in static routing to use backpressure routing list. Add (static. Routing, 10); // static routing list. Add (backpressure, 0); //dynamic backpressure routing static. Routing->Remove. Route (1); //so that backpressure would be used to route within the WMN 10

Ns-3 WMR configuration • To disable ARP in the testbed, fix static ARP entries

Ns-3 WMR configuration • To disable ARP in the testbed, fix static ARP entries in the node interfaces • Create ARP cache Ptr<Arp. Cache> arp = Create. Object<Arp. Cache> (); arp->Set. Alive. Timeout (Seconds(3600*24*365)); • Add ARP cache entry Mac 48 Address mac. Addr = Mac 48 Address("00: 0 b: 6 b: 81: ce: 2 a"); Ipv 4 Address ip. Addr = Ipv 4 Address("10. 3. 40. 193"); Arp. Cache: : Entry * entry = arp->Add(ip. Addr); entry->Mark. Wait. Reply(0); entry->Mark. Alive(mac. Addr); • Associate Arp Cache to the IP interface ip. Iface->Set. Attribute("Arp. Cache", Pointer. Value(arp)); 11

Outline • • • Testbed Setup Ns-3 WMR Implications in the routing protocol Ns-3

Outline • • • Testbed Setup Ns-3 WMR Implications in the routing protocol Ns-3 Emulation Performance Evaluation Conclusions 12

Dynamic Backpressure Routing protocol Implementation • EMU_MODE/SIMU_MODE • depending on the mode there are

Dynamic Backpressure Routing protocol Implementation • EMU_MODE/SIMU_MODE • depending on the mode there are some changes in the routing protocol module backpressure. Set("Mode", Enum. Value(EMU_MODE)); • Due to the particularities of dynamic backpressure routing there are some coding differences • Interaction with Wi. Fi MAC Queues • Routing Protocol require some adjustments in emulation mode 13

Transmission Opportunities in EMU_MODE • Recall that packets coming from upper//lower layers are not

Transmission Opportunities in EMU_MODE • Recall that packets coming from upper//lower layers are not necessarily immediately forwarded • Instead of this they are stored waiting for transmission opportunities • In SIMU_MODE a callback from Wi. Fi MAC layer is launched whenever there are free data slots in the Wi. Fi MAC Layer • In this case the real host has to tell somehow to ns-3 whethere is a new transmission opportunity or not 14

Interaction between ns 3 and madwifi driver 15

Interaction between ns 3 and madwifi driver 15

Interacion between NS-3 and Madwifi driver • Madwifi patched to trigger interruption • Create

Interacion between NS-3 and Madwifi driver • Madwifi patched to trigger interruption • Create a file in /proc/sys/ • Patch madwifi driver to Write in /proc/sys/ file when the HW buffer is full • Another write event when HW buffer is not full • In the ns-3 dynamic backpressure routing module create a thread waiting for some write event on a file in /proc/sys/ • Use select() system call waiting for a write event • Continuous transmission opportunity in the routing module by default • When the thread is unblocked and previously was idle transmission opportunities are locked 16

Outline • • • Testbed Setup Ns-3 WMR Implications in the routing protocol Ns-3

Outline • • • Testbed Setup Ns-3 WMR Implications in the routing protocol Ns-3 Emulation Performance Evaluation Conclusions 17

NS-3 Mac Spoofing • Be careful with the selected MAC address to spoof •

NS-3 Mac Spoofing • Be careful with the selected MAC address to spoof • BSSID_MASK: mask to set up potential mac addresses of the VAPS associated to a Wi. Fi card • Not every random mac address is appropriate at least for Wi. Fi cards • In mad. Wi. Fi higher bits of the mac address identify the VAP • With MAC addresses which do not satisfy BSSID_MASK the Wi. Fi card discard data packets though some of them are able to be processed 18

NS-3 performance Processing • Linux host saturating a Wi. Fi interface in 802. 11

NS-3 performance Processing • Linux host saturating a Wi. Fi interface in 802. 11 a mode 4000 pkts per second payload 1024 bytes • Ns-3 WMR processing packets • Emu. Net. Device Rx. Queue. Size • Performance degradation due to queue drops in Emu. Net. Device • Appropiate Emu. Net. Device queue size 19

NS-3 performance Sending • Ns-3 WMR saturating Wi. Fi interface • Performance at the

NS-3 performance Sending • Ns-3 WMR saturating Wi. Fi interface • Performance at the receiver • UDP traffic 4000 pkts per second during 30 seconds 20

Outline • • • Testbed Setup Ns-3 WMR Implications in the routing protocol Ns-3

Outline • • • Testbed Setup Ns-3 WMR Implications in the routing protocol Ns-3 Emulation Performance Evaluation Conclusions 21

Conclusions • Implementation particularities of the routing protocol and ns 3 WMR router configuration

Conclusions • Implementation particularities of the routing protocol and ns 3 WMR router configuration • Main issues with respect to ns-3 simulation are given by the interaction with the testbed • But essentials of the routing protocol do not change • HELLO messages, routing algorithm • Initial ns-3 Emulation Performance Evaluation is satisfactory but more tests are needed • Delays 22

Thanks for your kind attention! • Questions? José Núñez-Martínez Research Engineer Centre Tecnologic de

Thanks for your kind attention! • Questions? José Núñez-Martínez Research Engineer Centre Tecnologic de Telecomunicacions de Catalunya jose. nunez@cttc. cat 23

Receiving and Transmitting • Ns-3 WMR receiving and transmitting 2000 packets second • Wifi

Receiving and Transmitting • Ns-3 WMR receiving and transmitting 2000 packets second • Wifi card prioritizes packet reception (i. e. , red flow) • Ns-3 WMR receiving and transmitting at a rate of 1000 packets per second 24