54
Jan 30, 2004 1 Chan, M.C. Wireless Network & TCP Dr. Chan Mun Choon School of Computing, NUS Jan 30, 2004 CS 5229

Jan 30, 2004

Embed Size (px)

Citation preview

Page 1: Jan 30, 2004

Jan 30, 2004 1 Chan, M.C.

Wireless Network & TCP

Dr. Chan Mun Choon

School of Computing, NUS

Jan 30, 2004

CS 5229

Page 2: Jan 30, 2004

Jan 30, 2004 2 Chan, M.C.

Admin

• About Me– Joined SOC Dec 2003– Member of Technical Staff in Bell Labs,

Lucent Technologies from 1997- 2003 – Office: S16 #04-07

• Dr. Shorey will meet students on Feb 6 to talk about projects

Page 3: Jan 30, 2004

Jan 30, 2004 3 Chan, M.C.

Overview

• Wireless Networks– Cellular Network– Wireless Local Area Network

• TCP over Wireless Networks– Problems with TCP congestion control– Solutions

Page 4: Jan 30, 2004

Jan 30, 2004 4 Chan, M.C.

Wireless Comes of Age• Guglielmo Marconi invented the wireless telegraph in

1896– Communication by encoding alphanumeric characters in

analog signal– Sent telegraphic signals across the Atlantic Ocean

• Communications satellites launched in 1960s• Advances in wireless technology

– Radio, television, mobile telephone

Page 5: Jan 30, 2004

Jan 30, 2004 5 Chan, M.C.

Evolution of Cellular Wireless Network

• First Generation – Analog– AMPS: North America

• Second Generation– TDMA

• GSM (SingTel/M1, Europe, AT&T)• NA-TDMA IS-136 (AT&T)

– CDMA (U.S.A.)• Third Generation

– WCDMA (Europe, Singapore)– CDMA2000 (U.S.A.)

• Fourth Generation– OFDM, WLAN ???

Page 6: Jan 30, 2004

Jan 30, 2004 6 Chan, M.C.

First Generation Analog System

• First Generation– Advanced Mobile Phone Service (AMPS)– Provide analog traffic channels– Developed by AT&T in 1970s– Early deployment in 1980s– > 40 million users in 1997

Page 7: Jan 30, 2004

Jan 30, 2004 7 Chan, M.C.

Going Beyond First Generation

• Capacity– Increase capacity by operating with smaller cells, add

spectrum, and/or use new technology to improve spectrum efficiency

• Roaming– Requires information transfer and business arrangement

between systems– Introduce IS-41

• Security– AMPS authentication procedures are weak– Introduce robust network security technology based on

encryption and secure key distribution

• Support for non-voice services

Page 8: Jan 30, 2004

Jan 30, 2004 8 Chan, M.C.

Second Generation System

• Introduced in the early 1990s• Digital traffic channel instead of analog• Since data and control traffic are sent in digital

form:– Encryption of traffic is simple– Error detection and corrections can be applied, voice

reception quality can be better– Multiple channels per cell, as well as multiple users

per channel (through TDMA or CDMA)

Page 9: Jan 30, 2004

Jan 30, 2004 9 Chan, M.C.

Third Generation Systems

• Provides high-speed wireless communication for multimedia– Voice: quality comparable to PSTN– Data: 144kpbs for high-speed user (driving), 384kpbs for slowly

moving user (walking) and 2.048Mbps for stationary user

• CDMA-based 3G systems more widely accepted– CDMA 2000 in US– UMTS in Europe

• 2.5G Systems– EDGE, GPRS (GSM)– 3G1x (2G CDMA)

Page 10: Jan 30, 2004

Jan 30, 2004 10 Chan, M.C.

Multiple Access

• Wireless channel is broadcast channel, need to separate the desired signal from interfering signals

• Earliest approach is frequency division multiple access (FDMA)

Page 11: Jan 30, 2004

Jan 30, 2004 11 Chan, M.C.

FDMA (Frequency Division Multiple Access)

• Similar to broadcast radio and TV, assign a different carrier frequency per call

• Modulation technique determines the required carrier spacing

