Wireless Network TCP Dr Chan Mun Choon School

  • Slides: 54
Download presentation
Wireless Network & TCP Dr. Chan Mun Choon School of Computing, NUS Jan 30,

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

Admin • About Me – Joined SOC Dec 2003 – Member of Technical Staff

Admin • About Me – Joined SOC Dec 2003 – Member of Technical Staff in Bell Labs, Lucent Technologies from 1997 - 2003 – Office: S 16 #04 -07 • Dr. Shorey will meet students on Feb 6 to talk about projects Jan 30, 2004 2 Chan, M. C.

Overview • Wireless Networks – Cellular Network – Wireless Local Area Network • TCP

Overview • Wireless Networks – Cellular Network – Wireless Local Area Network • TCP over Wireless Networks – Problems with TCP congestion control – Solutions Jan 30, 2004 3 Chan, M. C.

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

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 1960 s • Advances in wireless technology – Radio, television, mobile telephone Jan 30, 2004 4 Chan, M. C.

Evolution of Cellular Wireless Network • First Generation – Analog – AMPS: North America

Evolution of Cellular Wireless Network • First Generation – Analog – AMPS: North America • Second Generation – TDMA • GSM (Sing. Tel/M 1, Europe, AT&T) • NA-TDMA IS-136 (AT&T) – CDMA (U. S. A. ) • Third Generation – WCDMA (Europe, Singapore) – CDMA 2000 (U. S. A. ) • Fourth Generation – OFDM, WLAN ? ? ? Jan 30, 2004 5 Chan, M. C.

First Generation Analog System • First Generation – Advanced Mobile Phone Service (AMPS) –

First Generation Analog System • First Generation – Advanced Mobile Phone Service (AMPS) – Provide analog traffic channels – Developed by AT&T in 1970 s – Early deployment in 1980 s – > 40 million users in 1997 Jan 30, 2004 6 Chan, M. C.

Going Beyond First Generation • Capacity – Increase capacity by operating with smaller cells,

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 Jan 30, 2004 7 Chan, M. C.

Second Generation System • Introduced in the early 1990 s • Digital traffic channel

Second Generation System • Introduced in the early 1990 s • 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) Jan 30, 2004 8 Chan, M. C.

Third Generation Systems • Provides high-speed wireless communication for multimedia – Voice: quality comparable

Third Generation Systems • Provides high-speed wireless communication for multimedia – Voice: quality comparable to PSTN – Data: 144 kpbs for high-speed user (driving), 384 kpbs for slowly moving user (walking) and 2. 048 Mbps for stationary user • CDMA-based 3 G systems more widely accepted – CDMA 2000 in US – UMTS in Europe • 2. 5 G Systems – EDGE, GPRS (GSM) – 3 G 1 x (2 G CDMA) Jan 30, 2004 9 Chan, M. C.

Multiple Access • Wireless channel is broadcast channel, need to separate the desired signal

Multiple Access • Wireless channel is broadcast channel, need to separate the desired signal from interfering signals • Earliest approach is frequency division multiple access (FDMA) Jan 30, 2004 10 Chan, M. C.

FDMA (Frequency Division Multiple Access) • Similar to broadcast radio and TV, assign a

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 Jan 30, 2004 11 Chan, M. C.

TDMA (Time Division Multiple Access) • Each user transmits data on a time slot

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 Jan 30, 2004 2 3 4 1 12 2 3 4 Chan, M. C.

Frequency vs. time Carrier Time Hybrid FDMA/TDMA Frequency FDMA Time • In practical systems,

Frequency vs. time Carrier Time Hybrid FDMA/TDMA Frequency FDMA Time • In practical systems, TDMA is often combined with FDMA Jan 30, 2004 13 Chan, M. C.

Duplex techniques • Separates signals transmitted by base stations from signals transmitted by terminals

Duplex techniques • Separates signals transmitted by base stations from signals transmitted by terminals – Frequency Division Duplex (FDD): use separate sets of frequencies forward and reverse channels (upstream and downstream) – Time Division Duplex (TDD): same frequencies used in the two directions, but different time slots Jan 30, 2004 14 Chan, M. C.

Examples • FDD: – Cellular systems: AMPS, NA-TDMA, CDMA, GSM • TDD – Cordless

Examples • FDD: – Cellular systems: AMPS, NA-TDMA, CDMA, GSM • TDD – Cordless telephone systems: CT 2, DECT, PHS Jan 30, 2004 15 Chan, M. C.

Frequency Band Usage Frequency Range Example Usage 300 Hz – 3000 Hz Analog telephone

