Download presentation
Presentation is loading. Please wait.
Published byElvin Fox Modified over 9 years ago
1
Lecture 27 University of Nevada – Reno Computer Science & Engineering Department Fall 2015 CPE 400 / 600 Computer Communication Networks Prof. Shamik Sengupta Office SEM 204 ssengupta@unr.edu http://www.cse.unr.edu/~shamik/
2
Link layer in wireless Link Layer5-2
3
link access in wireless domain # wireless (mobile) phone subscribers now exceeds # wired phone subscribers! computer networks: laptops, palmtops, PDAs, Smart Phones promise anytime wireless Internet access! It has really been a wireless revolution decade…with more to come Wireless is no longer a luxury but a necessity
4
WLAN Market: WiFi Source: Pyramid Research Source: AirTight Networks WLAN growing exponentially
5
IEEE 802.11 Wireless LAN 802.11b 2.4 GHz unlicensed spectrum up to 11 Mbps 802.11g 2.4 GHz range up to 54 Mbps 802.11a 5 GHz range up to 54 Mbps 802.11n: multiple antennae 2.4 / 5 GHz range up to 200 Mbps all use CSMA/CA for multiple access all have infrastructure and ad-hoc network versions What else? 802.11 ac – builds on 802.n – provides 80-160MHz channels 802.11ad – 60GHz mmwave spectrum 802.11af – Super Wi-Fi
6
802.11 LAN architecture wireless host communicates with base station base station = access point (AP) Basic Service Set (BSS) (aka “cell”) in infrastructure mode contains: wireless hosts access point (AP): base station ad hoc mode: hosts only BSS 1 BSS 2 Internet hub, switch or router AP
7
Basic Service Set (BSS) BSS
8
Extended Service Set (ESS) BSS’s with wired Distribution System (DS) BSS Distribution System
9
802.11: Channels, association 802.11b: 2.4GHz-2.485GHz spectrum divided into 13 channels at different frequencies AP admin chooses frequency for AP interference possible: channel can be same as that chosen by neighboring AP! host: must associate with an AP scans channels, listening for beacon frames containing AP’s name (SSID) and MAC address selects AP to associate with will typically run DHCP to get IP address in AP’s subnet
10
IEEE 802.11: multiple access problem 802.11: CSMA - sense before transmitting don’t collide with ongoing transmission by other node Certain differences from Ethernet LAN in wired domain 802.11: no collision detection! difficult to receive (sense collisions) when transmitting due to weak received signals (fading) Signal strength falls off rapidly with distance Signal strength may weaken due to obstacles Medium “air” shared among many users (not just WiFi users) can’t detect all collisions in any case: hidden terminal problem
11
Wireless interference Hidden terminal Goal: CSMA/C(ollision)A(voidance) “Open” Wireless Medium S1 S2 R1 S1R1 S2
12
How does the medium access work in WLAN? Access methods DCF CSMA/CA (mandatory) collision avoidance via exponential backoff Minimum distance (IFS) between consecutive packets ACK packet for acknowledgements (not for broadcasts) DCF with RTS/CTS (optional) Distributed Foundation Wireless MAC avoids hidden terminal problem PCF (optional) access point polls terminals according to a list Contention Based Contention Free Distributed Coordination Function (DCF)Point Coordination Function (PCF)
13
802.11 – MAC Priorities defined through different inter frame spaces 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, competing stations t medium busy SIFS PIFS DIFS next framecontention access if medium is free DIFS DIFS = SIFS + (2 * Slot time)
14
WLAN access scheme details 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 automatic retransmission of data packets in case of transmission errors t SIFS DIFS data ACK waiting time other stations receiver sender data DIFS contention
15
Contention for channel When the other stations find the channel idle, they would like to transmit their own packets Contention for channel If all the waiting stations attempt at once, this will surely result in collision Some CA scheme is necessary Backoff intervals can be used to reduce collision probability t SIFS DIFS data ACK waiting time other stations receiver sender data DIFS contention
16
Backoff Interval When transmitting a packet, choose a backoff interval in the range [0,cw] cw is contention window Count down the backoff interval when medium is idle Count-down is suspended if medium becomes busy When backoff interval reaches 0, transmit packet data wait B1 = 5 B2 = 15 B1 = 25 B2 = 20 data wait B1 and B2 are backoff intervals at nodes 1 and 2 Assume cw = 31 B2 = 10
17
Backoff Interval The time spent counting down backoff intervals is a part of MAC overhead Choosing a large cw leads to large backoff intervals and can result in larger overhead Choosing a small cw leads to a larger number of collisions (when two nodes count down to 0 simultaneously) Since the number of nodes attempting to transmit simultaneously may change with time, some mechanism to manage contention is needed IEEE 802.11 DCF: contention window cw is chosen dynamically depending on collision occurrence Follows Binary exponential backoff algorithm
18
Binary Exponential Backoff (BEB) in DCF Even before the first collision, nodes follow BEB Initial backoff interval (before 1 st collision) [0,7] If still packets collide, double the collision interval [0,15], [0,31] and so on…
19
Avoiding collisions (more) idea: allow sender to “reserve” channel rather than random access of data frames: avoid collisions of long data frames sender first transmits small request-to-send (RTS) packets to BS using CSMA RTSs may still collide with each other (but they’re short) BS broadcasts clear-to-send CTS in response to RTS CTS heard by all nodes sender transmits data frame other stations defer transmissions avoid data frame collisions completely using small reservation packets!
20
Collision Avoidance: RTS-CTS exchange AP A B time RTS(A) RTS(B) RTS(A) CTS(A) DATA (A) ACK(A) reservation collision defer
21
Wireless, Mobile Networks6-21 frame control duration address 1 address 2 address 4 address 3 payloadCRC 226662 6 0 - 2312 4 seq control 802.11 frame: addressing Address 2: MAC address of wireless host or AP transmitting this frame Address 1: MAC address of wireless host or AP to receive this frame Address 3: MAC address (dependent on frame control field) Address 4: used only in ad hoc mode
22
Wireless, Mobile Networks6-22 Internet router H1 R1 AP MAC addr H1 MAC addr R1 MAC addr address 1 address 2 address 3 802.11 frame R1 MAC addr H1 MAC addr dest. address source address 802.3 frame 802.11 frame: addressing
23
Wireless, Mobile Networks6-23 frame control duration address 1 address 2 address 4 address 3 payloadCRC 226662 6 0 - 2312 4 seq control Type From AP Subtype To AP More frag WEP More data Power mgt RetryRsvd Protocol version 2 2411111111 duration of reserved transmission time (RTS/CTS) frame seq # (for RDT) frame type (RTS, CTS, ACK, data) 802.11 frame: more
24
Frame Control field Protocol Version: zero for 802.11 standard Type= frame type: data, management, control Subtype = frame sub-type ToDS: when bit is set indicate that destination frame is for DS FromDS: When bit is set indicate frame coming from DS Data Link Layer 5-24
25
Frame Control field Retry: Set in case of retransmission frame More fragments: Set when frame is followed by other fragment Power Management bit set when station go Power Save mode (PS) More Data: When set means that AP have more buffered data for a station in Power Save mode Data Link Layer 5-25
26
Address Field Description Addr. 1 = All stations filter on this address. Addr. 2 = Transmitter Address (TA), Identifies transmitter to address the ACK frame to. Addr. 3 = Dependent on To and From DS bits. Addr. 4 = Only needed to identify the original source of WDS (Wireless Distribution System) frames Protocol Version TypeSubType To DS Retry Pwr Mgt More Data WEPRsvd Frame Control Field Bits: 22411111111 DS FromMore Frag To DS 0 0 1 1 From DS 0 1 0 1 Address 1 DA BSSID RA Address 2 SA BSSID SA TA Address 3 BSSID SA DA Address 4 N/A SA
27
Type field descriptions Type and subtype identify the function of the frame: Type=00Management Frame Beacon (Re)Association Probe Type=01Control Frame RTS/CTS ACK Type=10Data Frame Protocol Version TypeSubType To DS Retry Pwr Mgt More Data WEPRsvd Frame Control Field Bits: 22411111111 DS FromMore Frag
28
Type and subtypes Data Link Layer 5-28
29
Type and subtypes Data Link Layer 5-29
30
Type and subtypes Data Link Layer 5-30
31
RTS/CTS frames Data Link Layer 5-31
32
Lecture 27 University of Nevada – Reno Computer Science & Engineering Department Fall 2015 CPE 400 / 600 Computer Communication Networks Prof. Shamik Sengupta Office SEM 204 ssengupta@unr.edu http://www.cse.unr.edu/~shamik/
33
Numerical Problems Practice Wi-Fi Hidden Node Problem Wi-Fi with RTS/CTS See handouts for numerical problems: Lec27_numerical problems.pdf
34
Announcements Dec. 2: Quiz 4 Dec. 7: Sample final exam in class. Discussion. Dec. 9: Prep. Day. No class. Dec. 14: Final Exam: 10.15am – 12.15pm Link Layer5-34
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.