• Each communicating wireless user gets his/her own carrier frequency on which to send data

• Need to set aside some frequencies that are operated in random-access mode to enable a wireless user to request and receive a carrier for data transmission

Page 12: Jan 30, 2004

Jan 30, 2004 12 Chan, M.C.

TDMA(Time Division Multiple Access)

• Each user transmits data on a time slot on multiple frequencies

• A time slot is a channel• A user sends data at an accelerated rate (by using many

frequencies) when its time slot begins• Data is stored at receiver and played back at original

slow rate

1 2 3 4 1 2 3 4

Page 13: Jan 30, 2004

Jan 30, 2004 13 Chan, M.C.

Frequency vs. timeF

requ

ency

Time

CarrierFDMA

Time

Fre

quen

cy

TDMA

Time

Fre

quen

cy

Hybrid FDMA/TDMA

• In practical systems, TDMA is often combined with FDMA

Page 14: Jan 30, 2004

Jan 30, 2004 14 Chan, M.C.

Duplex techniques

• Separates signals transmitted by base stations from signals transmitted by terminals– Frequency Division Duplex (FDD): use

separate sets of frequencies for forward and reverse channels (upstream and downstream)

– Time Division Duplex (TDD): same frequencies used in the two directions, but different time slots

Page 15: Jan 30, 2004

Jan 30, 2004 15 Chan, M.C.

Examples

• FDD:– Cellular systems: AMPS, NA-TDMA, CDMA,

GSM

• TDD– Cordless telephone systems: CT2, DECT,

PHS

Page 16: Jan 30, 2004

Jan 30, 2004 16 Chan, M.C.

Frequency Band Usage

Frequency Range Example Usage

300Hz – 3000Hz Analog telephone

300kHz to 3MHz AM Radio

3 to 30MHz Amateur Radio, international broadcasting (e.g. BBC)

30 to 300MHz VHF television, FM Radio

300 to 3000MHz UHF television, cellular telephone, PCS

3 to 30GHz Satellite communication, radar, wireless local loop

30 to 300GHz Experimental; WLL

300GHz to 400THz Infrared LAN, consumer electronics

400 to 900 THz Optical communication

Page 17: Jan 30, 2004

Jan 30, 2004 17 Chan, M.C.

Frequency Bands Usage Example

Frequency Range (MHz) Example Usage

824-849, 869-894 AMPS

NA-TDMA/IS-136

CDMA/IS-95

CDMA2000 3G1x

902-928, 2400-2484 ISM (Industrial Scientific Medical)

890-915, 935-960 GSM

1710-1785, 1805-1885 3G

1850-1910,1930-1990 3G

Page 18: Jan 30, 2004

Jan 30, 2004 18 Chan, M.C.

Issues

• Cellular networks have been traditionally designed mainly for voice applications. Next generation high speed wireless networks are expected to be data-centric. What are some of the components or assumptions that needs to be changed?

Page 19: Jan 30, 2004

Jan 30, 2004 19 Chan, M.C.

Wireless MAC protocols

Wireless MAC protocols

Fixed-assignment schemes (GSM)

Random-access schemes (802.11)

Demand assignment schemes (HDR)Circuit-switched CL packet-switched

CO packet-switched

Page 20: Jan 30, 2004

Jan 30, 2004 20 Chan, M.C.

Random access MAC protocols

• Comparable to connectionless packet-switching

• No reservations are made; instead a wireless endpoint simply starts sending data packets

• Access to control channels in GSM uses random access protocols

• 802.11 uses CSMA/CA

Page 21: Jan 30, 2004

Jan 30, 2004 21 Chan, M.C.

CSMA

• Carrier Sense Multiple Access– sense carrier– if idle, send– wait for ack

• If there isn’t one, assume there was a collision, retransmit

Page 22: Jan 30, 2004

Jan 30, 2004 22 Chan, M.C.

Hidden Terminal Problem

D

C

B

A

A can hear B but not C and DB can hear A and C but not DC can hear B and D but not A

C cannot detects transmission from A and thus CSMA does not work when C starts transmission to B

Page 23: Jan 30, 2004

Jan 30, 2004 23 Chan, M.C.

