COMP3331/9331-无代写
时间:2023-11-26
COMP 3331/9331:
Computer Networks and
Applications
Week 10
Wireless Networks
Reading Guide: Chapter 7, Sections 7.1 – 7.3
1. BER, SNR, Data Rate
2. Hidden/Exposed Terminals
3. Channel association
4. CSMA/CA: RTS-CTS
5. Addressing
Wireless and Mobile Networks: context
2
§ more wireless (mobile) phone subscribers than fixed (wired) phone subscribers
(10-to-1 in 2019)!
§ more mobile-broadband-connected devices than fixed-broadband-connected
devices devices (5-1 in 2019)!
• 4G/5G cellular networks now embracing Internet protocol stack, including
SDN
§ two important (but different) challenges
• wireless: communication over wireless link
• mobility: handling the mobile user who changes point of attachment to
network
We will only focus on wireless challenges
Outline
7.1 Introduction
Wireless
7.2 Wireless links,
characteristics
7.3 IEEE 802.11 wireless
LANs (“Wi-Fi”)
3
Wireless 101
4
Elements of a wireless network
5
wired network
infrastructure
Elements of a wireless network
6
wired network
infrastructure
wireless hosts
§ laptop, smartphone, IoT
§ run applications
§ may be stationary (non-mobile) or mobile
• wireless does not always mean mobility!
Elements of a wireless network
7
wired network
infrastructure
base station
§ typically connected to wired network
§ relay - responsible for sending packets
between wired network and wireless
host(s) in its “area”
• e.g., cell towers, 802.11 access points
Elements of a wireless network
8
wired network
infrastructure
wireless link
§ typically used to connect mobile(s) to
base station, also used as backbone link
§ multiple access protocol coordinates
link access
§ various transmission rates and
distances, frequency bands
Characteristics of selected wireless links
Wireless and Mobile Networks: 7- 9
Indoor Outdoor Midrange
outdoor
Long range
outdoor
10-30m 50-200m 200m-4Km 4Km-15Km
2 Mbps
4G LTE
802.11ac
802.11n
802.11g
802.11b
3.5 Gbps
600 Mbps
54 Mbps
11 Mbps
Bluetooth
802.11ax14 Gbps
5G10 Gbps
802.11 af,ah
Wireless Networks 10
Elements of a wireless network
11
wired network
infrastructure
infrastructure mode
§ base station connects mobiles
into wired network
§ handoff: mobile changes base
station providing connection into
wired network
Elements of a wireless network
12
ad hoc mode
§ no base stations
§ nodes can only transmit to
other nodes within link
coverage
§ nodes organize themselves
into a network: route among
themselves
Wireless network taxonomy
13
single hop multiple hops
infrastructure
(e.g., APs)
no
infrastructure
host connects to base
station (WiFi, cellular)
which connects to
larger Internet
no base station, no
connection to larger
Internet (Bluetooth, ad hoc
nets)
host may have to relay through
several wireless nodes to
connect to larger
Internet: mesh net
no base station, no connection to
larger Internet. May have to
relay to reach a given wireless
node; MANET, VANET
Outline
7.1 Introduction
Wireless
7.2 Wireless links,
characteristics
7.3 IEEE 802.11 wireless
LANs (“Wi-Fi”)
14
Wireless link characteristics (1)
15
important differences from wired link ….
§ decreased signal strength: radio signal attenuates as it
propagates through matter (path loss)
§ interference from other sources: wireless network
frequencies (e.g., 2.4 GHz) shared by many devices
(e.g., WiFi, cellular, motors): interference
§ multipath propagation: radio signal reflects off objects
ground, arriving at destination at slightly different times
…. make communication across (even a point to point) wireless link much
more “difficult”
Multipath Effects
v Signals bounce off surface and interfere (constructive or
destructive) with one another
v Self-interference
16
Ideal Radios
17
Real Radios
18
Wireless link characteristics (2)
19
§ SNR: signal-to-noise ratio
• larger SNR – easier to extract signal from
noise (a “good thing”)
§ SNR versus BER tradeoffs
• given physical layer: increase power ->
increase SNR->decrease BER
• given SNR: choose physical layer that
meets BER requirement, giving highest
throughput
• SNR may change with mobility: dynamically
adapt physical layer (modulation technique,
transmission rate)
10 20 30 40
QAM256 (8 Mbps)
QAM16 (4 Mbps)
BPSK (1 Mbps)
SNR(dB)
BE
R
10-1
10-2
10-3
10-5
10-6
10-7
10-4
BER: Bit Error Rate
802.11: advanced capabilities
20
Rate adaptation
§ base station, mobile dynamically
change transmission rate (physical layer
modulation technique) as mobile
moves, SNR varies
10 20 30 40
SNR(dB)
BE
R
10-1
10-2
10-3
10-5
10-6
10-7
10-4
QAM256 (8 Mbps)
QAM16 (4 Mbps)
BPSK (1 Mbps)
operating point
1. SNR decreases, BER increase as node moves away
from base station
2. When BER becomes too high, switch to lower
transmission rate but with lower BER
Wireless link characteristics (3)
21
Multiple wireless senders, receivers create additional problems (beyond multiple
access):
A
B
C
Hidden terminal problem
§ B, A hear each other
§ B, C hear each other
§ A, C can not hear each other
means A, C unaware of their
interference at B
A B C
A’s signal
strength
space
C’s signal
strength
Signal attenuation:
§ B, A hear each other
§ B, C hear each other
§ A, C can not hear each other
interfering at B
v Exposed Terminals
v Node B sends a packet to A; C hears this and
decides not to send a packet to D (despite the fact
that this will not cause interference) !!
v Carrier sense would prevent a successful
transmission
22
Wireless network characteristics
Outline
7.1 Introduction
Wireless
7.2 Wireless links,
characteristics
7.3 IEEE 802.11 wireless
LANs (“Wi-Fi”)
23
IEEE 802.11 Wireless LAN
24
IEEE 802.11 standard Year Max data rate Range Frequency
802.11b 1999 11 Mbps 30 m 2.4 Ghz
802.11g 2003 54 Mbps 30m 2.4 Ghz
802.11n (WiFi 4) 2009 600 70m 2.4, 5 Ghz
802.11ac (WiFi 5) 2013 3.47Gpbs 70m 5 Ghz
802.11ax (WiFi 6) 2021 14 Gbps 70m 2.4, 5 Ghz
802.11af 2014 35 – 560 Mbps 1 Km unused TV bands (54-
790 MHz)
802.11ah (WiFi Halow) 2017 347Mbps 1 Km 900 Mhz
§ all use CSMA/CA for multiple access, and have base-station and
ad-hoc network versions
802.11 LAN architecture
25
§ 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
switch
or router
802.11: Channels, association
26
§ spectrum divided into channels at different frequencies
• AP admin chooses frequency for AP
• interference possible: channel can be same as that chosen by
neighboring AP!
§ arriving 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
• then may perform authentication [Security]
• then typically run DHCP to get IP address in AP’s
subnet
BSS
802.11: passive/active scanning
27
AP 2AP 1
H1
BBS 2BBS 1
1
2 3
1
passive scanning:
(1) beacon frames sent from APs
(2) association Request frame sent: H1 to
selected AP
(3) association Response frame sent from
selected AP to H1
AP 2
AP 1
H1
BBS 2BBS 1
1
22
3 4
active scanning:
(1) Probe Request frame broadcast from H1
(2) Probe Response frames sent from APs
(3) Association Request frame sent: H1 to
selected AP
(4) Association Response frame sent from
selected AP to H1
IEEE 802.11: multiple access
28
§ avoid collisions: 2+ nodes transmitting at same time
§ 802.11: CSMA - sense before transmitting
• don’t collide with detected ongoing transmission by another node
§ 802.11: no collision detection!
• difficult to sense collisions: high transmitting signal, weak received signal due to
fading
• can’t sense all collisions in any case: hidden terminal, fading
• goal: avoid collisions: CSMA/CollisionAvoidance
space
A
B
C
A B C
A’s signal
strength
C’s signal
strength
Multiple access: Key Points
v No concept of a global collision
§ Different receivers hear different signals
§ Different senders reach different receivers
v Collisions are at receiver, not sender
§ Only care if receiver can hear the sender clearly
§ It does not matter if sender can hear someone else
§ As long as that signal does not interfere with receiver
v Goal of protocol
§ Detect if receiver can hear sender
§ Tell senders who might interfere with receiver to shut up
29
IEEE 802.11 MAC Protocol: CSMA/CA
30
802.11 sender
1 if sense channel idle for DIFS then
transmit entire frame (no CD)
sender receiver
DIFS
data
SIFS
ACK802.11 receiver
if frame received OK
return ACK after SIFS (ACK needed due to hidden
terminal problem)
2 if sense channel busy then
start random backoff time
timer counts down while channel idle
transmit when timer expires
if no ACK, double random backoff interval, repeat 2
Avoiding collisions (more)
31
idea: sender “reserves” channel use for data frames using small reservation
packets
§ sender first transmits small request-to-send (RTS) packet 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
Collision Avoidance: RTS-CTS exchange
AP
A B
time
RTS(A)
RTS(B)
RTS(A)
CTS(A) CTS(A)
DATA (A)
ACK(A) ACK(A)
reservation collision
defer
32
Collision Avoidance: RTS-CTS exchange
AP
A B
time
CTS(A)
DATA (A)
33
RTS (A)
ACK(A)
RTS (A)
DATA (A)
802.11 frame: addressing
34
2 2 6 6 6 2 6 0 - 2312 4
Address 1: MAC address of
wireless host or AP to
receive this frame
Address 4: used only in ad
hoc mode
frame
controlduration
address
1
address
2
address
4
address
3 payload CRC
seq
control
Address 2: MAC address
of wireless host or AP
transmitting this frame
Address 3: MAC address of
router interface to which AP is
attached
Quiz
The following is the correct sequence of message
exchanges as per the reservation process of 802.11
CSMA/CA
A. RTS->CTS->DATA->CTS
B. CTS->RTS->DATA->ACK
C. RTS->CTS->DATA->ACK
D. RTS->ACK->DATA->CTS
35
Quiz
v Which multiple access technique is used by IEEE 802.11?
A. CSMA/CD
B. Slotted ALOHA
C. CSMA/CA
D. TDMA
E. FDMA
36
Summary
Wireless
v wireless links:
§ capacity, distance
§ channel impairments
v IEEE 802.11 (“Wi-Fi”)
§ CSMA/CA reflects wireless channel
characteristics