Unit 7 Media Access Control (MAC) 1
Internet Model 2
Sublayers of Data Link Layer Logical link control (LLC) Flow control Error control Media access control (MAC) access control 3
Categorization of MAC Protocols 4
Random Access When can a station access the medium? What can a station do if the medium is busy? How can a station determine the success or failure of its transmission? What can a station do if there is an access conflict? 5
Aloha Two rules Multiple access: a station sends a frame when it has a frame to send. Acknowledgment: the station waits for an ACK after its transmission. Retransmission if needed. Random backoff time to resolve collisions again. Maximum retransmission attempts The maximum utilization of the channel is only about 18% because of the rising of the number of collisions. 6
Aloha (contd.) 7
Aloha (contd.) 8
Slotted Aloha Slot time = frame transmission time Need one synchronization mechanism. Improve the maximum utilization to about 37%. 9
CSMA A station wishing to transmit first listens to the medium. Medium is busy the station just waits. Medium is idle the station may transmit. ACKs indicate successful data deliveries. 10
Nonpersistent CSMA Medium is idle transmit frames Medium is busy wait a random amount of time and then sense again. 11
1-persistent CSMA Medium is idle transmit frames Medium is busy continue listening until the channel is sensed idle; then transmit immediately. 12
P-persistent CSMA Step 1: channel sensing Medium is idle transmit frames immediately with probability p or delay transmission with probability (1-p). Medium is busy backoff procedure. Step 2: delay time setting Delay time = maximum propagation delay. Go to step 1. How to define p value? Assume n active stations The expected number of stations attempting to transmit is np. np 1 13
Persistence Strategies 14
CSMA/CD Step 1: if medium is idle, transmit; otherwise, go to step 2. Step 2: if medium is busy, continue to listen until the channel is idle, then transmit immediately. Step 3: if a collision is detected during transmission, transmit a brief jamming signal. Step 4: wait a random amount of time, then attempt to transmit again (repeat from step 1). Collision exponential backoff Waiting time = [0, 2 N maximum_propagation_time] N: the number of attempted transmissions. 15
CSMA/CD (contd.) 16
Random Access (contd.) Energy levels: zero, normal, abnormal 17
CSMA/CA Wired: double energy = collision occurs. Wireless: collision only adds 5%~10% energy no effective way to do collision detection. Three avoidance strategies: interframe space, contention window, acknowledgment. 18
CSMA/CA (contd.) 19
IEEE 802.11 20
MAC Sublayers Distributed coordination function (DCF) Point coordination function (PCF): optional in an infrastructure network 21
DCF Access method: CSMA/CA. Implemented in all stations and APs. Used within both ad hoc and infrastructure configurations. Three interframe spaces (IFS) values to enable priority access: Short IFS (SIFS) Point coordination function IFS (PIFS) Distributed coordination function IFS (DIFS) 22
DCF (contd.) All packets should be acknowledged (through ACK frame) immediately and positively. If medium is sensed idle, a STA defers a DIFS gap, then transmit MPDUs. Otherwise the STA waits till the channel becomes idle; defers a DIFS gap more, generates a random backoff period for an additional deferral time. 23
DCF (contd.) 24
DCF (contd.) Network Allocation Vector (NAV) 25
DCF (contd.) Backoff procedure The Backoff Timer should be frozen when medium is busy. The timer should be resumed only when the medium is free for a period > DIFS. Transmission shall commence whenever the Backoff Timer reaches 0. 26
DCF (contd.) Priority scheme SIFS: the highest priority ACK, CTS, data frame of a fragmented MSDU (i.e., continuous frames), and to respond to a poll from the PCF. PIFS (PCF-IFS): 2 nd highest By PCF to send any of the Contention Free Period frames. DIFS (DCF-IFS): 3 rd highest By DCF to transmit asynchronous MPDUs. EIFS (extended IFS): lowest Used when the carrier switches from idle to busy (but the information in the carrier can not be correctly decoded). 27
DCF (contd.) Protocol range Transmission range Within this range, packets can receive and decode correctly. Carrier sensing range Within this range, sender s transmission can be sensed. Carrier sensing zone When a node is within the carrier sensing zone, it can sense the signal but cannot decode it correctly. 28
DCF (contd.) NAV setting EIFS should be longer than that of ACK transmission. 29
DCF (contd.) Hidden terminal problem BA && CA B and C are hidden terminals. Solution: RTS + CTS. 30
DCF (contd.) Exposed terminal problem AB && CD A and C are exposed terminals. No effective solution. 31
DCF (contd.) 32
DCF (contd.) RTS/CTS options Never use RTS/CTS; Always use RTS/CTS; Use RTS/CTS whenever the MPDU exceeds the value to RTS_Threshold. 33
DCF (contd.) Conditions of channel release All fragments of a MSDU have been sent; An ACK is not received; It will attempt to retransmit the fragment at a later time (according to the backoff algorithm) and go through the contention procedure again. NAV setting?? A dwell time boundary is reached (TXOP). 34