Frequency Band Usage Frequency Range Example Usage 300 Hz – 3000 Hz Analog telephone 300 k. Hz to 3 MHz AM Radio 3 to 30 MHz Amateur Radio, international broadcasting (e. g. BBC) 30 to 300 MHz VHF television, FM Radio 300 to 3000 MHz UHF television, cellular telephone, PCS 3 to 30 GHz Satellite communication, radar, wireless local loop 30 to 300 GHz Experimental; WLL 300 GHz to 400 THz Infrared LAN, consumer electronics 400 to 900 THz Optical communication Jan 30, 2004 16 Chan, M. C.

Frequency Bands Usage Example Frequency Range (MHz) Example Usage 824 -849, 869 -894 AMPS

Frequency Bands Usage Example Frequency Range (MHz) Example Usage 824 -849, 869 -894 AMPS NA-TDMA/IS-136 CDMA/IS-95 CDMA 2000 3 G 1 x 902 -928, 2400 -2484 ISM (Industrial Scientific Medical) 890 -915, 935 -960 GSM 1710 -1785, 1805 -1885 3 G 1850 -1910, 1930 -1990 3 G Jan 30, 2004 17 Chan, M. C.

Issues • Cellular networks have been traditionally designed mainly for voice applications. Next generation

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? Jan 30, 2004 18 Chan, M. C.

Wireless MAC protocols Fixed-assignment schemes (GSM) Random-access schemes (802. 11) Circuit-switched CL packet-switched Jan

Wireless MAC protocols Fixed-assignment schemes (GSM) Random-access schemes (802. 11) Circuit-switched CL packet-switched Jan 30, 2004 19 Demand assignment schemes (HDR) CO packet-switched Chan, M. C.

Random access MAC protocols • Comparable to connectionless packetswitching • No reservations are made;

Random access MAC protocols • Comparable to connectionless packetswitching • 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 Jan 30, 2004 20 Chan, M. C.

CSMA • Carrier Sense Multiple Access – sense carrier – if idle, send –

CSMA • Carrier Sense Multiple Access – sense carrier – if idle, send – wait for ack • If there isn’t one, assume there was a collision, retransmit Jan 30, 2004 21 Chan, M. C.

Hidden Terminal Problem A can hear B but not C and D B can

Hidden Terminal Problem A can hear B but not C and D B can hear A and C but not D C can hear B and D but not A B D A C C cannot detects transmission from A and thus CSMA does not work when C starts transmission to B Jan 30, 2004 22 Chan, M. C.

Mechanisms for CA • Use of Request-To-Send (RTS) and Confirm-to. Send (CTS) mechanism –

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 Jan 30, 2004 23 Chan, M. C.

Exposed Terminal Problem A can hear B but not C and D B can

Exposed Terminal Problem A can hear B but not C and D B can hear A and C but not D C can hear B and D but not A D can hear C but not A and B RTS B D CTS A C C cannot transmit to B even if it will not interfere with transmission from B to A. As a result, network throughput is reduced. Jan 30, 2004 24 Chan, M. C.

IEEE 802 Protocol Layers Jan 30, 2004 25 Chan, M. C.

IEEE 802 Protocol Layers Jan 30, 2004 25 Chan, M. C.

Protocol Stack Jan 30, 2004 26 Chan, M. C.

Protocol Stack Jan 30, 2004 26 Chan, M. C.

802. 11 MAC • IEEE 802. 11 combines a demand-assignment MAC protocol with random

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 Jan 30, 2004 27 Chan, M. C.

Interframe Space (IFS) Values • Short IFS (SIFS) – Shortest IFS – Used for

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=28 ms, PIFS=78 ms, DIFS=128 ms, slot time=50 ms Jan 30, 2004 28 Chan, M. C.

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

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 Jan 30, 2004 29 Chan, M. C.

DCF mode transmission without RTS/CTS DIFS source Data SIFS destination other Ack DIFS NAV

DCF mode transmission without RTS/CTS DIFS source Data SIFS destination other Ack DIFS NAV Defer access CW 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) Jan 30, 2004 30 Chan, M. C.

PCF Mode CP CFP Super-frame CF-Burst, asynchronous traffic defers Variable Length • Allows time

PCF Mode CP CFP Super-frame CF-Burst, asynchronous traffic defers Variable Length • 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 Jan 30, 2004 31 Chan, M. C.

IEEE 802. 11 Architecture • Access point (AP) • Basic service set (BSS) –

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 Jan 30, 2004 32 Chan, M. C.

