design, implementation and tracing of dynamic backpressure routing for ns-3 josé núñez-martínez...
TRANSCRIPT
Design, Implementation and Tracing of Dynamic Backpressure Routing for ns-3
José Núñez-MartínezResearch EngineerCentre Tecnològic de Telecomunicacions de Catalunya CTTC
25/03/11
2
Goal of this presentation
Present the implementation and tracing particularities of dynamic backpressure routing strategy for the ns-3 simulator
3
Outline
• Dynamic Backpressure Routing• Design and Implementation in ns-3• Evaluation• Conclusions
4
Outline
• Dynamic Backpressure Routing• Design and Implementation in ns-3• Evaluation• Conclusions
5
Description: An example
• WMN with one GW• UDP flow of 9Mbps from node 0 to the GW
6
Dynamic Backpressure Routing Ilustration
• resources are used in the WMN whenever it is necessary• in this example, most network nodes contribute to sending data
packets to the destination
7
Solution Description: Local decision
8
Solution Description: Details
• Each WMR maintains and announces the sum of two different types of queue lengths• Physical Queue Length: Number of packets to be transmitted
• for distribution/load balancing purposes
• Virtual Queue Length: Value configured as a function of distance to the GW
• this queue stores no real data (an integer indicating size)
• its purpose is to generate a decreasing queue backlog gradient towards the GW
• GW has Virtual Queue Length 0 • Virtual Queue Length increased as distance to GW increases
9
Outline
• Dynamic Backpressure Routing• Design and Implementation in ns-3• Results• Conclusions
10
Dynamic Backpressure Routing Implementation in ns-3
+virtual RouteInput()+virtual RouteOutput()+virtual SetIpv4()+SendHello()
backpressure::RoutingProtocol
+Enqueue()+Dequeue()
-m_maxPkts-m_maxDelay-m_size
backpressure::DataQueuem_queuedData
m_state
+Ipv4Address FindNexHop()
-m_neighborSet-m_time
backpressure::State
+HelloTimerExpire()-m_HelloTimerbackpressure::HelloSender
*
*
Ipv4RoutingProtocol
1
1
11
RouteOutput and RouteInput
• RouteOutput is called whenever upper layers have an outbound packet and returns the loopback address
• RouteOutput is merely used to send each data packet to the RouteInput function
• Then RouteInput is called when a packet is received from upper/lower layers
• RouteInput queues incoming data packet in a data queue
12
Transmission Opportunities
• A FIFO Data Queue is located at the routing layer• WiFi MAC Queue default behavior is changed: it
stores a few unicast data packets and Hello Broadcast control packets
• Data Packets would remain trapped at Routing Data Queues
• Whenever there are free data packet slots in the WiFi MAC Queue send a potential transmission opportunity to the routing layer
• If the Routing Data Queue is not empty call FindNextHop function
13
FindNextHop
14
Tracing• Metrics obtained:
• End-to-end performance metrics (e.g., throughput, delay)• Per node performance metrics
• End-to-end performance metrics• Connect in the main simulation program with two points in the
ns-3 simulator• TracedCallback when a data packet traverses RouteOutput
function• Main simulation program generates a new sequence number and a
timestamp• ByteTag with sequence number added to the packet
• When the data packet is received by the destination• Get sequence number from ByteTag in data packet• Update structure indexed by sequence number with the arrival
timestamp
• Pcap tracing
15
Backpressure Helper
• Similar to AthStatsHelper• TracedCallback m_txTrace called whenever a
node transmits a data packet which increments m_Tx
• WriteStats every t seconds in the file created by EnableBackpressureStats()
+EnableBackpressureStats()
BackpressureHelper m_SinkStats
+WriteStats()+IncTx()
-m_TxBackpressureWifiTraceSink
-TracedCallback m_txTracebackpressure::RoutingProtocol
16
Backpressure Helper
• BackpressureHelper• Store some useful metrics for every node in the
network to understand the routing protocol behavior• Queue length
• Queue overflows
• TTL overflows
• Number of data packets transmitted by a WMR
• Every t seconds the values of this metric are written in a file created for each node
• At the end of the simulation a data file is created for every node running the protocol in the WMN
17
Outline
• Dynamic Backpressure Routing• Design and Implementation in ns-3• Results• Conclusions
18
Simulation Setup
• Friis Propagation Loss Model• single channel single radio 6x6 grid• 80211a, 54Mbps, MAC layer retries 3• Every experiment is repeated 30 times in which
input rate of source node varies from 1Mbps up to 30Mbps
• 35 different replications in which a different node is chosen as source
• Duration of the simulation 60 seconds • Physical Queue Length of 400 packets, and
Virtual Queue length difference of 40 packets
19
Results
• Throughput variability varying the source node injecting the flow to the GW
• All the nodes which are at least at 2 hops of the GW
20
Results
• Decreasing queue backlog gradient towards the GW • Data queues length are bounded
21
Outline
• Dynamic Backpressure Routing• Design and Implementation in ns-3• Results• Conclusions
22
Conclusions
• Main concept behind dynamic backpressure routing
• Implementation, fine-grained tracing and some results of the routing protocol evaluation have been showed
• This was the first step• Use ns-3 as a tool for fast-prototyping of network
protocols in proof-of-concept testbeds
• Current work• Porting Dynamic Backpressure Routing code to a real
WMN testbed by means of ns-3 emulation framework
23
Thanks for your kind attention!
• Questions?
José Núñez-MartínezResearch Engineer
Centre Tecnologic de Telecomunicacions de Catalunya