1 2
Widespread Deployment
• Worldwide cellular subscribers
– 1993: 34 million
– 2005: more than 2 billion
– 2012: 6.8 billion
(2.1B with mobile broadband)
Wireless Networks >> 1.2B landline subscribers
• Wireless local area networks
Mike Freedman – Wireless adapters built into
laptops, tablets, & phones
COS 461: Computer Networks – More ubiquitous than wired
http://www.cs.princeton.edu/courses/archive/spring20/cos461/
broadband? 700M in 2012
3 4
Wireless Properties
• Interference / bit errors
– More sources of corruption compared to wired
Wireless Links • Multipath propagation
– Signal does not travel in a straight line
• Broadcast medium
– All traffic to everyone
• Power trade-offs
– Important for power constrained devices
1
5 6
Wireless Links: High Bit Error Rate Wireless Links: High Bit Error Rate
• Decreasing signal strength • Interference from other sources
– Disperses as it travels greater distance – Radio sources in same frequency band
– E.g., 2.4 GHz wireless phone interferes with 802.11b
– Attenuates as it passes through matter
wireless LAN
– Electromagnetic noise (e.g., microwave oven)
7 8
Wireless Links: High Bit Error Rate Dealing With Bit Errors
• Multi-path propagation • Wireless vs. wired links
– Electromagnetic waves reflect off objects – Wired: most loss is due to congestion
– Taking many paths of different lengths – Wireless: higher, time-varying bit-error rate
– Causing blurring of signal at the receiver
• Dealing with high bit-error rates
receiver – Sender could increase transmission power
transmitter • Requires more energy (bad for battery-powered hosts)
• Creates more interference with other senders
– Stronger error detection and recovery
• More powerful error detection/correction codes
• Link-layer retransmission of corrupted frames
2
9 10
Wireless Links: Broadcast Limitations Wireless Links: Broadcast Limitations
• Wired broadcast links • Wired broadcast links
– E.g., Ethernet bridging, in wired LANs – E.g., Ethernet bridging, in wired LANs
– All nodes receive transmissions from all other nodes – All nodes receive transmissions from all other nodes
• Wireless broadcast: hidden terminal problem • Wireless broadcast: fading over distance
C • A and B hear each other A B C • A and B hear each other
• B and C hear each other • B and C hear each other
• But, A and C do not • But, A and C do not
A s signal C s signal
strength strength
B
So, A and C are unaware of So, A and C are unaware of
A
their interference at B their interference at B
space
11 12
Example Wireless Link Technologies Wireless Network: Wireless Link
• Data networks Wireless link
– 802.15.1 (Bluetooth): 2.1 Mbps – 10 m • Typically used to connect
– 802.11b (WiFi): 5-11 Mbps – 100 m mobile(s) to base station
• Also used as backbone link
– 802.11a and g (WiFi): 54 Mbps – 100 m
• Multiple access protocol
– 802.11n (WiFi): 200 Mbps – 100 m network
coordinates link access
infrastructure
– 802.16 (WiMax): 70 Mbps – 10 km
• Cellular networks, outdoors
– 2G: 56 Kbps
– 3G: 384 Kbps
– 3G enhanced (“4G”): 4 Mbps
– LTE: 10-100 Mbps
3
13 14
Wireless Network: Wireless Hosts Wireless Network: Base Station
Base station
Wireless host
• Typically connected to
• Laptop, smartphone wired network
• Run applications • Relay responsible for
• May be stationary (non- sending packets between
network mobile) or mobile wired network and wireless
network
infrastructure
host(s) in its “area”
infrastructure
• E.g., cell towers, 802.11
access points
15 16
Wireless Network: Infrastructure Infrastructure Mode (APs)
Network infrastructure Infrastructure mode
• Larger network with which a • Base station connects
wireless host wants to mobiles into wired network
communicate
• Network provides services
• Typically a wired network (addressing, routing, DNS)
network • Provides traditional network network • Handoff: mobile changes
infrastructure services infrastructure base station providing
connection to wired network
• May not always exist
4
17 18
Channels and Association Channels and Association
• Multiple channels at different frequencies • Multiple channels at different frequencies
– Network administrator chooses frequency for AP – Network administrator chooses frequency for AP
– Interference if channel is same as neighboring AP – Interference if channel is same as neighboring AP
• Access points send periodic beacon frames
– Containing AP s name (SSID) and MAC address
– Host scans channels, listening for beacon frames
– Host selects an access point: association request/response
protocol between host and AP
19 20
Mobility Within the Same Subnet Questions
• H1 remains in same IP subnet
• Loss is primary caused by bit errors
– IP address of the host can remain same
(Y) Ethernet (Wired)
– Ongoing data transfers can continue uninterrupted
(M) 802.11 (Wireless)
• H1 recognizes the need to change router
(C) Both
– H1 detects a weakening signal (A) Neither
– Starts scanning for stronger one hub or
switch • All hosts on subnet see all communication
• Changes APs with same SSID (Y) Ethernet (Wired)
BBS 1
– H1 disassociates from one (M) 802.11 (Wireless)
AP 1
– And associates with other (C) Both
AP 2
• Switch learns new location (A) Neither
H1 BBS 2
– Self-learning mechanism
5
21 22
Questions
• Loss is primary caused by bit errors
(Y) Ethernet (Wired)
(M) 802.11 (Wireless)
(C) Both WiFi: 802.11 Wireless LANs
(A) Neither
• All hosts on subnet see all communication
(Y) Ethernet (Wired)
(M) 802.11 (Wireless)
(C) Both
(A) Neither
23 24
802.11 LAN Architecture CSMA: Carrier Sense, Multiple Access
• Access Point (AP)
• Multiple access: channel is shared medium
– Base station that – Station: wireless host or access point
Internet communicates with the – Multiple stations may want to transmit at same time
wireless hosts
• Basic Service Set (BSS) • Carrier sense: sense channel before sending
– Coverage of one AP – Station doesn t send when channel is busy
hub, switch
– AP acts as the master
AP or router
– Identified by an “network
– To prevent collisions with ongoing transfers
name” known as an SSID – But, detecting ongoing transfers isn t always possible
BSS 1
AP
A B C
C
A s signal C s signal
B strength strength
A
BSS 2 SSID: Service Set Identifier
space
6
25 26
CA: Collision Avoidance, Not Detection CA: Collision Avoidance, Not Detection
• Collision detection in wired Ethernet • Collision detection in wired Ethernet
– Station listens while transmitting – Station listens while transmitting
– Detects collision with other transmission – Detects collision with other transmission
– Aborts transmission and tries sending again – Aborts transmission and tries sending again
• Problem #1: cannot detect all collisions • Problem #1: cannot detect all collisions
– Hidden terminal problem – Hidden terminal problem
– Fading – Fading
• Problem #2: listening while sending
– Strength of received signal is much smaller
– Expensive to build hardware that detects collisions
• So, 802.11 does collision avoidance, not detection
27 28
Hidden Terminal Problem Virtual carrier sensing
• First exchange control frames before transmitting data
– Sender issues “Request to Send” (RTS), incl. length of data
A B C
– Receiver responds with “Clear to Send” (CTS)
• If sender sees CTS, transmits data (of specified length)
• A and C can’t see each other, both send to B • If other node sees CTS, will idle for specified period
• Occurs b/c 802.11 relies on physical carrier sensing, • If other node sees RTS but not CTS, free to send
which is susceptible to hidden terminal problem
7
29 30
Hidden Terminal Problem Exposed Terminal Problem
A B C A B C D
• B sending to A, C wants to send to D
• A and C can’t see each other, both send to B • As C receives packets, carrier sense would prevent it
• RTS/CTS can help from sending to D, even though wouldn’t interfere
– Both A and C would send RTS that B would see first • RTS/CTS can help
– B only responds with one CTS (say, echoing A’s RTS) – C hears RTS from B, but not CTS from A
– C detects that CTS doesn’t match and won’t send – C knows it’s transmission will not interfere with A
– C is safe to transmit to D
31 32
Impact on Higher-Layer Protocols Questions
• Wireless and mobility change path properties • RTS/CTS more like:
– Wireless: higher packet loss, not from congestion (Y) Statistical multiplexing
– Mobility: transient disruptions, and changes in RTT (M) Time-division multiplexing
• Logically, impact should be minimal … (C) Frequency-division multiplexing
– Best-effort service model remains unchanged
– TCP and UDP can (and do) run over wireless, mobile
• Which of following is NOT true?
(Y) Collisions are minimized when RTS/CTS used.
• But, performance definitely is affected (M) Sender can always detect a collision without
– TCP treats packet loss as a sign of congestion feedback from receiver.
– TCP tries to estimate the RTT to drive retransmissions (C) TCP congestion control works poorly in wireless
– TCP does not perform well under out-of-order packets
without link-layer retransmission.
• Internet not designed with these issues in mind (A) Wireless generally has higher loss rates than wired.
8
33 34
Questions
• RTS/CTS more like:
(Y) Statistical multiplexing
(M) Time-division multiplexing
(C) Frequency-division multiplexing
Bluetooth: 802.15.1
• Which of following is NOT true?
“personal-area-networks”
(Y) Collisions are minimized when RTS/CTS used.
(M) Sender can always detect a collision without
feedback from receiver.
(C) TCP congestion control works poorly in wireless
without link-layer retransmission.
(A) Wireless generally has higher loss rates than wired.
35 36
Bluetooth piconets PHY: Spread Spectrum – Frequency Hopping
• Nodes rapidly jump between frequencies
• Sender and receiver coordinated in jumps
– How coordinate? Pseudorandom number generator, with
shared input known to sender/receiver
• If randomly collide with other transmitted, only for
short period before jump again
• Bluetooth
• Up to 7 “slave devices and 225 “parked” devices
– 79 frequencies, on each frequency for 625 microseconds
• Operates on unlicensed wireless spectrum – Each channel also uses TDMA, with each frame taking
– How to prevent interference? 1/3/5 consecutive slots.
– Only master can start in odd slot, slave only in response
9
37 38
Infrastructure vs. Ad Hoc Conclusions
• Infrastructure mode • Wireless
– Wireless hosts are associated with a base station – Already a major way people connect to the Internet
– Gradually becoming more than just an access network
– Traditional services provided by the connected network
– E.g., address assignment, routing, and DNS resolution • Mobility (not discussed)
– Today’s users tolerate disruptions as they move
• Ad hoc networks – … and applications try to hide the effects
– Wireless hosts have no infrastructure to connect to – Tomorrow’s users expect seamless mobility
– Hosts themselves must provide network services
• Challenges the design of network protocols
– Wireless breaks the abstraction of a link, and the
• Similar in spirit to the difference between assumption that packet loss implies congestion
– Client-server communication – Mobility breaks association of address and location
– Peer-to-peer communication – Higher-layer protocols don’t perform as well
10