Sie sind auf Seite 1von 23

MAC layer

Taekyoung Kwon
Media access in wireless
- start with IEEE 802.11
• In wired link,
– Carrier Sense Multiple Access with Collision
Detection
– send as soon as the medium is free, listen
into the medium if a collision occurs (original
method in IEEE 802.3)
• In wireless
– Signal strength decreases in proportional to
at least square of the distance
– Collision detection only at receiver
– Half-duplex mode
– Furthermore, CS is not possible after
propagation range
Hidden terminal problem
• Hidden terminals
– A sends to B, C cannot receive A
– C wants to send to B, C senses a “free” medium (CS
fails)
– collision at B, A cannot receive the collision (CD fails)
– A is “hidden” for C

A B C
Exposed terminal problem
• Exposed terminals
– B sends to A, C wants to send to D
– C has to wait, CS signals a medium in
use
– but A is outside the radio range of C,
thus waiting is not necessary
– C is “exposed” to B
A B C D
Multiple access methods
• FDMA
• TDMA
• CDMA
• SDMA
ALOHA, Slotted-ALOHA
• Mechanism
– random, distributed (no central arbiter), time-
multiplex
– Slotted Aloha additionally uses time-slots, sending
must always start at slotcollision
boundaries
• Aloha
sender A
sender B
sender C
t
collision
• Slotted Aloha
sender A
sender B
sender C
t
MACA (multiple access
collision avoidance)
• MACA (Multiple Access with Collision
Avoidance) uses short signaling packets
for collision avoidance
– RTS (request to send): a sender request the
right to send from a receiver with a short
RTS packet before it sends a data packet
– CTS (clear to send): the receiver grants the
right to send as soon as it is ready to
receive
• aka, virtual carrier sense
MACA operation
• MACA avoids the problem of hidden terminals
– A and C want to
send to B
– A sends RTS first RTS RTS
– C waits after receiving
CTS CTS
CTS from B
A B C

• MACA avoids the problem of exposed terminals


– B wants to send to A, C
to another terminal
– now C does not have RTS RTS
to wait for it cannot
CTS CTS
receive CTS from A
A B C
PRMA
•Implicit reservation (PRMA - Packet Reservation
MA)
– a certain number of slots form a frame, frames are
repeated
– stations compete for empty slots according to the slotted
aloha principle
– once a station reserves a slot successfully, this slot is
automatically assigned to this station in all following
frames as long as the station has data to send
– competition for this slots starts again as soon as the slot
reservation
was empty in the
1 last
2 3 frame
4 5 6 7 8 time-slot
ACDABA-F
frame1 A C D A B A F
ACDABA-F
frame2 A C A B A
AC-ABAF-
frame3 A B A F collision at
A---BAFD reservation
frame4 A B A F D attempts
ACEEBAFD
frame5 A C E E B A F D
t
IEEE 802.11 wireless LAN
infrastructure
network

AP AP: Access Point

AP wired network

ad-hoc network
802.11 infrastructure
mode
•Station (STA)
– terminal with access mechanisms
802.11 LAN to the wireless medium and radio
802.x LAN
contact to the access point
•Basic Service Set (BSS)
STA1
BSS1 – group of stations using the same
Access Portal radio frequency
Point •Access Point
Distribution System – station integrated into the wireless
LAN and the distribution system
Access
ESS Point •Portal
– bridge to other (wired) networks
BSS2
•Distribution System
– interconnection network to form
one logical network (ESS:
STA2 802.11 LAN STA3 Extended Service Set) based
on several BSS
802.11 MAC requirements
802.11 MAC
• Traffic services
– Asynchronous Data Service (mandatory)
• exchange of data packets based on “best-effort”
• support of broadcast and multicast
– Time-Bounded Service (optional)
• implemented using PCF (Point Coordination Function)
• Access methods
– DFWMAC-DCF CSMA/CA (mandatory)
• collision avoidance via randomized back-off mechanism
• minimum distance between consecutive packets
• ACK packet for acknowledgements (not for broadcasts)
– DFWMAC-DCF w/ RTS/CTS (optional)
• Distributed Foundation Wireless MAC
• avoids hidden terminal problem
– DFWMAC- PCF (optional)
• access point polls terminals according to a list
802.11 layers

• PLCP Physical Layer Convergence


Protocol
– clear channel assessment
• MAC signal (carrier sense)
– access mechanisms, • PMD Physical Medium Dependent
fragmentation,
– modulation, coding
encryption
• MAC Management • PHY Management
– synchronization, – channel selection, MIB
roaming, MIB, power • Station Management
management – coordination of all
management functions
Infrastructure mode
fixed
terminal
mobile terminal

infrastructure
network

access point
application application
TCP TCP
IP IP
LLC LLC LLC
802.11 MAC 802.11 MAC 802.3 MAC 802.3 MAC
802.11 PHY 802.11 PHY 802.3 PHY 802.3 PHY
802.11 MAC
• Priorities
– defined through different inter frame spaces
– no guaranteed, hard priorities
– SIFS (Short Inter Frame Spacing)
• highest priority, for ACK, CTS, polling response
– PIFS (PCF IFS)
• medium priority, for time-bounded service using PCF
– DIFS (DCF, Distributed Coordination Function IFS)
• lowest priority, for asynchronous data service
DIFS DIFS
PIFS
SIFS
medium busy contention next frame

t
direct access if
medium is free ≥ DIFS
802.11 CSMA/CA
contention window
(randomized back-off
DIFS DIFS
mechanism)

medium busy next frame

direct access if t
medium is free ≥ DIFS slot time

– station ready to send starts sensing the medium (Carrier


Sense based on CCA, Clear Channel Assessment)
– if the medium is free for the duration of an Inter-Frame
Space (IFS), the station can start sending (IFS depends
on service type)
– if the medium is busy, the station has to wait for a free
IFS, then the station must additionally wait a random
back-off time (collision avoidance, multiple of slot-time)
– if another station occupies the medium during the back-
off time of the station, the back-off timer stops (fairness)
802.11 CSMA/CA:
contention resolution
DIFS DIFS DIFS DIFS
boe bor boe bor boe busy
station1

boe busy
station2

busy
station3

boe busy boe bor


station4

boe bor boe busy boe bor


station5
t

busy medium not idle (frame, ack etc.) boe elapsed backoff time

packet arrival at MAC bor residual backoff time


802.11 CSMA/CA: detailed
• Sending unicast packets
– station has to wait for DIFS before sending data
– receivers acknowledge at once (after waiting for
SIFS) if the packet was received correctly (CRC)
– automatic retransmission of data packets in case
of transmission errors
DIFS
data
sender
SIFS
ACK
receiver
DIFS
other data
stations t
waiting time contention
802.11: RTS & CTS
• Sending unicast packets
– station can send RTS with reservation parameter after
waiting for DIFS (reservation determines amount of time the
data packet needs the medium)
– acknowledgement via CTS after SIFS by receiver (if ready to
receive)
– sender can now send data at once, acknowledgement via
ACK
– other stations store medium reservations distributed via
RTS andDIFS
CTS
RTS data
sender
SIFS SIFS
CTS SIFS ACK
receiver

NAV (RTS) DIFS


other NAV (CTS) data
stations
t
defer access contention
802.11 beaconing
(infrastructure mode)

beacon interval

B B B B
access
point
busy busy busy busy
medium
t
value of the timestamp B beacon frame
802.11 beaconing (ad hoc
mode)
beacon interval

B1 B1
station1

B2 B2
station2

busy busy busy busy


medium
t
value of the timestamp B beacon frame random delay

Das könnte Ihnen auch gefallen