Download presentation
Presentation is loading. Please wait.
1
Protocols and the TCP/IP Suite
Introduction to Chapter 2
2
Protocols and the TCP/IP Suite
Wireless LANs: Supports both Asynchronous data transfer and time bound services Asynchronous: traffic insensitive to time - , FTP Time bound services: sensitive to time - voice traffic Different MAC strategies to support these classes of traffic Asynchronous traffic is supported through Distributed Co-ordination Function (DCF) Time bound traffic is supported through Point Co-ordination Function (PCF) DCF is mandatory, while PCF is optional Chapter 2
3
Protocols and the TCP/IP Suite
Terminologies BSS: Basic service set Group of stations under the direct control of a single co-ordination function All stations in a BSS can directly communicate with each other, without any infrastructure Extended BSS: Multiple interconnected access points have the same SSID BSSID the MAC address of the access point IBSS: BSS for ad hoc networks (without an access point) SSID is selected by the node that starts the ad hoc network BSSID is a random number generated by the node that starts the ad hoc network Chapter 2
4
Protocols and the TCP/IP Suite
Terminologies Access Point (AP): Similar to the base station in cellular network Supports range extension by providing network connectivity between multiple BSSs Multiple BSSs are connected together through a Distribution System (DS) DS is similar to a backbone network e.g., ethernet-based LAN BSSs connected by a DS form an Extended Service Set (ESS) Chapter 2
5
Protocols and the TCP/IP Suite
Terminologies PORTAL: Acts as the gateway to other networks Chapter 2
6
Protocols and the TCP/IP Suite
Chapter 2
7
Protocols and the TCP/IP Suite
MAC Sub-layer Transmission medium can Operate only in contention mode, called as Contention Period - CP Alternate between contention & contention free modes In contention free mode, the medium access is controlled by the AP Contention Free mode is also known as Contention Free Period (CFP) Chapter 2
8
Protocols and the TCP/IP Suite
MAC Frames Management Frames: Used for Station association, dissociation, timing and synchronization, authentication Control Frames: Used for Handshaking during CP (RTS/CTS) ACK frames during CP Data Frames: Used for Sending data during CP and CFP Chapter 2
9
Protocols and the TCP/IP Suite
802.11: DCF Fundamental channel access method in Used by asynchronous data services Basis for PCF Based on CSMA/CA (Collision Avoidance) Collision detection is not used, because a station cannot listen to the (air) channel for collisions when transmitting Chapter 2
10
Protocols and the TCP/IP Suite
Two basic challenges Because of interference, near by nodes cannot transmit at the same time objective: don’t transmit if some other node is transmitting (easier said than done) approach: listen to the channel before transmitting Exposed terminal A transmitter is unaware than its transmission would succeed without causing any losses Hidden node problem The transmitter is unaware that another nodes is already transmitting, so the transmission fails Chapter 2
11
Protocols and the TCP/IP Suite
802.11: DCF – Carrier Sensing Two kinds of sensing Physical carrier sensing Takes place at the air interface Detects signal strength from other sources Virtual Carrier Sensing Takes place at the MAC layer (explained shortly) Channel is said to be idle only when both the sensing mechanisms report ‘idle’ Chapter 2
12
Protocols and the TCP/IP Suite
802.11: DCF – Basic Operation Inter frame space (IFS): Time interval between transmission of frames Three IFS values are specified DCF-IFS (DIFS) PCF-IFS (PIFS) Short-IFS (SIFS) SIFS < PIFS < DIFS Priority access to the medium is controlled through these three IFS intervals Chapter 2
13
Protocols and the TCP/IP Suite
802.11: DCF – Basic Operation A station wanting to transmit, senses the medium If it is idle, waits for DIFS interval, and senses again If the medium is free, frame is transmitted If the receiver gets the frame correctly, it sends an ACK to the sender after a SIFS interval Chapter 2
14
DCF – Data Transmission
Protocols and the TCP/IP Suite DCF – Data Transmission Chapter 2
15
Protocols and the TCP/IP Suite
DCF – Basic Operation If the medium is found to be busy either in step 1 or 2, back-off procedure is invoked What is back-off? How is idle detected? Clear Channel Assessment If the received signal strength exceeds the CCA, the channel is declared to be busy Note that this does not require locking to the carrier, just signal strength NAV (Network Allocation Vector) or virtual channel sensing This required decoding transmissions Chapter 2
16
DCF – Virtual Carrier Sensing
Protocols and the TCP/IP Suite DCF – Virtual Carrier Sensing The MAC header has the ‘duration’ field, which indicates for how long the sender wants to hold the medium Other stations read this field, and adjust a parameter called ‘Network Allocation Vector’ (NAV) NAV indicates the amount of time that must elapse until the channel can be sampled again for idle status NAV value thus indirectly indicates if the channel is free at any given time Using NAV value to determine channel status is called as ‘Virtual Carrier Sensing’ Chapter 2
17
DCF – Data Transmission
Protocols and the TCP/IP Suite DCF – Data Transmission Note: even if “other” cannot hear “destination,” it still considers the channel busy when the destination is transmitting the ACK Chapter 2
18
Protocols and the TCP/IP Suite
DCF with RTS/CTS Sender cannot detect a collision during transmission If a large frame is sent, and if collision occurs, then lot of channel BW is wasted To prevent this waste, Request to Send (RTS) and Clear To Send (CTS) control frames are used RTS/CTS helps a station to seize the channel for a short time; so, ideally, further collisions Chapter 2
19
Protocols and the TCP/IP Suite
DCF – RTS/CTS A sender, after contending for the channel, sends a RTS frame RTS/CTS frames are small (20 bytes), so in case of collision, less BW is wasted All stations in the BSS, read the RTS frame and adjust their NAV accordingly After SIFS amount of time, the destination responds to the RTS with a CTS frame Chapter 2
20
Protocols and the TCP/IP Suite
DCF – RTS/CTS Stations modify their NAV on reading CTS This helps to combat the “hidden terminal” problem (what is this?) On receiving CTS, sender transmits the data frame after an interval of SIFS, which the receiver ACKs RTS/CTS prevents BW waste, but Creates additional delay under light loads Causes collisions It is unclear it RTS/CTS improves throughput Chapter 2
21
802.11 MAC Frame Addr 1 Addr 2 Addr 3 Addr 4 CRC Body 2 6 0-2312 4
Control Duration ID Addr 1 Addr 2 Addr 3 Addr 4 Sequence CRC Body 2 6 0-2312 4 MAC Header Bytes: Protocol Version Type SubType To DS Retry Pwr Mgt More Data WEP Rsvd Frame Control Field Bits: 2 2 4 1 From Frag
22
Frame sizes and contents
Protocols and the TCP/IP Suite Frame sizes and contents MAC frames are called MPDU (MAC protocol Data Unit) Frame formats RTS (20B) Frame control (2B) Protocols version (2bits) ( = 00, so if not 00, then the following means something different) Type (2 bits)- management, control,data, reserved subtype (4bits), e.g., control|RTS, management|beacon,… To DS (DP) (1 bit) From DS (1bit) More frag (1b) This is a Retry (1b) Pwr mgt (1b) (=1 means the STA will go to power save (i.e., periodic sleep) after the frame is received) More data (1b) – if a STA is in power save mode, then this is used to signify that more data is waiting, so maybe the STA should wake up and get the data!) Protected frame (1b) (WEP, etc.) Order (1b) Duration / ID (2B) (but MSB is zero, so 15 bits for the duration) in microsec (rounded up) (ID is used in power save mode) RA receiver address (6B) TA transmitter address (6B) FCS – CRC-32 (4B) CTS (14B) Frame control Duration = duration in RTS – time to transmit CTS – 1 SIFS RA (no transmit address) FCS ACK (14B) Duration = 0 unless it is an ACK one for several more frames of a fragmented packet RA Data frame 34B overhead Duration (2B) Address 1 (6B) Address 2 (6B) Address 3 (6B) (homework, what are these addresses used for) Sequence control 2B (for fragmenting) Address 4 (6B) Frame body, up to 2312B FCS 4B Chapter 2
23
Physical Protocol Data Unit (802.11b)
Protocols and the TCP/IP Suite Physical Protocol Data Unit (802.11b) PLCP (phy layer convergence protocol = phy with MAC frame inside) PLCP preamble (144 bits) SYNC (128b) – to let the physical layer acquire sync (transmitter actually begins transmitting before this. This period is called ramp up where the transmitter goes from 0 zero to full/desired power. This typically takes ~ 1us) SFD (16b)– like a radio ID, IEEE has SFD-F3A0hex PLCP header (48 bits) Signal (8b) – specifies the modulation used for the MAC frame Service (8b) – reserved Length (16b) in micro seconds (not MAC duration, So this seems to be ignored) CRC (16b) PLCP SYNC and header always take 192 us MPDU (MAC protocol data unit) or PSDU (PLCP service Data unit) Chapter 2
24
Protocols and the TCP/IP Suite
Short PLCP (optional) Preamble – 72 bits at 1 Mbps PLCP header – 48 bits at 2Mbps The preamble and header takes 96 us MPDU / PSDU at 2, 5.5, … Mbps Since the PLCP is sent at 2 Mbps, the channel must be able to support 2 or more Mbps In practice the short header does not work well unless the channel is very good. Chapter 2
25
Protocols and the TCP/IP Suite
g PLCP preamble and header are similar to b PSDU Long Training sequence 1.6 us guard interval Long training symbol (3.2 us) Long training symbol (3.2us) (again) Total = 8 us OFDM signal Guard interval 0.8 us (This is quite short) Signal 3.2 us Total 4 us Transmitted at 6 Mbps OFDM modulation – which is the worst performing modulation – it has the same SNR-BER relationship at 9 and 12 Mbps. Data 6 us of quiet time (time to decode and error correct) to SIFS is 16 us Chapter 2
26
Protocols and the TCP/IP Suite
overhead Four 192b from PLCP At 1Mbps = 192 microsec so 768 microsec 82B from RTS, CTS, ACK, data 656 mic sec at 1Mbps 328 micro sec at 2Mbps 131 at 5Mbps 60 at 11Mbps 12 at 54Mbps 1 DIFS, 3 SIFS, 4 propagation delays 30 microsec + 3*20 micro + 4*2 microsec = 98 microsec Total overhead time 1552 mic sec at 1Mbps 1194 micro sec at 2Mbps 997 at 5Mbps 925 at 11Mbps 878 at 54Mbps Data duration 40B packet 320 mic at 1Mbps => efficiency data duration over all duration = 17% 160 2Mpbs => 11% 64 => 6% 29 => 3% 6 at 54 Mbps => 0.6% 1500B packet 12000 mic at 1Mbps => 89% 6000 2Mpbs => 83% 2400 => 70% 1090 => 54% 222 at 54 Mbps => 20% Small packets and high data rates are inefficient. Increasing packet size would help efficiency (similar things occur in wired TCP). 802.11n and can transmit multiple frames with one set of overhead Chapter 2
27
Protocols and the TCP/IP Suite
overhead w/o RTS/CTS two 192b from PLCP At 1Mbps = 192 microsec so 384 microsec 14B from RTS, CTS, ACK, data 112 mic sec at 1Mbps 56 micro sec at 2Mbps 22 at 5Mbps 10 at 11Mbps 2 at 54Mbps 1 DIFS, 1 SIFS, 1 propagation delays 30 microsec + 20 micro + 2 microsec = 52 microsec Total overhead time 548 mic sec at 1Mbps 492 micro sec at 2Mbps 458 at 5Mbps 446 at 11Mbps 438 at 54Mbps Data duration 40B packet 320 mic at 1Mbps => efficiency data duration over all duration = 36% 160 2Mpbs => 24% 64 => 12% 29 => 6% 6 at 54 Mbps => 1% 1500B packet 12000 mic at 1Mbps => 96% 6000 2Mpbs => 92% 2400 => 83% 1090 => 70% 222 at 54 Mbps => 33%\ If the packet is smaller than RTSThreshold, then RTS/CTS are not used Chapter 2
28
Protocols and the TCP/IP Suite
(DCF – Fragmentation) Large data units passed on by higher layers may be fragmented Fragmentation increases transmission reliability If data units are greater than a threshold, fragmentation is invoked Chapter 2
29
Protocols and the TCP/IP Suite
802.11: DCF – Basic Operation A station wanting to transmit, senses the medium If it is idle, waits for DIFS interval, and senses again If the medium is free, frame is transmitted If the receiver gets the frame correctly, it sends an ACK to the sender after a SIFS interval If the medium is found to be busy either in step 1 or 2, back-off procedure is invoked Chapter 2
30
Protocols and the TCP/IP Suite
802.11: DCF – Back-Off If the medium is found to be busy either in step 1 or 2, back-off procedure is invoked When invoked, station waits until the medium is free for a DIFS time, and starts a random timer Timer is decremented as long as the medium is free If the medium becomes busy, the timer is frozen Timer is decremented, when medium becomes free again for a DIFS time When timer reaches zero, the frame is transmitted Collisions are detected through a lack of ACK If collision occurs, the doubles the size of the backoff window and repeats the back-off process Chapter 2
31
IEEE 802.11 Variants Standard 802.11 Layer State MAC PHY Node S1
overhearing S1 S2 DATA DATA ACK R1 overhearing R2 Node S1 Layer State NAV DIFS BO DIFS BO remaining MAC time Let’s take a look at standard briefly. Let’s focus on sender 1’s MAC and PHY layers. Assume that S1 wants to send a packet to R1 and channel is idle. Then, MAC waits DIFS and are supposed to do this much backoff. But, at T1, PHY receives interference which is the DATA frame from S2, so MAC stops doing backoff and sets NAV. And receives another interference which is ACK frame from R2. And then MAC continues to do backoff remaining. Finally, PHY transmits DATA frame to R1. DATA frame from S2 ACK frame from R2 Receive PHY T1 time DATA frame to R1 Transmit time DIFS BO Busy DIFS BO Transmit
32
IEEE 802.11 Variants Stomp Layer State MAC PHY S1 S2 DATA ACK R1 R2
DIFS BO MAC time DATA frame from S2 Now, let’s take a look at stomp which is one of variants. At this time, PHY finishes decoding PLCP header. And we assume that PLCP header has information about source and destination. Receive time PHY Decode PLCP header Transmit time DIFS BO
33
IEEE 802.11 Variants Stomp Layer State MAC PHY
SNRS1-S2 S1 S2 Red characters : channel usage information S1 knows SNRS1-R2 SNRS1-R1 SNRR1-S2 SNRS2-R2 Data-rate Data-rate SNRR1-R2 R1 R1 R2 Layer State DIFS BO BO remaining MAC time DATA frame from S2 In this case, S2 and R2. Red characters are channel usage ~~~. Because each node is mesh node, it is possible that each mesh node can measure SNRs from neighbors and determine data rates between the node and neighbors and transmit those information to neighbors. So, S1 knows these six SNR information and these two date rates. And the destination to which S1 wants to transmit. With these channel usage information, S1 can decide whether or not the transmissions between S1 and R1 cause a collision with transmissions between S2 and R2. If collision does not occur, S1 stomps this interference. In other words, S1 ignores the interference because even if S1 transmits packet to R1, collision will not occur. So, S1 continues to do back-off remaining and starts to transmit. So, stomp can increase the channel utilization. Receive time PHY Decode PLCP header DATA frame to R1 Transmit time DIFS BO Transmit
34
Back-off (w/o RTS/CTS)
Protocols and the TCP/IP Suite Back-off (w/o RTS/CTS) start MAC receives a pkt CW = CWmin (e.g., 7) ShortTryCounter = 0 Rand(0,n) = Random integer between 0 and N Channel is busy Set BOtimer = slotTime*Rand(0,CW-1) Wait for idle channel If channel was not idle but no packet was decoded, set DIFStimer = EDIFS Channel is idle Channel is busy Set DIFStimer = DIFS Wait DIFS Channel is busy CW = min(1024, CW*2) DIFSTimer == 0 backoff TryCounter < MaxNumTries BOTimer == 0 transmit ShortTryCounter++ Wait for ACK No ACK ACK done ShortTryCounter == MaxNumTries Chapter 2
35
Max number of transmissions
Protocols and the TCP/IP Suite Max number of transmissions If an RTS fails to generate a CTS, then the Short Retry count is incremented, until is reaches the short_retry_limit If RTS is received, the ShortRetryCount = 0 If the pkt size is below RTSThreshold (so no RTS is transmitted), and fails to generate an ACK, then the Short retry count is incremented When small data pkt is successful, the short retry count is reset to zero If pkt size is above RTSThreshold and fails to result in an ACK, then the long retry is incremented. If the pkt is successfully transmitted, then long retry count is reset to 0 If a pkt is dropped due to too many failed attempts, the retry counters are set to zero Chapter 2
36
Using ACKs to increase data rate
Protocols and the TCP/IP Suite Using ACKs to increase data rate Envelop analysis Suppose that the pkt error prob for 10 Mbps is 0 and the pkt error prob for 20 Mbps is 0.25. The effective data rate at 10 Mbps is 10 Mbps, and at 20, is 0.75*20 > 10, so 20 is better, even though there will be many losses and retransmissions. When a transmission fails, it must wait DIFS and then back off Suppose an empty channel DIFS, Data, SIFS, ACK If Fails, then wait, [0,7]*SlotTime and repeat the above If Fails again, then wait, [0,13]*SlotTime and repeat the above What is the effective data rate when 10Mbps is used vs 20Mbps? S=.00; T=1; DD = []; pp = [0:.001:.1]; for i=1:length(pp) p = pp(i); D = 0; for k=0:8 s = 0; for j = 1:k s = s + 7*2^j-1; end D = D + (1-p)^k*p*(s*S+T); DD = [DD;D]; figure;plot(pp,DD) S is the slot duration, T is the time to transmit a packet If D>2, then it is better to use a data rate with ½ the bit-rate Depending on S, the probability where this occurs can be quite small. Chapter 2
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.