introduction to computer networks cs640 wireless networking
TRANSCRIPT
Ming Liu [email protected]
Introduction to Computer Networks
CS640 https://pages.cs.wisc.edu/~mgliu/CS640/F21/
Wireless Networking
1
Today
Last lecture • Error detection
• Ethernet
2
Today • Wireless basics • WiFi medium access control • WiFi distribution system
Announcements • Lab1 due on 09/30/2021 11:59PM
Wireless Link v.s. Wired Link
Error rates are higher • Environment is inherently noisier
Power limitations • Energy scarce nodes
Limitations on transmit power • Interference; how much power a device may emit at any given frequency
Wireless signals attenuate fast • Rate of attenuation increases with frequency
3
Wireless Link v.s. Wired Link (cont’d)
Cannot do collision detection • Collision happens at receiver
Usually shorter in range
Slower compared to wired links
Dealing with mobile nodes
Limitations on security (eavesdropping)
4
Overview of Wireless Technologies
Which portion of the spectrum • Licensed: satellite, TV, cellular • Unlicensed: Bluetooth, WiFi
Unlicensed device • Maximum power limitation
• Define the range of transmitter -> Signal becomes weak if outside the range
• A metric: signal-to-noise (SNR)
• The higher the better
5
Various WiFi Technologies
Based on IEEE 802.11 standards • 802.11a, 802.11b, 802.11g, 802.11n, 802.11be, …
Difference • #1: the underlying physical properties of how wireless signals are encoded
• #2: what hardware is employed in encoding/decoding
• #3: what portion of the spectrum they operate in
• 802.11 b, g, n —> 2.4GHz • 802.11 a —> 5GHz • 802.11 n —> multiple antennas • Others —> single antenna
7
WiFi Encoding
Direct sequence spread spectrum —> 802.11b • Each bit XOR’ed with an N bit chipping sequence
• Receiver knows the sequence and XOR’s again to retrieve the bit • N > 1 ensures redundancy and protection
OFDM —> 802.11a/g • Orthogonal frequency division multiplexing
• Spread bits across multiple frequency slices • Different slices have different attenuate rates, which can carry over time
• Different slices result in different bit error rates over times • Speeding redundant bit across slices -> increase chances of receiving bits correctly
8
User’s View
Manifest as differences in maximum supported rate • 802.11b —> 11 Mbps • 802.11 a, g —> 54 Mbps • 802.11 n —> 600 Mbps • 802.11 be —> Extreme High Throughput (EHT), WiFi 7 —> 40Gbps —> ongoing
Often support lower rates • e.g., 1Mbps, 2Mbps, 6Mbps, 11Mbps, 27Mbps, 54Mbps, …
• Lower rates are picked based on signal quality • Better the signal, the higher the rate picked —> rate adaptation
9
Medium Access Control
Similar in some respect to Ethernet — CSMA
WiFi uses CSMA/CA — collision avoidance • #1: Wireless nodes cannot transmit and receive at the same time (on the same
frequency) • #2: Senders cannot detect collisions —> collisions happen at the receiver and there is no
way for the collided signal to travel back to the sender
10
Collision avoidance is crucial
Hidden terminal •Both A and C want to send to B. Because they are both out of range of each, they both
sense the medium to be idle and transmit. Unfortunately, the transmissions collide at the
receiver
A B C
11
Collision avoidance is crucial (cont’d)
Exposed terminal • B wants to send to A, where C wants to send to D. But when C tries to send data, it senses the medium to be busy and wait • In realty though, since D is out of B’s range, it could transmit the data as there is no
signal colliding
A B C D
12
Collision Avoidance
Tackle collisions in the first case, and improves efficiency in the second case
Key ideas • RTS/CTS control packet: request to send and clear to send
• ACK (acknowledgement) packet
13
How does CA work?
A (sender) -> B (receiver) • Step 1: A sends RTS to B
• Step 2: If B is willing to accept, then it responds with a CTS; If B has already accepted
someone else’s RTS, then it will not send the CTS
• Step 3: A sends data and waits • Step 4: B receives data and sends ACKs back • Step 5: If ACK is not received by A after time T, A tries again with Step 1
14
How does CA handle the hidden terminal?
Because B will send CTS to either A or C
The RTS and correspondingly the CTS indicates how long the medium will be busy. So the hidden terminal will stop sending data
15
How does CA handle the hidden terminal?
Because B will send CTS to either A or C
The RTS and correspondingly the CTS indicates how long the medium will be busy. So the hidden terminal will stop sending data
What happens when two RTS collide at the receiver?
15
How does CA handle the hidden terminal?
Because B will send CTS to either A or C
The RTS and correspondingly the CTS indicates how long the medium will be busy. So the hidden terminal will stop sending data
What happens when two RTs collide at the receiver? - Senders wait for a random amount of time, and retry using binary exponential back off (similar to Ethernet)
15
How does CA handle the exposed terminal?
C will hear the RTS from B but not CTS from A to B
C knows it is an exposed terminal and so it will send RTS to D
16
Access point (AP)
Multiple APs provide coverage
APs are connected to each other via a switched network, which is then connected to the Internet
The distribution system runs at the link layer
18
How to select an AP?
Active probing • The node sends a Probe frame
• All APs within reach reply with a Probe Response frame
• The node selects one of the access points and sends that AP an Association Request frame
• The API replies with an Association Response frame
20
How to select an AP?
Active probing • The node sends a Probe frame
• All APs within reach reply with a Probe Response frame
• The node selects one of the access points and sends that AP an Association Request frame
• The API replies with an Association Response frame
Passive probing • AP broadcasts beacons • Nodes send association request in response
22
802.11 Frame Format
Ctrl2B
Describe the frame control information, like frame type (RTS/CTS), protocol version, ToDS/FromDS, etc.
23
802.11 Frame Format
Ctrl2B
Carries the value of the Network Allocation Vector (NAV). Access to the medium is restricted for the time specified by the NAV.
Duration2B
23
802.11 Frame Format
Ctrl2B
Duration2B
Addr1 Addr26B 6B
SeqCtrlAddr3 Addr46B 2B 6B
Sequence number and fragment number
23
802.11 Frame Format
Ctrl2B
Duration2B
Addr1 Addr26B 6B
SeqCtrlAddr3 Addr46B 2B 6B
Addr1 Addr2 Addr3 Addr4
ToDS = 0, FromDS = 0 Target node Sender node N/A N/A
ToDS = 1, FromDS = 0 Target node N/A Intermediate
target N/A
ToDS = 0, FromDS = 1 N/A Intermediate
sender N/A Sender node
ToDS = 1, FromDS = 1 Target node Intermediate
senderIntermediate
target Sender node
23
802.11 Frame Format
Ctrl2B
Duration2B
Addr1 Addr26B 6B
SeqCtrlAddr3 Addr46B 2B 6B
Payload CRC0-2312B 4B
Preamble8B
Dest Source Type Data CRCPad6B 6B 2B 4B
Ethernet frame
23
Other Wireless Network
Bluetooth (802.15.1) • Very short range communication (<10m)
• Low power transmission
• Operate @ 2.45GHz • Bandwidth 1-3 Mbps
Piconet • A master device + up to 7 slave devices • Apply the frequency-hopping technique
• A slave device can be parked, which can be reactived by the master
24
Other Wireless Network (cont’d)
Cellular network • licensed spectrum
• Europe: 900MHz and 1800MHz; USA: 850-MHz and 1900MHz • A base station support 1+ cells • 3G standards are based on CDMA
• No hard limit on how many users can share a piece of spectrum
[1] 5G Mobile Networks: A Systems Approach, https://5g.systemsapproach.org/index.html [2] Ambient Backscatter: Wireless Communication Out of Thin Air, Sigcomm’13 [3] Enabling Deep-Tissue Networking for Miniature Medical Devices, Sigcomm’18
25