Upload
bernard-morris
View
251
Download
0
Embed Size (px)
DESCRIPTION
3 The MAC Sublayer Protocol Interframe spacing in
Citation preview
1
802.11 MAC Sublayer• MAC layer tasks:
–Control medium access–Roaming, authentication, power conservation
• Traffic services–DCF (Distributed Coordination Function)
(mandatory): Asynchronous Data Service• Only service available in ad-hoc network mode• does not use any kind of central control• exchange of data packets based on “best-effort”• support of broadcast and multicast
–PCF (Point Coordination Function) (optional): Time-Bounded Service• uses the base station to control all activity in its cell
2
802.11 MAC Sublayer• PCF and DCF can coexist within one cell by carefully defining
the interframe time interval. The four intervals are depicted:– SIFS (Short InterFrame Spacing) is used to allow the parties in a single
dialog the chance to go first including letting the receiver send a CTS and an ACK and the sender to transmit the next fragment.
– PIFS (PCF InterFrame Spacing) is used to allow the base station to send a beacon frame or poll frame.
– DIFS (DCF InterFrame Spacing) is used to allow any station to grab the channel and to send a new frame.
– EIFS (Extended InterFrame Spacing) is used only by a station that has just received a bad or unknown frame to report the bad frame.
• The result MAC scheme used in 802.11 is carrier sensing multiple access with collision avoidance (CSMA/CA) that is based on MACAW.– Use NAV (Network Allocation Vector) to indicate the channel is busy.
3
The 802.11 MAC Sublayer Protocol
Interframe spacing in 802.11.
4
802.11 MAC Sublayer• Access methods
– DFWMAC-DCF (distributed foundation wireless medium access control- Distributed Coordination Function) 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)• avoids hidden terminal problem
– DFWMAC- PCF (Point Coordination Function) (optional)• access point polls terminals according to a list• Completely controlled by the base station. No collisions occur.• A beacon frame which contains system parameters is periodically (10 to 100
times per second) broadcasted to invite new stations to sign up for polling service.
5
t
medium busy
DIFSDIFS
next frame
contention window(randomized back-offmechanism)
802.11 - CSMA/CA access method
• 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)
slot timedirect access if medium is free DIFS
6
802.11 - Competing Stations
t
busy
boe
station1
station2
station3
station4
station5
packet arrival at MAC
DIFSboe
boe
boe
busy
elapsed backoff time
bor residual backoff time
busy medium not idle (frame, ack etc.)
bor
bor
DIFS
boe
boe
boe bor
DIFS
busy
busy
DIFSboe busy
boe
boe
bor
bor
7
802.11 - CSMA/CA access method• 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
t
SIFS
DIFS
data
ACK
waiting time
otherstations
receiver
sender data
DIFS
contention
8
802.11 – DFWMAC• Sending unicast packets
– station can send RTS with reservation parameter (transmission duration) 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 set its net allocation vector (NAV) in accordance with the
duration field.
t
SIFS
DIFS
data
ACK
defer access
otherstations
receiver
sender data
DIFS
contention
RTS
CTSSIFS SIFS
NAV (RTS)NAV (CTS)
9
Fragmentation
t
SIFS
DIFS
data
ACK1
otherstations
receiver
senderfrag1
DIFS
contention
RTS
CTSSIFS SIFS
NAV (RTS)NAV (CTS)
NAV (frag1)NAV (ACK1)
SIFSACK2
frag2
SIFS
The deal with the problem of noisy channels, 802.11 allows frames to be fragmented.
10
DFWMAC-PCF
PIFS
stations‘NAV
wirelessstations
point coordinator
D1
U1
SIFS
NAV
SIFSD2
U2
SIFS
SIFS
SuperFramet0
medium busy
t1
A super frame comprises a contention-free period and a contention period.• D for downstream• U for upstream• CF for an end maker
11
DFWMAC-PCF
tstations‘NAV
wirelessstations
point coordinator
D3
NAV
PIFSD4
U4
SIFS
SIFSCFend
contentionperiod
contention free period
t2 t3 t4
12
802.11 MAC Frame format• Types
– control frames, management frames, data frames• Sequence numbers
– important against duplicated frames due to lost ACKs • Addresses
– receiver, transmitter (physical), BSS identifier, sender (logical)• Miscellaneous
– sending time, checksum, frame control, data
FrameControl
Duration/ID
Address1
Address2
Address3
SequenceControl
Address4 Data CRC
2 2 6 6 6 62 40-2312bytes
Protocolversion Type Subtype To
DSMoreFrag Retry Power
MgmtMoreData WEP
2 2 4 1FromDS
1
Order
bits 1 1 1 1 1 1
13
MAC address formatscenario to DS from
DSaddress 1 address 2 address 3 address 4
ad-hoc network 0 0 DA SA BSSID -infrastructurenetwork, from AP
0 1 DA BSSID SA -
infrastructurenetwork, to AP
1 0 BSSID SA DA -
infrastructurenetwork, within DS
1 1 RA TA DA SA
DS: Distribution SystemAP: Access PointDA: Destination AddressSA: Source Address
BSSID: Basic Service Set IdentifierRA: Receiver AddressTA: Transmitter Address
Ad-hoc network: packet exchanged between two wireless nodes without a distribution system
Infrastructure network, from AP: a packet sent to the receiver via the access point
Infrastructure network, to AP: a station sends a packet to another station via the access point
Infrastructure network, within DS: packets transmitted between two access points over the distribution system.
14
Special Frames: ACK, RTS, CTS• Acknowledgement
• Request To Send
• Clear To Send
FrameControl Duration Receiver
AddressTransmitterAddress CRC
2 2 6 6 4bytes
FrameControl Duration Receiver
Address CRC
2 2 6 4bytes
FrameControl Duration Receiver
Address CRC
2 2 6 4bytes
ACK
RTS
CTS
15
802.11 - MAC management• Synchronization
– try to find a LAN, try to stay within a LAN– Synchronize internal clocks and generate beacon signals
• Power management– periodic sleep, frame buffering, traffic measurements – sleep-mode without missing a message
• Roaming for Association/Reassociation– integration into a LAN– roaming, i.e. change networks by changing access points – scanning, i.e. active search for a network
• MIB - Management Information Base– All parameters representing the current state of a wireless station and
an access point are stored in a MIB.– A MIB can be accessed via SNMP.
16
Synchronization using a Beacon (infrastructure)
beacon interval
tmedium
accesspoint
busy
B
busy busy busy
B B B
value of the timestamp B beacon frame
Timing synchronization function (TSF) is needed for:• Power management• Coordination of the PCF and for synchronization of the hopping
sequence A beacon contains a timestamp and other management
information. The access point tries to schedule transmissions according to
the excepted beacon interval (target beacon transmission time).
17
Synchronization using a Beacon (ad-hoc)
tmedium
station1
busy
B1
beacon interval
busy busy busy
B1
value of the timestamp B beacon frame
station2
B2 B2
random delay
The standard random backoff algorithm is also applied to the beacon frames in the ad-hoc networks.