Mechanisms for CA

• Use of Request-To-Send (RTS) and Confirm-to-Send (CTS) mechanism– When a station wants to send a packet, it first sends

an RTS. The receiving station responds with a CTS. Stations that can hear the RTS or the CTS then mark that the medium will be busy for the duration of the request (indicated by Duration ID in the RTS and CTS)

– Stations will adjust their Network Allocation Vector (NAV): time that must elapse before a station can sample channel for idle status

• this is called virtual carrier sensing– RTS/CTS are smaller than long packets that can

collide

Page 24: Jan 30, 2004

Jan 30, 2004 24 Chan, M.C.

Exposed Terminal Problem

D

C

B

A

A can hear B but not C and DB can hear A and C but not DC can hear B and D but not AD can hear C but not A and B

C cannot transmit to B even if it will not interfere with transmission from B to A. As a result, network throughput is reduced.

RTS

CTS CTS

Page 25: Jan 30, 2004

Jan 30, 2004 25 Chan, M.C.

IEEE 802 Protocol Layers

Page 26: Jan 30, 2004

Jan 30, 2004 26 Chan, M.C.

Protocol Stack

Page 27: Jan 30, 2004

Jan 30, 2004 27 Chan, M.C.

802.11 MAC

• IEEE 802.11 combines a demand-assignment MAC protocol with random access– PCF (Point Coordination Mode) – Polling

• CFP (Contention-Free Period) in which access point polls hosts

– DCF (Distributed Coordination Mode)• CP (Contention Period) in which CSMA/CA is used

Page 28: Jan 30, 2004

Jan 30, 2004 28 Chan, M.C.

Interframe Space (IFS) Values

• Short IFS (SIFS)– Shortest IFS– Used for immediate response actions

• Point coordination function IFS (PIFS)– Midlength IFS– Used by centralized controller in PCF scheme when using polls

• Distributed coordination function IFS (DIFS)– Longest IFS– Used as minimum delay of asynchronous frames contending for

access

• SIFS < PIFS < DIFS– e.g. in 802.11, SIFS=28s, PIFS=78s, DIFS=128s, slot time=50s

Page 29: Jan 30, 2004

Jan 30, 2004 29 Chan, M.C.

IFS Usage

• SIFS– Acknowledgment (ACK)– Clear to send (CTS)– Poll response

• PIFS– Used by centralized controller in issuing polls– Takes precedence over normal contention traffic

• DIFS– Used for all ordinary asynchronous traffic

Page 30: Jan 30, 2004

Jan 30, 2004 30 Chan, M.C.

DCF mode transmission without RTS/CTS

source

destination

other

DIFSData

AckSIFS

NAV

Defer access

DIFSCW

Random backoff time• Send immediately (after DIFS) if medium is idle• If medium was busy when sensed, wait a CW after it becomes idle

(because many stations may be waiting when medium is busy; if they all send the instant the medium becomes idle, chances of collision are high)

Page 31: Jan 30, 2004

Jan 30, 2004 31 Chan, M.C.

PCF Mode

CPCFP CFP

Super-frame

Variable LengthCF-Burst, asynchronous traffic defers

• Allows time sensitive data to be transfer using a centralized scheduler (AP)• Makes use of PIFS, and can lock out all asynchronous traffic which uses DIFS (PIFS < DIFS)• Occupies the initial portion of a super-frame; asynchronous traffic contents for the rest of the super-frame

Page 32: Jan 30, 2004

Jan 30, 2004 32 Chan, M.C.

IEEE 802.11 Architecture

• Access point (AP)• Basic service set (BSS)

– Stations competing for access to shared wireless medium

– Isolated or connected to backbone DS through AP

• Distribution system (DS)• Extended service set (ESS)

– Two or more basic service sets interconnected by DS

Page 33: Jan 30, 2004

Jan 30, 2004 33 Chan, M.C.

Infrastructure based architecture

• Independent BSS (IBSS): has no AP – adhoc mode; only wireless stations

• Infrastructure BSS defined by stations sending Associations to register with an AP

Distribution System (DS)

Basic ServiceSet (BSS)

