Medium Access Control IEEE 802.11, Token Rings Wireless channel is a shared medium Need access control mechanism to avoid interference Why not CSMA/CD? 9/15/06 CS/ECE 438 - UIUC, Fall 2006 1 9/15/06 CS/ECE 438 - UIUC, Fall 2006 2 Ethernet MAC Algorithm CSMA/CD in WLANs? Most (if not all) radios are half-duplex Node A Node B Listening while transmitting is not possible Collision might not occur at sender Collision at receiver might not be ⊗ detected by sender! Listen for carrier sense before transmitting Collision: What you hear is not what you sent! 9/15/06 CS/ECE 438 - UIUC, Fall 2006 3 9/15/06 CS/ECE 438 - UIUC, Fall 2006 4 MACA Solution for Hidden Hidden Terminal Problem Terminal Problem Node B can communicate with both A and C When node A wants to send a packet to node B Node A first sends a Request-to-Send (RTS) to A A and C cannot hear each other On receiving RTS When A transmits to B, C cannot detect the Node A responds by sending Clear-to-Send (CTS) transmission using the carrier sense mechanism provided node A is able to receive the packet If C transmits, collision will occur at node B When a node C overhears a CTS, it keeps quiet for the duration of the transfer A B C DATA DATA RTS C’s signal A’s signal CTS CTS strength strength A B C A B C space 9/15/06 CS/ECE 438 - UIUC, Fall 2006 5 9/15/06 CS/ECE 438 - UIUC, Fall 2006 6 1
MACA Solution for Exposed Exposed Terminal Problem Terminal Problem B talks to A Sender transmits Request to Send (RTS) C wants to talk to D Receiver replies with Clear to Send (CTS) C senses channel and finds it to be busy Neighbors C stays quiet (when it could have ideally See CTS - Stay quiet transmitted) See RTS, but no CTS - OK to transmit RTS RTS RTS RTS RTS CTS CTS A B C D A B C D 9/15/06 CS/ECE 438 - UIUC, Fall 2006 7 9/15/06 CS/ECE 438 - UIUC, Fall 2006 8 Collisions Reliability Still possible Wireless links are prone to errors RTS packets can collide! High packet loss rate detrimental to Binary exponential backoff transport-layer performance Backoff counter doubles after every collision and reset to minimum value after successful transmission Mechanisms needed to reduce packet Performed by stations that experience RTS collisions loss rate experienced by upper layers RTS collisions not as bad as data collisions in CSMA Since RTS packets are typically much smaller than DATA packets 9/15/06 CS/ECE 438 - UIUC, Fall 2006 9 9/15/06 CS/ECE 438 - UIUC, Fall 2006 10 A Simple Solution to Improve Revisiting the Exposed Reliability - MACAW Terminal Problem When node B receives a data packet from Problem Exposed terminal solution doesn't consider CTS at node C node A, node B sends an With RTS-CTS, C doesn’t wait since it doesn’t hear Acknowledgement (ACK) A’s CTS If node A fails to receive an ACK With B transmitting DATA, C can’t hear intended receiver’s CTS Retransmit the packet C trying RTS while B is transmitting is useless RTS RTS RTS RTS CTS CTS DATA CTS CTS A B C ACK A B C D ACK 9/15/06 CS/ECE 438 - UIUC, Fall 2006 11 9/15/06 CS/ECE 438 - UIUC, Fall 2006 12 2
Revisiting the Exposed Terminal Problem - MACAW Deafness One solution For the scenario below Node A sends an RTS to B Have C use carrier sense before RTS While node C is receiving from D, Alternative Node B cannot reply with a CTS B sends DS (data sending) packet before DATA: B knows that D is sending to C A keeps retransmitting RTS and increasing its own BO Short packet lets C know that B received A’s timeout CTS RTS RTS Includes length of B’s DATA so C knows how long to wait CTS CTS A B C D 9/15/06 CS/ECE 438 - UIUC, Fall 2006 13 9/15/06 CS/ECE 438 - UIUC, Fall 2006 14 Interframe Spacing IEEE 802.11 - CSMA/CA Interframe spacing Sensing the medium If free for an Inter-Frame Space (IFS) Plays a large role in coordinating access to the Station can start sending (IFS depends on service type) transmission medium If busy Varying interframe spacings Station waits for a free IFS, then waits a random back-off time Creates different priority levels for different types of traffic! (collision avoidance, multiple of slot-time) If another station transmits during back-off time 802.11 uses 4 different interframe spacings The back-off timer stops (fairness) contention window DIFS DIFS DIFS DIFS (randomized back-off PIFS mechanism) SIFS medium busy contention next frame medium busy next frame t direct access if direct access if t medium is free ≥ DIFS medium is free ≥ DIFS slot time 9/15/06 CS/ECE 438 - UIUC, Fall 2006 15 9/15/06 CS/ECE 438 - UIUC, Fall 2006 16 Types of IFS Types of IFS SIFS PIFS Short interframe space PCF interframe space Used for highest priority transmissions Minimum idle time for contention-free RTS/CTS frames and ACKs service (>SIFS, <DIFS) DIFS EIFS DCF interframe space Extended interframe space Minimum idle time for contention-based Used when there is an error in services (> SIFS) transmission 9/15/06 CS/ECE 438 - UIUC, Fall 2006 17 9/15/06 CS/ECE 438 - UIUC, Fall 2006 18 3
Backoff Interval DCF Example When transmitting a packet, choose a B1 = 25 B1 = 5 backoff interval in the range [0,cw] wait data cw is contention window Count down the backoff interval when data wait medium is idle B2 = 10 B2 = 20 B2 = 15 Count-down is suspended if medium becomes busy When backoff interval reaches 0, transmit B1 and B2 are backoff intervals RTS cw = 31 at nodes 1 and 2 9/15/06 CS/ECE 438 - UIUC, Fall 2006 19 9/15/06 CS/ECE 438 - UIUC, Fall 2006 20 Backoff Interval Backoff Interval The time spent counting down backoff The number of nodes attempting to intervals is a part of MAC overhead transmit simultaneously may change with time Large cw Some mechanism to manage contention Large backoff intervals is needed Can result in larger overhead IEEE 802.11 DCF Small cw Contention window cw is chosen larger number of collisions (when two dynamically depending on collision nodes count down to 0 simultaneously) occurrence 9/15/06 CS/ECE 438 - UIUC, Fall 2006 21 9/15/06 CS/ECE 438 - UIUC, Fall 2006 22 Binary Exponential Backoff in DCF Token Ring When a node fails to receive CTS in Example Token Ring Networks response to its RTS, it increases the IBM: 4Mbps token ring IEEE 802.5: 16Mbps contention window cw is doubled (up to an upper bound) When a node successfully completes a data transfer, it restores cw to Cw min cw follows a sawtooth curve 9/15/06 CS/ECE 438 - UIUC, Fall 2006 23 9/15/06 CS/ECE 438 - UIUC, Fall 2006 24 4
Token Ring Token Ring Why emulate a shared medium with point- Focus on Fiber Distributed Data Interface (FDDI) to-point links? 100 Mbps Was (not is) a candidate to replace Ethernet Why a shared medium? Used in some MAN backbones (LAN interconnects) Convenient broadcast capabilities Outline Switches costly Rationale Why emulation? Topologies and components Simpler MAC algorithm MAC algorithm Fairer access arbitration Priority Fully digital (802.3 collision detection requires Feedback analog) Token management 9/15/06 CS/ECE 438 - UIUC, Fall 2006 25 9/15/06 CS/ECE 438 - UIUC, Fall 2006 26 Token Ring: Topology and Components Token Ring: Dual Ring Relay Example Token Ring Networks FDDI: 1000Mbps Single Relay Fiber Distributed Data Interface Multistation access units Host Host Host Host Host From To From To Previous Next Previous Next From Previous Host Host Host Host MSAU Relay Relay Host To Next MSAU 9/15/06 CS/ECE 438 - UIUC, Fall 2006 27 9/15/06 CS/ECE 438 - UIUC, Fall 2006 28 FDDI Multistation Access Unit Dual ring configuration Each station imposes a delay Self-healing E.g. 50 ms Normal flow in green direction Maximum of 500 Stations Can detect and recover from one failure Upper limit of 100km ⊗ Need 200km of fiber ⊗ Uses 4B/5B encoding Can be implemented over copper 9/15/06 CS/ECE 438 - UIUC, Fall 2006 29 9/15/06 CS/ECE 438 - UIUC, Fall 2006 30 5
Recommend
More recommend