Advanced Computer Networks: Lecture 13. This lecture will cover the following: 802.11 MAC: CSMA/CA; multiple access with collision avoidance (MACA); sender transmits requesttosend (RTS) frame; MACA for wireless (MACAW); distribution system; managing connectivity/roaming; network adaptors;...
CS716 Advanced Computer Networks By Dr. Amir Qayyum 1 Lecture No. 13 802.11 MAC: CSMA/CA • Similar to Ethernet … – Defer the transmission until the link becomes idle – Take back off if collision occurs • Is it sufficient ? • All nodes are not always within reach of (to hear) each other Hidden and Exposed Nodes • Hidden nodes – Sender thinks its OK to send when its not (false +ve) – AC and BD are hidden nodes in the figure below • Exposed nodes – Sender does not send when its OK to send (false –ve) – B and C are exposed nodes in the figure below A B C D Multiple Access with Collision Avoidance (MACA) • Sender transmits RequestToSend (RTS) frame – contains intended time to hold the medium • Receiver replies with ClearToSend (CTS) frame Multiple Access with Collision Avoidance (MACA) • Neighbors of the receiver … – hear CTS: keep quiet for the intended duration (or till the ACK is heard) • Neighbors of only the sender – hear RTS but not CTS: OK to transmit MACA for Wireless (MACAW) • Receiver sends an ACK when it receives a frame –Signal for neighbors to start their transmission –Its neighbors are silent until they hear ACK MACA for Wireless (MACAW) • Collision detection – No active collision detection – Known only if CTS or ACK is not received – Binary exponential back off (BEB) is used in case of collision, like in Ethernet8 802.11 Supporting Mobility • Suitable for an ad hoc configuration of nodes – May or may not be able to communicate with all other nodes – Depends upon how far apart the nodes are 802.11 Supporting Mobility • Nodes are free to move around – Set of directly reachable nodes may change over time (partial connectivity) – Topology changes over time 10 Data Motion Options for Network Adaptor Use • Direct memory access (DMA) – Adaptor gets buffer descriptor lists by host for read/write – Processor is not involved: free to do other things – Can be faster than memory copy through CPU – Startup cost 28 Data Motion DMA 100 1400 1500 … 1500 1500 Buffer descriptor list Memory buffers 29 DMA: Scatter Read, Gather Write Adaptor memory Host memory Host memory Adaptor memory Scatter Read Gather Write 30 Data Motion PIO • Frames are buffered at adaptor until CPU transfers them CPU Memory Adaptor Memory • Adaptors have 128512 KB of expensive dualport memory Host 31 Data Motion CPU Data movement path using PIO Cache $ Network adaptor memory bus Memory I/O bus to network to network Data movement path using DMA 32 Network Adaptor: Event Notification • Hardware interrupts – Processor free to do other things – Events delivered “immediately” – State (register) save/restore expensive – Context switches more 33 expensive Network Adaptor: Event Notification • Event polling –Processor must periodically check –Events wait until next check –No extra state changes 34 Device Drivers • Operating system routines anchoring protocol stack to network hardware • Initialize device, transmit frames, field interrupts • Code contains device specific details – Difficult to read but simple in logic 35 Device Drivers • Translates host’s message into format expected by the device • Sets CSR (e.g., to instruct device to transmit) 36 Programming Device Drivers • Sample device driver in P&D sec 2.9.3 • Better device driver(s) in Linux source • Key features – Memorymapped control registers – Interruptdriven – Handler code must execute quickly – Logically concurrent with other processes 37 Performance Bottlenecks • Link capacity • Processor computing power • I/O bus bandwidth – Overhead involved in each bus transfer 38 Performance Bottlenecks • Memory bus bandwidth – Memory hierarchy with cache levels – Memory accesses results in multiple memory copies in different buffers 39 Memory Bandwidth on an Alpha I/O bus 956 Mbps Main memory 4.48 Gbps CPU 16 Gbps L1 cache L2 cache crossbar 40 800 Mbps Review Lecture 13 • • • • • • • 802.11 MAC CSMA/CA Hidden and exposed nodes MACA, RTS/CTS MACAW, ACK, BEB Mobility support, partial connectivity DS, AP, scanning, active passive Frame format 41 Review Lecture 13 • Network adaptors, Workstation arch • Components of NIC, Bus + link interface, buffering, CSR • Data movement, PIO, DMA, Scatter read, gather write • Event notification, interrupt, polling • Device drivers • Performance bottlenecks 42 ... Each mobile node associates itself with an AP 11 802.11 Distribution System Distribution system AP-1 AP-3 F AP-2 A B G H C E D 12 Managing Connectivity/Roaming • How wireless nodes select Access Point ?... Passive scanning: AP periodically sends Beacon frame, advertising its capabilities Distribution system AP-1 AP-3 F AP-2 A B G H C C E D 16 Managing Mobility • Solution to handoff: AP’s send periodic beacon frames.. .Lecture? ?No.? ?13 802.11 MAC: CSMA/CA • Similar to Ethernet … – Defer the transmission until the link becomes idle