design, implementation and tracing of dynamic backpressure routing for ns-3 josé núñez-martínez...

23
Design, Implementation and Tracing of Dynamic Backpressure Routing for ns-3 José Núñez-Martínez Research Engineer Centre Tecnològic de Telecomunicacions de Catalunya CTTC 25/03/11

Upload: cecil-park

Post on 13-Dec-2015

212 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Design, Implementation and Tracing of Dynamic Backpressure Routing for ns-3 José Núñez-Martínez Research Engineer Centre Tecnològic de Telecomunicacions

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

Page 2: Design, Implementation and Tracing of Dynamic Backpressure Routing for ns-3 José Núñez-Martínez Research Engineer Centre Tecnològic de Telecomunicacions

2

Goal of this presentation

Present the implementation and tracing particularities of dynamic backpressure routing strategy for the ns-3 simulator

Page 3: Design, Implementation and Tracing of Dynamic Backpressure Routing for ns-3 José Núñez-Martínez Research Engineer Centre Tecnològic de Telecomunicacions

3

Outline

• Dynamic Backpressure Routing• Design and Implementation in ns-3• Evaluation• Conclusions

Page 4: Design, Implementation and Tracing of Dynamic Backpressure Routing for ns-3 José Núñez-Martínez Research Engineer Centre Tecnològic de Telecomunicacions

4

Outline

• Dynamic Backpressure Routing• Design and Implementation in ns-3• Evaluation• Conclusions

Page 5: Design, Implementation and Tracing of Dynamic Backpressure Routing for ns-3 José Núñez-Martínez Research Engineer Centre Tecnològic de Telecomunicacions

5

Description: An example

• WMN with one GW• UDP flow of 9Mbps from node 0 to the GW

Page 6: Design, Implementation and Tracing of Dynamic Backpressure Routing for ns-3 José Núñez-Martínez Research Engineer Centre Tecnològic de Telecomunicacions

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

Page 7: Design, Implementation and Tracing of Dynamic Backpressure Routing for ns-3 José Núñez-Martínez Research Engineer Centre Tecnològic de Telecomunicacions

7

Solution Description: Local decision

Page 8: Design, Implementation and Tracing of Dynamic Backpressure Routing for ns-3 José Núñez-Martínez Research Engineer Centre Tecnològic de Telecomunicacions

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

Page 9: Design, Implementation and Tracing of Dynamic Backpressure Routing for ns-3 José Núñez-Martínez Research Engineer Centre Tecnològic de Telecomunicacions

9

Outline

• Dynamic Backpressure Routing• Design and Implementation in ns-3• Results• Conclusions

Page 10: Design, Implementation and Tracing of Dynamic Backpressure Routing for ns-3 José Núñez-Martínez Research Engineer Centre Tecnològic de Telecomunicacions

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

Page 11: Design, Implementation and Tracing of Dynamic Backpressure Routing for ns-3 José Núñez-Martínez Research Engineer Centre Tecnològic de Telecomunicacions

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

Page 12: Design, Implementation and Tracing of Dynamic Backpressure Routing for ns-3 José Núñez-Martínez Research Engineer Centre Tecnològic de Telecomunicacions

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

Page 13: Design, Implementation and Tracing of Dynamic Backpressure Routing for ns-3 José Núñez-Martínez Research Engineer Centre Tecnològic de Telecomunicacions

13

FindNextHop

Page 14: Design, Implementation and Tracing of Dynamic Backpressure Routing for ns-3 José Núñez-Martínez Research Engineer Centre Tecnològic de Telecomunicacions

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

Page 15: Design, Implementation and Tracing of Dynamic Backpressure Routing for ns-3 José Núñez-Martínez Research Engineer Centre Tecnològic de Telecomunicacions

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

Page 16: Design, Implementation and Tracing of Dynamic Backpressure Routing for ns-3 José Núñez-Martínez Research Engineer Centre Tecnològic de Telecomunicacions

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

Page 17: Design, Implementation and Tracing of Dynamic Backpressure Routing for ns-3 José Núñez-Martínez Research Engineer Centre Tecnològic de Telecomunicacions

17

Outline

• Dynamic Backpressure Routing• Design and Implementation in ns-3• Results• Conclusions

Page 18: Design, Implementation and Tracing of Dynamic Backpressure Routing for ns-3 José Núñez-Martínez Research Engineer Centre Tecnològic de Telecomunicacions

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

Page 19: Design, Implementation and Tracing of Dynamic Backpressure Routing for ns-3 José Núñez-Martínez Research Engineer Centre Tecnològic de Telecomunicacions

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

Page 20: Design, Implementation and Tracing of Dynamic Backpressure Routing for ns-3 José Núñez-Martínez Research Engineer Centre Tecnològic de Telecomunicacions

20

Results

• Decreasing queue backlog gradient towards the GW • Data queues length are bounded

Page 21: Design, Implementation and Tracing of Dynamic Backpressure Routing for ns-3 José Núñez-Martínez Research Engineer Centre Tecnològic de Telecomunicacions

21

Outline

• Dynamic Backpressure Routing• Design and Implementation in ns-3• Results• Conclusions

Page 22: Design, Implementation and Tracing of Dynamic Backpressure Routing for ns-3 José Núñez-Martínez Research Engineer Centre Tecnològic de Telecomunicacions

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

Page 23: Design, Implementation and Tracing of Dynamic Backpressure Routing for ns-3 José Núñez-Martínez Research Engineer Centre Tecnològic de Telecomunicacions

23

Thanks for your kind attention!

• Questions?

José Núñez-MartínezResearch Engineer

Centre Tecnologic de Telecomunicacions de Catalunya

[email protected]