Access points (AP)Extended Service Set

(ESS)

Page 34: Jan 30, 2004

Jan 30, 2004 34 Chan, M.C.

Transition Types Based On Mobility

• No transition– Stationary or moves only within BSS

• BSS transition– Station moving from one BSS to another BSS

in same ESS

• ESS transition– Station moving from BSS in one ESS to BSS

within another ESS

Page 35: Jan 30, 2004

Jan 30, 2004 35 Chan, M.C.

TCP over wireless network

Page 36: Jan 30, 2004

Jan 30, 2004 36 Chan, M.C.

The “wireless” dimension

• Naturally broadcast medium– communications among some hosts are interference

for the other hosts• Poor/Unreliable link quality

– Harsh environment• continuously changing characteristics: uses adaptation• high error rate: uses FEC-based channel coding • bursty errors due to sudden fades: uses interleaving

– Mobility• signal strength varies with location• motion affects signals• must “change” channels during handoff

• Low/limited power

Page 37: Jan 30, 2004

Jan 30, 2004 37 Chan, M.C.

TCP OverviewTCP – connection-oriented reliable transport protocol that adapts to congestion in the network Assumes that losses are only caused by congestion in the network Congestion is assumed in the network if TCP sender receives triple duplicate acks or when doesn’t receive acks (timeout ~ RTT) TCP controls congestion by changing the congestion window size If there is a loss the sender reduces the window (and its sending rate) alleviating the congestion in the intermediate nodes.

TCP always reduces the throughput to alleviate congestion (losses)

Page 38: Jan 30, 2004

Jan 30, 2004 38 Chan, M.C.

TCP (Reno) Overview

Slow start

~ linear

loss (dup. Ack)

Fast retransmission

losses/disconnect

timeout

Congestion avoidance phase

TCP Congestion Window Evolution, AIMD

Page 39: Jan 30, 2004

Jan 30, 2004 39 Chan, M.C.

Losses = congestion is an assumption valid for fixed networks but not for wireless networks

• Fading channels have high bit error rate (BER), producing momentary losses that are not caused by congestion and doesn’t necessarily mean a future reduction in available bandwidth

• TCP congestion control results in a unnecessary reduction in end-to-end throughput

TCP Overview

Page 40: Jan 30, 2004

Jan 30, 2004 40 Chan, M.C.

Wireless Network Architecture

Internet

The wireless link is assumed to be the last hop where most of the loss and delay occurs.

Sender ReceiverMost traffic goes from wired network to wireless network

Page 41: Jan 30, 2004

Jan 30, 2004 41 Chan, M.C.

Transport Layer Loss in Wireless Networks

• Transmission errors– Harsh wireless link

• Handoffs– Misrouted packets during handoff

• Possible in Mobile IP– Mobile transceiver out of range

Page 42: Jan 30, 2004

Jan 30, 2004 42 Chan, M.C.

Improving TCP Performance

• Solves problem with transmission error over wireless links– Local recovery– End-to-end – Split connection

Page 43: Jan 30, 2004

Jan 30, 2004 43 Chan, M.C.

Local Recovery

Internet

Performs retransmission here if possible without getting TCP involves

Page 44: Jan 30, 2004

Jan 30, 2004 44 Chan, M.C.

Local Recovery

• Snoop (ACM Mobicom 95)– Caches unacknowledged TCP packets in base station– Performs local retransmission using packets in local

cache• Detects packet loss by snooping on sequence number of

acknowledgement packets (triple duplicate acks)• Suppress duplicate acks during local retransmission • Works better if transmission time over the wireless link is

significantly smaller than the coarse grain TCP timer and round trip time (in LAN environment)

– Performance improves through faster retransmission and less TCP congestion control

Page 45: Jan 30, 2004

Jan 30, 2004 45 Chan, M.C.

End-to-End Mechanism

Internet

• Modifies TCP endpoints to differentiate between congestion and transmission loss. • Help from intermediate router/base-station to differentiate between congestion and transmission loss.

Page 46: Jan 30, 2004

Jan 30, 2004 46 Chan, M.C.

End-to-end Mechanisms

