using ns-3 emulation to experiment with wireless mesh network routing: lessons learned

24
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

Upload: jaser

Post on 03-Feb-2016

32 views

Category:

Documents


0 download

DESCRIPTION

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. - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: Using ns-3 emulation to experiment with Wireless Mesh Network Routing: Lessons  learned

Using ns-3 emulation to experiment with Wireless Mesh Network Routing:Lessons learnedJosé Núñez-MartínezResearch EngineerCentre Tecnologic de Telecomunicacions de Catalunya

25/03/2011

Page 2: Using ns-3 emulation to experiment with Wireless Mesh Network Routing: Lessons  learned

2

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 the performance evaluation of the ns-3 emulation framework in a real testbed

Page 3: Using ns-3 emulation to experiment with Wireless Mesh Network Routing: Lessons  learned

3

Outline

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

Page 4: Using ns-3 emulation to experiment with Wireless Mesh Network Routing: Lessons  learned

4

Outline

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

Page 5: Using ns-3 emulation to experiment with Wireless Mesh Network Routing: Lessons  learned

5

Wireless Mesh Node

• Motherboard: • Portwell Mini-ITX 1.6Ghz processor

• Storage: • 80Gb PATA hard disk.

• Wireless Interfaces• up to four mini-PCI CM9 atheros wireless• 54Mbps

• 5Ghz band pseudo ad-hoc mode, one antenna

• 3G Femtocell connected through Ethernet

iface via Switch

• OS• Linux Fedora Core 2.6.32• Madwifi 0.9.4

Page 6: Using ns-3 emulation to experiment with Wireless Mesh Network Routing: Lessons  learned

6

Wireless Mesh Testbed

• Deployed in the first floor of the CTTC building• An approximate area of 1200 square meters

• 12 WiFi nodes acting as Wireless Mesh Routers• Static and non-power constrained• Backbone wireless mesh network• Using 1 WiFi 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

Page 7: Using ns-3 emulation to experiment with Wireless Mesh Network Routing: Lessons  learned

7

Wireless Mesh Tesbed Deployment

Page 8: Using ns-3 emulation to experiment with Wireless Mesh Network Routing: Lessons  learned

8

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

Page 9: Using ns-3 emulation to experiment with Wireless Mesh Network Routing: Lessons  learned

9

Outline

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

Page 10: Using ns-3 emulation to experiment with Wireless Mesh Network Routing: Lessons  learned

10

Ns-3 WMR configuration

• EmuNetDevice associated to each interface• associated to ath0

Ptr<EmuNetDevice> device = CreateObject<EmuNetDevice> ();

device->SetAttribute ("Address",

Mac48AddressValue ("00:0b:6b:81:ce:2a");

device->SetAttribute ("DeviceName", StringValue (deviceName));

• Static Routing and Backpressure Routing• Static routing more priority than backpressure routing and removed routes

associated in static routing to use backpressure routinglist.Add (staticRouting, 10); // static routing

list.Add (backpressure, 0); //dynamic backpressure routing

staticRouting->RemoveRoute (1); //so that backpressure would be used to route within the WMN

Page 11: Using ns-3 emulation to experiment with Wireless Mesh Network Routing: Lessons  learned

11

Ns-3 WMR configuration

• To disable ARP in the testbed, fix static ARP entries in the node interfaces• Create ARP cache

Ptr<ArpCache> arp = CreateObject<ArpCache> ();

arp->SetAliveTimeout (Seconds(3600*24*365));

• Add ARP cache entry Mac48Address macAddr = Mac48Address("00:0b:6b:81:ce:2a");

Ipv4Address ipAddr = Ipv4Address("10.3.40.193");

ArpCache::Entry * entry = arp->Add(ipAddr);

entry->MarkWaitReply(0);

entry->MarkAlive(macAddr);

• Associate Arp Cache to the IP interfaceipIface->SetAttribute("ArpCache", PointerValue(arp));

Page 12: Using ns-3 emulation to experiment with Wireless Mesh Network Routing: Lessons  learned

12

Outline

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

Page 13: Using ns-3 emulation to experiment with Wireless Mesh Network Routing: Lessons  learned

13

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", EnumValue(EMU_MODE));

• Due to the particularities of dynamic backpressure routing there are some coding differences• Interaction with WiFi MAC Queues

• Routing Protocol require some adjustments in emulation mode

Page 14: Using ns-3 emulation to experiment with Wireless Mesh Network Routing: Lessons  learned

14

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 WiFi MAC layer is launched whenever there are free data slots in the WiFi MAC Layer

• In this case the real host has to tell somehow to ns-3 whether there is a new transmission opportunity or not

Page 15: Using ns-3 emulation to experiment with Wireless Mesh Network Routing: Lessons  learned

15

Interaction between ns3 and madwifi driver

Page 16: Using ns-3 emulation to experiment with Wireless Mesh Network Routing: Lessons  learned

16

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

Page 17: Using ns-3 emulation to experiment with Wireless Mesh Network Routing: Lessons  learned

17

Outline

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

Page 18: Using ns-3 emulation to experiment with Wireless Mesh Network Routing: Lessons  learned

18

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 WiFi card• Not every random mac address is appropriate at least for

WiFi cards• In madWiFi higher bits of the mac address identify the

VAP

• With MAC addresses which do not satisfy BSSID_MASK the WiFi card discard data packets though some of them are able to be processed

Page 19: Using ns-3 emulation to experiment with Wireless Mesh Network Routing: Lessons  learned

19

NS-3 performance Processing

• Linux host saturating a WiFi interface in 802.11a mode 4000pkts per second payload 1024bytes

• Ns-3 WMR processing packets• EmuNetDevice RxQueueSize

• Performance degradation due to queue drops in EmuNetDevice• Appropiate EmuNetDevice queue size

Page 20: Using ns-3 emulation to experiment with Wireless Mesh Network Routing: Lessons  learned

20

NS-3 performance Sending

• Ns-3 WMR saturating WiFi interface• Performance at the receiver• UDP traffic 4000pkts per second during

30seconds

Page 21: Using ns-3 emulation to experiment with Wireless Mesh Network Routing: Lessons  learned

21

Outline

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

Page 22: Using ns-3 emulation to experiment with Wireless Mesh Network Routing: Lessons  learned

22

Conclusions

• Implementation particularities of the routing protocol and ns3 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

Page 23: Using ns-3 emulation to experiment with Wireless Mesh Network Routing: Lessons  learned

23

Thanks for your kind attention!

• Questions?

José Núñez-MartínezResearch Engineer

Centre Tecnologic de Telecomunicacions de Catalunya

[email protected]

Page 24: Using ns-3 emulation to experiment with Wireless Mesh Network Routing: Lessons  learned

24

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