Ns Simulation of IEEE 802.11 Simulation of IEEE 802.11 Ns SC546 Project (Fall 2002) SC546 Project (Fall 2002) SOO IL KIM (kimsooil@bu.edu kimsooil@bu.edu) ) SOO IL KIM ( JISUN YOON (faithink@bu.edu faithink@bu.edu) ) JISUN YOON (
Project descriptions Project descriptions � Goals Goals � � Understand the IEEE 802.11 Understand the IEEE 802.11 � � Do wireless LAN simulations using Ns Do wireless LAN simulations using Ns � � Focus Focus � � Ad hoc networking Ad hoc networking � � Collision avoidance (RTS/CTS handshake) Collision avoidance (RTS/CTS handshake) � SC546 (Fall 2002) Ns Simulation of IEEE 802.11 2
Wired vs. Wireless Wired vs. Wireless � Wireless communication Wireless communication � � No wired links: radio, infrared, laser No wired links: radio, infrared, laser � � Ad hoc network Ad hoc network � � Problems in Wireless Network (IEEE 802.11) Problems in Wireless Network (IEEE 802.11) � � No multi No multi- -hop awareness hop awareness � � Hidden/ Exposed Hidden/ Exposed � � Unfairness Unfairness � � Packet drop is occurred often by errors in transmission layer Packet drop is occurred often by errors in transmission layer � � (Compare) Problems in Wired network (Compare) Problems in Wired network � � Major cause of dropped packets: Congestion in Routers Major cause of dropped packets: Congestion in Routers � SC546 (Fall 2002) Ns Simulation of IEEE 802.11 3
Hidden/ Exposed node Hidden/ Exposed node From “The deaf node problem in Ad hoc wireless LANs” by S. Ray, D. Starobinski, and J.B.Carrunthers � Data transmission from A to B Data transmission from A to B � � Hidden node =D (possibly Deaf node) Hidden node =D (possibly Deaf node) � � Cause packet collision Cause packet collision � � Exposed node=C Exposed node=C � � Prohibited from transmitting Prohibited from transmitting � SC546 (Fall 2002) Ns Simulation of IEEE 802.11 4
802.11 Operations (#1) 802.11 Operations (#1) 1 1 2 2 B B RTS S R S R RTS A A RTS C C 3 4 3 4 B B CTS S R S R CTS A A CTS C C SC546 (Fall 2002) Ns Simulation of IEEE 802.11 5
802.11 Operation (#2) 802.11 Operation (#2) B RTS CTS Data RTS RTS CTS CTS A S R C Data Data ACK Receive RTS: Defer until CTS should have been sent Receive RTS : Defer until CTS should have been sent � � Receive CTS: Defer until Data should have been sent Receive CTS : Defer until Data should have been sent � � If you don’ If you don ’t receive CTS or ACK, back off and try it all over again t receive CTS or ACK, back off and try it all over again � � (from http://www- (from http://www -ece.rice.edu/!ashu/reneclass/lectures/elec437lecture2.pdf) ece.rice.edu/!ashu/reneclass/lectures/elec437lecture2.pdf) SC546 (Fall 2002) Ns Simulation of IEEE 802.11 6
Ns (Network Simulator) Ns (Network Simulator) � A discrete event simulator targeted at A discrete event simulator targeted at � networking research networking research � The collaboration of USC/ISI, LBL, UCB, and The collaboration of USC/ISI, LBL, UCB, and � Xerox PARC Xerox PARC � Two main components: Ns, Nam Two main components: Ns, Nam � � Validation is needed Validation is needed � SC546 (Fall 2002) Ns Simulation of IEEE 802.11 7
Ns Ns � Support wired/wireless models Support wired/wireless models � � Traffic models and applications Traffic models and applications � � Web, FTP, telnet, constant Web, FTP, telnet, constant- -bit rate, stochastic bit rate, stochastic � � Transport protocols Transport protocols � � Unicast Unicast: : TCP(Reno TCP(Reno, Vegas, etc.), UDP , Vegas, etc.), UDP � � Multicast: SRM Multicast: SRM � � Routing and Routing and queueing queueing � � Wired routing, ad hoc routing and directed diffusion Wired routing, ad hoc routing and directed diffusion � � Queueing Queueing protocols: RED, drop protocols: RED, drop- -tail, etc. tail, etc. � � Physical media Physical media � � Wired (point Wired (point- -to to- -point, LANs), wireless (multiple propagation models), point, LANs), wireless (multiple propagation models), � satellite satellite � Tracing, visualization using Nam Tracing, visualization using Nam � SC546 (Fall 2002) Ns Simulation of IEEE 802.11 8
Ns Ns � Ns Programming Ns Programming � � C Create the event scheduler reate the event scheduler � � T Turn tracing urn tracing � � C Create network reate network � � S Setup routing etup routing � � I Insert errors nsert errors � � C Create transport connection reate transport connection � � C Create traffic reate traffic � Using Ns (from http://www.isi.edu/nsnam/ns/ns-tutorial/) � T Transmit application ransmit application- -level data level data � SC546 (Fall 2002) Ns Simulation of IEEE 802.11 9
Environments/Configurations Environments/Configurations set val(chan val(chan) Channel/ ) Channel/WirelessChannel WirelessChannel ;# channel type set ;# channel type � � set val(prop val(prop) Propagation/ ) Propagation/TwoRayGround TwoRayGround ;# radio ;# radio- -propagation model propagation model set � � set set val(ant val(ant) Antenna/ ) Antenna/OmniAntenna OmniAntenna ;# Antenna type ;# Antenna type � � set set val(ll val(ll) LL ;# Link layer type ) LL ;# Link layer type � � set val(ifq val(ifq) Queue/ ) Queue/DropTail/PriQueue DropTail/PriQueue ;# Interface queue type set ;# Interface queue type � � set val(ifqlen val(ifqlen) 50 ;# max packet in ) 50 ;# max packet in ifq ifq set � � set set val(netif val(netif) ) Phy/WirelessPhy Phy/WirelessPhy ;# network interface type ;# network interface type � � set set val(mac val(mac) Mac/802_11 ;# MAC type ) Mac/802_11 ;# MAC type � � set val(nn val(nn) 4 ;# number of ) 4 ;# number of mobilenodes mobilenodes set � � set val(rp val(rp) ) AODV ;# routing protocol set AODV ;# routing protocol � � set set val(x val(x) 800 ) 800 � � set set val(y val(y) 800 ) 800 � � SC546 (Fall 2002) Ns Simulation of IEEE 802.11 10
Simulation #1 Simulation #1 � Scenario Scenario � � Two fixed nodes Two fixed nodes � � moving within 600m x 600m flat topology moving within 600m x 600m flat topology � � DSR ad hoc routing DSR ad hoc routing � � TCP and CBR traffic TCP and CBR traffic � � Receiver move in and out of range Receiver move in and out of range � � Results Results � � Time vs. packets arrived Time vs. packets arrived � SC546 (Fall 2002) Ns Simulation of IEEE 802.11 11
Simulation #2 Simulation #2 � Scenario Scenario � � Two fixed pairs (4 nodes) Two fixed pairs (4 nodes) � � moving within 800m x 800m flat topology moving within 800m x 800m flat topology � � AODV ad hoc routing AODV ad hoc routing � � TCP and CBR traffic TCP and CBR traffic � � 2 nodes in each pair communicate each other 2 nodes in each pair communicate each other (hidden node) (hidden node) � � Results Results � � Time vs. packets arrived Time vs. packets arrived � SC546 (Fall 2002) Ns Simulation of IEEE 802.11 12
Simulation #3 Simulation #3 � Scenario Scenario � � Six fixed nodes Six fixed nodes � � Change Routing algorithm Change Routing algorithm � � 4 Ad hoc routing: DSR/ DSDV/ AODV/ TORA 4 Ad hoc routing: DSR/ DSDV/ AODV/ TORA � � The left The left- -most node sends data to the right most node sends data to the right- -most node most node � � Results Results � � Time vs. packets arrived Time vs. packets arrived � SC546 (Fall 2002) Ns Simulation of IEEE 802.11 13
Further studies Further studies � Check the effectiveness of RTS/CTS handshake Check the effectiveness of RTS/CTS handshake � � Consider a lot of nodes in a small space Consider a lot of nodes in a small space � � More experiments using other traffic model (e.g. More experiments using other traffic model (e.g. � burst) burst) � Source Source- -level (C++) modification for deeper level (C++) modification for deeper � understanding understanding SC546 (Fall 2002) Ns Simulation of IEEE 802.11 14
Useful links Useful links � Monarch project Monarch project � � http://www.monarch.cs.rice.edu http://www.monarch.cs.rice.edu � � (more links will be added on the web) (more links will be added on the web) � SC546 (Fall 2002) Ns Simulation of IEEE 802.11 15
That’ ’s all s all That � Thanks. Thanks. � SC546 (Fall 2002) Ns Simulation of IEEE 802.11 16
Recommend
More recommend