• Explicit Loss Notification– RFC 2481

• Use bit 6 and 7 in TOS field of IP header to indicate congestion

• Use some of the 6-bits in the reserved field of TCP header

• TCP Hack (INFOCOM 2001) – TCP checksum covers both TCP header and data– Add separate checksum for TCP header– If data is corrupted, it is likely that header is fine since

data size is usually much larger than header size• Information in the header can be used to relay to the sender

that there is packet error due to transmission error instead of congestion

Page 47: Jan 30, 2004

Jan 30, 2004 47 Chan, M.C.

End-to-end MechanismsWTCP

• Wireless TCP (INFOCOM’99)

• WAN Environment assumed– Non-congestion related packet loss– Very low bandwidth (<19.2Kbps)– Large round trip time (800ms – 4sec)– Asymmetric Channel which leads to ack compression– Occasional blackouts lasting 10s or more

Page 48: Jan 30, 2004

Jan 30, 2004 48 Chan, M.C.

WTCP (Cont’d)

• Congestion Control– Use the ratio of the actual rate of the sender to the

observed rate at the receiver as the primary metric for rate control

– Additive increase/multiplicative decrease• If sending rate >> receiving rate, decrease send rate• Else If sending rate << receiving rate, increase send rate• Else maintain

• Reliability– SACK– No retransmission time-out. Instead send probe

packet to request for highest sequence number received to aid SACK

Page 49: Jan 30, 2004

Jan 30, 2004 49 Chan, M.C.

Split Connection

Internet

TCP sesssion from sender but terminates on BS

A separate transport session between base station and mobile device

Buffer

Page 50: Jan 30, 2004

Jan 30, 2004 50 Chan, M.C.

Split Connection

• Indirect-TCP and M-TCP– Split TCP connections into two TCP sessions– One TCP session is from sender (in the wireline

network) to “base-station” and the other session from “base-station” to receiver (in the wireless network)

– Packets are buffered at the “base-stations” until transmitted across the wireless connection

– Assumption is that latency over the wireless network is not a significant part of the end-to-end delay

– Violates end-to-end semantics

Page 51: Jan 30, 2004

Jan 30, 2004 51 Chan, M.C.

Split Connection (Cont’d)

• Another popular variation of the split connection approach is to used UDP between base station and mobile device and TCP between base station and wireline host.– Avoid using TCP congestion control over the wireless

links completely– Performs separate flow/congestion control in the last

hop (usually using a rate-estimation algorithm)– Violates end-to-end semantics– Example: Venturi Wireless

(http://www.venturiwireless.com)

Page 52: Jan 30, 2004

Jan 30, 2004 52 Chan, M.C.

TCP over 3G Cellular Trends in High-Speed 3G Wireless Network Design

– Extensive local retransmission to reduce impact of loss (particular useful for TCP)

• Earlier work in TCP focuses primarily on the issue of TCP’s problem in differentiating between congestion and link loss

• Improvement comes at the expense of increased delay variability

– Using scheduling to improve bandwidth utilization• High-speed wireless network uses channel-state based

scheduling to improve throughput – Schedule users with higher SNR to improve channel

usage efficiency • Improvement comes at the expense of increased rate

variability– What is the impact on TCP and how to improve throughput?

• Chan, M.C., Ramjee R, “TCP/IP Performance over 3G Wireless Links with Rate and Delay Variation”, ACM Mobicom 2002

Page 53: Jan 30, 2004

Jan 30, 2004 53 Chan, M.C.

Summary

• There are still many interesting and open problem on TCP over wireless networks.

• If you are interested in working in this area, please contact me ([email protected]) or Dr. Shorey ([email protected])

Page 54: Jan 30, 2004

Jan 30, 2004 54 Chan, M.C.

References

• W. Stallings, “Wireless Communications and Networks”, Prentice-Hall, 2002.

• http://www.ee.columbia.edu/~ramjee/ee6950

• Sonia Fahmy, Venkatesh Prabhakar, Srinivas R. Avasarala, Ossama Younis, TCP over Wireless Links: Mechanisms and Implications, Technical report CSD-TR-03-004, Purdue University, 2003