Date post: | 03-Apr-2018 |
Category: |
Documents |
Upload: | zaka-choudhary |
View: | 218 times |
Download: | 0 times |
of 32
7/29/2019 Data Link Layer - Wi Fi
1/32
Lecturer: Anjum Naveed
7/29/2019 Data Link Layer - Wi Fi
2/32
Architectures Stations
BSS (One AP and Stations connected to it)
IBSS (Ad Hoc, without AP) ESS (Set of connected BSS)
DS (Connects APs of ESS)
Wired
Wireless
Mesh
WDS
2
7/29/2019 Data Link Layer - Wi Fi
3/32
DLL Services
3
Framing
7/29/2019 Data Link Layer - Wi Fi
4/32
Framing
4
FC, Duration, Address 1 and FCS are mandatory
7/29/2019 Data Link Layer - Wi Fi
5/32
Important Frame types Management
Beacon
Authentication
Association (Req/Resp) Reassociation (Req/Resp)
Control
RTS
CTS ACK
CF-End
5
7/29/2019 Data Link Layer - Wi Fi
6/32
Addressing 48 bit MAC addresses are used
Locally administered
Globally administered
6
7/29/2019 Data Link Layer - Wi Fi
7/32
Error Control CRC based error detection used at MAC layer
Re-transmissions used for correction
Keep in mind the physical layer FEC
7
7/29/2019 Data Link Layer - Wi Fi
8/32
Flow Control One packet sent at a time
Data rate adjusted based on BER through adaptivemodulation and encoding (AMC)
8
7/29/2019 Data Link Layer - Wi Fi
9/329
7/29/2019 Data Link Layer - Wi Fi
10/3210
7/29/2019 Data Link Layer - Wi Fi
11/3211
The Channel Allocation Problem How to allocate a single broadcast channel among
competing users?
Two possibilities Static channel allocation
Dynamic channel allocation
Our Concern
7/29/2019 Data Link Layer - Wi Fi
12/32
12
Dynamic Channel Allocation Protocols or
Medium Access Control Protocols ALOHA
Pure ALOHA
Slotted ALOHA
CSMA 1-Persistent CSMA
Non-Persistent CSMA
p-Persistent CSMA
CSMA/CD
CSMA/CA
Collision free protocols Token ring (we will not study these protocols)
7/29/2019 Data Link Layer - Wi Fi
13/32
13
Pure ALOHA Uncoordinated stations are contesting for the use of a
single shared channel
Algorithm Stations transmit whenever they have something
to send
Colliding frames will be destroyed
If destroyed (detected via self sensing), the
sender waits a random amount of time and sends
frame again
SLOTTED ALOHA is synchronous variant where framescan only be transmitted at start of a centrally controlledslot size of slot is equal to frame size
7/29/2019 Data Link Layer - Wi Fi
14/32
14
7/29/2019 Data Link Layer - Wi Fi
15/32
15
CSMA Protocols There are several types of CSMA protocols
1-Persistent CSMA
Non-Persistent CSMA p-Persistent CSMA
7/29/2019 Data Link Layer - Wi Fi
16/32
16
1-persistent CSMA When a station has to send data
1. It listens to the channel
1. If idle, transmits a frame
2. If not, monitors continuously and waits until it becomes idleand transmits at this stage
2. If collision occurs, waits a random amount of time andstarts all over again
7/29/2019 Data Link Layer - Wi Fi
17/32
17
Non-persistent CSMA When a station has to send data
1. It listens to the channel
1. If idle, transmits a frame
2. If not, waits for a random amount of time and repeats thealgorithm
2. If collision occurs, waits a random amount of time andstarts all over again
7/29/2019 Data Link Layer - Wi Fi
18/32
18
p-Persistent CSMAApplies to time-slotted channels
When a station has to send data
It listens to the channel If channel is idle, it transmits with a probability ofp
With probabilityq = 1 - p it defers until the next slot
If that slot is also idle, it either transmits or defers again
with probabilities p and q
7/29/2019 Data Link Layer - Wi Fi
19/32
19
CSMA with Collision Detection In CSMA protocols
If two stations begin transmitting at the same time, eachwill transmit its complete packet, thus wasting the
channel for an entire packet time In CSMA/CD
The transmission is terminated immediately upon thedetection of a collision (saves time & bandwidth)
Try again later after waiting a random amount of time
This protocol is widely used on LANs (e.g., Ethernet uses1-persistant CSMA/CD)
7/29/2019 Data Link Layer - Wi Fi
20/32
20
CSMA with Collusion Avoidance Before transmitting data:
Transmitter transmits a short frame RTS, informing itsneighbours and receiver of the transmission
Receiver replies with CTS if its not involved in transmission,informing its own neighbours and transmitter allowingtransmission.
Data is transmitted only after receiving CTS.
SELF ASSIGNMENT: What problems are solved by this protocol? What problems are not solved? Why is this protocol required when we have CSMA/CD?
To be discussed at the end of class (time permitting)
7/29/2019 Data Link Layer - Wi Fi
21/32
21
7/29/2019 Data Link Layer - Wi Fi
22/32
802.11 MAC Sublayer 802.11 supports four modes of operation
DCF (Distributed Coordination Function) which doesnot use any kind of central control
PCF (Point Coordination Function) which uses the basestation to control all activity in its cell
HCF (Hybrid Coordination Function)
MCF (Mesh Coordination Function)
All implementations of 802.11 must support DCF butPCF is optional
QoS enabled must support HCF and Mesh enabledmust support MCF
22
7/29/2019 Data Link Layer - Wi Fi
23/32
7/29/2019 Data Link Layer - Wi Fi
24/32
DCFWhen DCF is employed, 802.11 uses P-persistent
CSMA/CA Station intending transmission senses the channel
If channel is idle, starts transmission with probability p No sensing during transmission (Unlike CSMA/CD)
If the channel is busy, defers until channel goes idle andthen continue sensing
If a collision occurs, the colliding stations wait arandom time, using the binary exponential backoffalgorithm, and then try again later
24
7/29/2019 Data Link Layer - Wi Fi
25/32
Transmission?? Station A -> Station B Extended mode
A transmits RTS frame
B receives this request, it may decide to grantpermission, in which case it sends a CTS frame back A Receives CTS, A now sends its frame and starts an
ACK timer Upon correct receipt of the data frame, B responds with
an ACK frame, terminating the exchange If As ACK timer expires before the ACK gets back to it,
the whole protocol is run again
Basic Mode RTS & CTS are optional for short frames
25
7/29/2019 Data Link Layer - Wi Fi
26/32
26
The use of virtual channel sensing using CSMA/CA
Virtual Channel Sensing
7/29/2019 Data Link Layer - Wi Fi
27/32
7/29/2019 Data Link Layer - Wi Fi
28/32
28
7/29/2019 Data Link Layer - Wi Fi
29/32
PCF AP broadcasts a beacon frame periodically (10 - 100 times per second)
Between the sending of beacon frames, PCF splits the time into acontention-free period and a contention period During contention-free period, AP sequentially polls the registered
stations
A poll can contain data for the station
Response to poll can be data to AP/other station or empty frame
Contention period uses DCF Why is contention period required?
Once a station signs up for polling service at a certain rate, it iseffectively guaranteed a certain fraction of the bandwidth
29
7/29/2019 Data Link Layer - Wi Fi
30/32
PCF & NAV Power Management
Power is a big issue in mobile wireless devices
Using PCF, AP can direct a mobile device to go to sleepstate
This is specifically used for contention free period
30
7/29/2019 Data Link Layer - Wi Fi
31/32
Inter-frame spacing in 802.11 PCF and DCF can coexist within one cell
SIFS (Short Inter-Frame Spacing)
PIFS (PCF Inter-Frame Spacing)
DIFS (DCF Inter-Frame Spacing) EIFS (Extended Inter-Frame Spacing)
31
Fixed values
per PHY
7/29/2019 Data Link Layer - Wi Fi
32/32
Reading Giuseppe Bianchi. Performanceanalysis of the ieee
802.11 distributed coordination function. IEEE Journalon Selected Areas in Communications, 18(3), March
2000.
Piyush Gupta and P. R. Kumar. The capacity of wireless
networks. IEEE Transections on Information Theory,46(2), March 2000.
32