13
NS-3: an introduction - walkthrough of classic hidden terminal problem in WiFi- Anjan Rayamajhi

NS-3: an introduction - walkthrough of classic hidden terminal problem in WiFi- Anjan Rayamajhi

Embed Size (px)

Citation preview

Page 1: NS-3: an introduction - walkthrough of classic hidden terminal problem in WiFi- Anjan Rayamajhi

NS-3: an introduction

- walkthrough of classic hidden terminal problem in WiFi-

Anjan Rayamajhi

Page 2: NS-3: an introduction - walkthrough of classic hidden terminal problem in WiFi- Anjan Rayamajhi

Todays topics

•Conceptual overview of NS3–Node, Application,Channel,Net Device, Helper

functions•Code Walkthrough:

–Hidden terminal problem–Discrete event simulation of Wifi –Example usage of Flow monitor, pcap tracing,

NetAnim and PyViz

Page 3: NS-3: an introduction - walkthrough of classic hidden terminal problem in WiFi- Anjan Rayamajhi

What is NS3

•an open, extensible, core c++ discrete event network simulator•completely different than predecessor ns2 though porting ns2 modules written in c++ is possible•actively maintained at www.nsnam.org•highly modular with added features compared to ns2 such as Direct Code Execution

Page 4: NS-3: an introduction - walkthrough of classic hidden terminal problem in WiFi- Anjan Rayamajhi

software organization of ns3

Page 5: NS-3: an introduction - walkthrough of classic hidden terminal problem in WiFi- Anjan Rayamajhi

NS3 classes

•Nodes : computers, end systems, hosts •Application: user level softwars that make use of underlying networking. No concept of user level or system level applications.•Channel: models the link in terms of capacity, data rates etc. Eg. Wifichannel, CSMAchannel, PointToPointChannel•NetDevice: network interfaces that allow a node to communicate through a channel •Containers and Helper: Containers wrap Devices together into one object. Helpers provide easy objects to implement simulation and setup topology.

Page 6: NS-3: an introduction - walkthrough of classic hidden terminal problem in WiFi- Anjan Rayamajhi

Code Walkthrough

•what is hidden terminal problem?

•Solution:– Use RTS - CTS to schedule transmission

Page 7: NS-3: an introduction - walkthrough of classic hidden terminal problem in WiFi- Anjan Rayamajhi

Discrete Event simulation of wifi

Page 8: NS-3: an introduction - walkthrough of classic hidden terminal problem in WiFi- Anjan Rayamajhi

walk through in code

Page 9: NS-3: an introduction - walkthrough of classic hidden terminal problem in WiFi- Anjan Rayamajhi

Flow MonitorHidden station experiment with RTS/CTS disabled:Flow 1 (10.0.0.1 -> 10.0.0.2) Tx Packets: 2410 Tx Bytes: 3441480 TxOffered: 3.05909 Mbps Rx Packets: 226 Rx Bytes: 322728 Throughput: 0.286869 MbpsFlow 2 (10.0.0.3 -> 10.0.0.2) Tx Packets: 2411 Tx Bytes: 3442908 TxOffered: 3.06036 Mbps Rx Packets: 243 Rx Bytes: 347004 Throughput: 0.308448 Mbps

Hidden station experiment with RTS/CTS enabled:Flow 1 (10.0.0.1 -> 10.0.0.2) Tx Packets: 2410 Tx Bytes: 3441480 TxOffered: 3.05909 Mbps Rx Packets: 415 Rx Bytes: 592620 Throughput: 0.526773 MbpsFlow 2 (10.0.0.3 -> 10.0.0.2) Tx Packets: 2411 Tx Bytes: 3442908 TxOffered: 3.06036 Mbps Rx Packets: 623 Rx Bytes: 889644 Throughput: 0.790795 Mbps

Page 10: NS-3: an introduction - walkthrough of classic hidden terminal problem in WiFi- Anjan Rayamajhi

pcap tracing

to be shown in the terminal

Page 11: NS-3: an introduction - walkthrough of classic hidden terminal problem in WiFi- Anjan Rayamajhi

NSNAM

•offline code simulation visualization•reads simulation xml files and visualizes•comes with NS3 tar but needs to be installed using qmake

Page 12: NS-3: an introduction - walkthrough of classic hidden terminal problem in WiFi- Anjan Rayamajhi

PyViz

•online code simulation visualizer•installed alongwith ns3 •make sure python-binding works•./waf --run <filename> --vis

Page 13: NS-3: an introduction - walkthrough of classic hidden terminal problem in WiFi- Anjan Rayamajhi

References

•www.nsnam.org•Yet another Network simulator; M. Lacage, T. R. Henderson•FlowMonitor - a network monitoring framework for the NS3; G. Carneiro, P. Fortuna, M. Ricardo•http://www2.engr.arizona.edu/~junseok/ns3_wifi.htm