Overview of IEEE 802.11
Data Link layer Application Presentation Session Transport LLC: On transmission, assemble data into a frame with address and CRC fields. On reception, disassemble frame, perform address recognition and CRC validation. MAC controls access to the physical channel according to a predetermined set of rules Network Datalink Physical Logical Link Control (LLC) Medium Access Control (MAC)
Wireless Medium: A Chaotic Environment
The Design Challenges are... Medium access to shared medium Noisy and unreliable wireless channel... Collision detection is not possible always... Mobility changes neighbor set
Reservation-based Two approaches Contention-based
Reservation-based Two approaches - TDMA (slotted access to channel) - requires tight coordination - requires time synchronization - grows with n - FDMA (Frequency is divided)
Reservation-based Two approaches - TDMA (slotted access to channel) - requires tight coordination - requires time synchronization - grows with n - FDMA (Frequency is divided) Contention-based - Works nicely for single shared wireless channel. - More suitable for ad hoc wireless network
Contention based MAC: IEEE 802.11 Infrastructure based Without infrastructure
IEEE 802.11 with Access Point
Hybrid Network
But we will discuss on ad hoc wireless networks No Access Point Coordination is more difficult IEEE 802.11--Two modes of operation: DCF (Distributed Coordination Function) Appropriate for ad hoc wireless networks No controller PCF (Point Coordination Function) Appropriate for networks with AP AP controls medium access
Inter Frame Spacing (IFS) SIFS, Slot time, DIFS (from shortest to longest) SIFS (Short Inter frame space) Provides highest priority access to the channel Defined for short control messages For example between data and ACK DIFS (Distributed inter-frame space) Used by stations that are operating under the DCF mode. Some math: SIFS < Slot time < DIFS DIFS = SIFS + 2*Slot time
Parameters at a glance (IEEE 802.11b Standard) DIFS duration 50 micro seconds Slot time 20 micro seconds SIFS duration 10 micro seconds
Rules to consider for MAC protocols When should I access the channel What should I do if collision occurs How would I know whether my transmission was successful How can I ensure that I am sharing the channel fairly with my neighbors
We will now see how these rules are set for IEEE 802.11
Rule 1: When to access the channel? ALOHA - Transmit whenever you want (LIFE IS GOOD.. ;-) - Frequent chances of collisions - Low channel utilization (18%) A B C D
Rule 1: When to access the channel? Slotted ALOHA - Transmit only at the beginning of a slot - Chances of collisions halved - Channel utilization doubled (36%) A B C D
Rule 1: When to access the channel? CSMA (Carrier Sense Multiple Access) - Listen before you talk CS part Carrier Sensing - Physical carrier sensing If received signal strength on antenna is larger than some threshold then medium is busy (RSSI-received signal strength indicator) - Virtual Carrier sensing Discussed later on
Physical Carrier Sensing illustrated DIFS- Distributed (DCF) Inter-Frame space duration 50 micro seconds
CSMA/?? CD or CA? Collision Detection is not always possible Full duplex radio device (capable of transmitting and receiving at once) is very costly Successful transmission does not mean a successful reception (see next slide)
Physical Carrier Sensing is not good enough A B C The hidden-station problem Collision occurs
Solution: Virtual Carrier sensing
Virtual Carrier Sensing
Virtual Carrier Sensing RTS CTS
Formally VCS Duration field RTS DATA Sender CTS ACK Receiver Blue/red Node NAV (BSY) Virtual CS Yellow Node NAV (BSY)
RTS and CTS frame formats RTS CTS
When four-way handshake is used? Not for broadcast packets Doesn t make any sense For short unicast packets (not used) RTS-CTS part introduces overhead For long unicast packets Makes sense Long data packets are protected by RTS-CTS dialogue In summary There is a parameter called RTSThreshold_ If packet size is less than RTSTHreshold_ use two-way handshake (DATA_ACK) Otherwise use four way handshake
Rule 2: What if collision occurs? Back off to a random point in time and try again
Binary Exponential Back off (BEB) When BEB is used When medium is found busy either by Physical or Virtual CS (to avoid collisions) When collision occurs (to resolve contention) After every successful transmission (to deal with fairness)
BEB explained Back off Try later IEEE 802.11 uses binary exponential back off (BEB) Think about visually impaired human being Choose a random number and start counting down Choose a random number between [0, CW] CW is called contention window Suppose the random number is n Count n idle slots before transmission Pause if medium becomes busy during count down
Back-off illustrated Back off for 14 slots Slot time 20 micro seconds
Back-off illustrated (previous example ) DIFS- Distributed (DCF) Inter-Frame space duration 50 micro seconds
Why Back-off is called exponential After every unsuccessful attempts double CW CW min = 31 CW max = 1023 BEB CW 1200 1000 800 600 400 200 0 0 2 4 6 8 Attempts BEB
Rule 3: Detecting successful transmission Collision detection is absent Not a CSMA/CD like Ethernet, it is a CSMA/CA For unicast packets Provision for Acknowledgement Absent of ACK means unsuccessful transmission Take few attempts (don t try for ever) Short retry limit (typically 7) used for short packets Long retry limit (typically 5) used for long packets Probability of failure in consecutive attempts is pretty low For broadcast packets No way to know..
ACK illustrated DIFS RTS DATA Sender CTS SIFS ACK Receiver SIFS Note that DATA is followed by ACK after SIFS duration
Rule 4: Fairness issue Back off after every successful transmission What will happen if station 1 has more packet to transmit at this moment
Rule 4: Fairness issue (unhandled fairness issue) Back off after every unsuccessful attempt What will happen if this frame experiences collision
Parameters at a glance Tunable parameters Short retry limit Long retry limit Physical CS threshold RTS threshold
Putting Pieces Together Work out how duration fields are calculated?
State diagram