Infrastructure based architecture et nded e t x E ) (ESS e. S c

Infrastructure based architecture et nded e t x E ) (ESS e. S c i v r Se Distribution System (DS) Access points (AP) Basic Service Set (BSS) • • Jan 30, 2004 Independent BSS (IBSS): has no AP – adhoc mode; only wireless stations Infrastructure BSS defined by stations sending Associations to register with an 33 AP Chan, M. C.

Transition Types Based On Mobility • No transition – Stationary or moves only within

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 Jan 30, 2004 34 Chan, M. C.

TCP over wireless network Jan 30, 2004 35 Chan, M. C.

TCP over wireless network Jan 30, 2004 35 Chan, M. C.

The “wireless” dimension • Naturally broadcast medium – communications among some hosts are interference

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 Jan 30, 2004 36 Chan, M. C.

TCP Overview TCP – connection-oriented reliable transport protocol that adapts to congestion in the

TCP Overview TCP – connection-oriented reliable transport protocol that adapts to congestion in the network u Assumes that losses are only caused by congestion in the network u Congestion is assumed in the network if TCP sender receives triple duplicate acks or when doesn’t receive acks (timeout ~ RTT) u TCP controls congestion by changing the congestion window size u 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) Jan 30, 2004 37 Chan, M. C.

TCP (Reno) Overview loss (dup. Ack) losses/disconnect ~ linear timeout Slow start Fast retransmission

TCP (Reno) Overview loss (dup. Ack) losses/disconnect ~ linear timeout Slow start Fast retransmission TCP Congestion Window Evolution, AIMD Congestion avoidance phase Jan 30, 2004 38 Chan, M. C.

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

TCP Overview 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 Jan 30, 2004 39 Chan, M. C.

Wireless Network Architecture Sender Most traffic goes from wired network to wireless network Receiver

Wireless Network Architecture Sender Most traffic goes from wired network to wireless network Receiver Internet The wireless link is assumed to be the last hop where most of the loss and delay occurs. Jan 30, 2004 40 Chan, M. C.

Transport Layer Loss in Wireless Networks • Transmission errors – Harsh wireless link •

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 Jan 30, 2004 41 Chan, M. C.

Improving TCP Performance • Solves problem with transmission error over wireless links – Local

Improving TCP Performance • Solves problem with transmission error over wireless links – Local recovery – End-to-end – Split connection Jan 30, 2004 42 Chan, M. C.

Local Recovery Internet Performs retransmission here if possible without getting TCP involves Jan 30,

Local Recovery Internet Performs retransmission here if possible without getting TCP involves Jan 30, 2004 43 Chan, M. C.

Local Recovery • Snoop (ACM Mobicom 95) – Caches unacknowledged TCP packets in base

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 Jan 30, 2004 44 Chan, M. C.

End-to-End Mechanism Internet • Modifies TCP endpoints to differentiate between congestion and transmission loss.

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. Jan 30, 2004 45 Chan, M. C.

End-to-end Mechanisms • Explicit Loss Notification – RFC 2481 • Use bit 6 and

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 Jan 30, 2004 46 Chan, M. C.

End-to-end Mechanisms WTCP • Wireless TCP (INFOCOM’ 99) • WAN Environment assumed – –

End-to-end Mechanisms WTCP • Wireless TCP (INFOCOM’ 99) • WAN Environment assumed – – – Non-congestion related packet loss Very low bandwidth (<19. 2 Kbps) Large round trip time (800 ms – 4 sec) Asymmetric Channel which leads to ack compression Occasional blackouts lasting 10 s or more Jan 30, 2004 47 Chan, M. C.

WTCP (Cont’d) • Congestion Control – Use the ratio of the actual rate of

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 Jan 30, 2004 48 Chan, M. C.

Split Connection Internet Buffer TCP sesssion from sender but terminates on BS Jan 30,

Split Connection Internet Buffer TCP sesssion from sender but terminates on BS Jan 30, 2004 49 A separate transport session between base station and mobile device Chan, M. C.

Split Connection • Indirect-TCP and M-TCP – Split TCP connections into two TCP sessions

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 Jan 30, 2004 50 Chan, M. C.

Split Connection (Cont’d) • Another popular variation of the split connection approach is to

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) Jan 30, 2004 51 Chan, M. C.

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

TCP over 3 G Cellular Trends in High-Speed 3 G 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 3 G Wireless Links with Rate and Delay Variation”, ACM Mobicom 2002 Jan 30, 2004 52 Chan, M. C.

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

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 (chanmc@comp. nus. edu. sg) or Dr. Shorey (rajeev@comp. nus. edu. sg) Jan 30, 2004 53 Chan, M. C.

References • W. Stallings, “Wireless Communications and Networks”, Prentice-Hall, 2002. • http: //www. ee.

References • W. Stallings, “Wireless Communications and Networks”, Prentice-Hall, 2002. • http: //www. ee. columbia. edu/~ramjee/ee 69 50 • 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 Jan 30, 2004 54 Chan, M. C.