tcp in wireless mobile networks - uni koblenz-landauunikorn/lehre/drako/ws13/07 tcp... · tcp in...

26
TCP in Wireless Mobile Networks 1 Based on slide set from Prof. Jie Gao Spring 2006 CSE370 Wireless and Mobile Networking Computer Science Department Stony Brook University

Upload: phungnhan

Post on 24-Mar-2018

223 views

Category:

Documents


2 download

TRANSCRIPT

Page 1: TCP in Wireless Mobile Networks - Uni Koblenz-Landauunikorn/lehre/drako/ws13/07 TCP... · TCP in Wireless Mobile Networks 1 ... D Indirect TCP D 2 TCP sessions. D Snooping TCP D One

TCP in Wireless MobileNetworks

1

Based on slide set from Prof. Jie Gao Spring 2006 CSE370 Wireless and Mobile NetworkingComputer Science DepartmentStony Brook University

Page 2: TCP in Wireless Mobile Networks - Uni Koblenz-Landauunikorn/lehre/drako/ws13/07 TCP... · TCP in Wireless Mobile Networks 1 ... D Indirect TCP D 2 TCP sessions. D Snooping TCP D One

TCP

2

- Reliable ordered delivery- Implements congestion avoidance and control- Reliability achieved by means of

retransmissions if necessary- End-to-end semantics

O Acknowledgements sent to TCP sender confirmdelivery of data received by TCP receiver

O Ack for data sent only after data has reached receiver

Page 3: TCP in Wireless Mobile Networks - Uni Koblenz-Landauunikorn/lehre/drako/ws13/07 TCP... · TCP in Wireless Mobile Networks 1 ... D Indirect TCP D 2 TCP sessions. D Snooping TCP D One

TCP Basics

3

- Cumulative acknowledgements- An acknowledgement ack’s all contiguously

received data (segments)- TCP assigns byte sequence numbers

- (For simplicity, we will assignpacket sequence numbers)

- A new cumulative acknowledgement is generated only on receipt of a new in-sequence packet

Page 4: TCP in Wireless Mobile Networks - Uni Koblenz-Landauunikorn/lehre/drako/ws13/07 TCP... · TCP in Wireless Mobile Networks 1 ... D Indirect TCP D 2 TCP sessions. D Snooping TCP D One

Delayed Acknowledgements

D An ack is delayed untilO another packet is received, orO delayed ack timer expires (200 ms typical)

D Reduces ack traffic

4

Page 5: TCP in Wireless Mobile Networks - Uni Koblenz-Landauunikorn/lehre/drako/ws13/07 TCP... · TCP in Wireless Mobile Networks 1 ... D Indirect TCP D 2 TCP sessions. D Snooping TCP D One

Duplicate Acknowledgements

5

D A dupack is generated whenever an out-of-order segment arrives at the receiver

D What may cause packets to arrive OOO?O Dropped segment: all the segments after the

dropped segment are OOO.O Re-ordering the packets in the network.O Replication of ACK or data segments by the

network.D TCP uses fast retransmit/fast recovery for

dupack.

Page 6: TCP in Wireless Mobile Networks - Uni Koblenz-Landauunikorn/lehre/drako/ws13/07 TCP... · TCP in Wireless Mobile Networks 1 ... D Indirect TCP D 2 TCP sessions. D Snooping TCP D One

Outline

6

D Classical TCP improvementD Indirect TCPD Snooping TCPD Mobile TCPD Fast retransmission, fast recoveryD FreezingD Selective retransmission

Page 7: TCP in Wireless Mobile Networks - Uni Koblenz-Landauunikorn/lehre/drako/ws13/07 TCP... · TCP in Wireless Mobile Networks 1 ... D Indirect TCP D 2 TCP sessions. D Snooping TCP D One

Indirect-TCP

D Split a TCP connection at the foreign agent into 2 TCP connections

O hosts in the fixed part of the network do not notice the characteristics of the wireless part

• no changes to the TCP protocol for hosts connected to thewired Internet, millions of computers use (variants of) thisprotocol

O optimized TCP protocol for mobile hosts

mobile hostaccess point(foreign agent) „wired“ Internet

“wireless” TCP standard TCP

7

Page 8: TCP in Wireless Mobile Networks - Uni Koblenz-Landauunikorn/lehre/drako/ws13/07 TCP... · TCP in Wireless Mobile Networks 1 ... D Indirect TCP D 2 TCP sessions. D Snooping TCP D One

Indirect TCP

8

D The access point acts as proxy in both directions.

D AP acknowledges to both the sender andreceiver.

D Re-transmission on wireless links is handledlocally.

D During handover, the buffered packets, aswell as the system state (packet sequencenumber, acknowledgements, ports, etc), must migrate the new agent.

Page 9: TCP in Wireless Mobile Networks - Uni Koblenz-Landauunikorn/lehre/drako/ws13/07 TCP... · TCP in Wireless Mobile Networks 1 ... D Indirect TCP D 2 TCP sessions. D Snooping TCP D One

I-TCP Socket and State Migration

access point1mobile host

Internet

access point2

socket migration and state transfer

9

Page 10: TCP in Wireless Mobile Networks - Uni Koblenz-Landauunikorn/lehre/drako/ws13/07 TCP... · TCP in Wireless Mobile Networks 1 ... D Indirect TCP D 2 TCP sessions. D Snooping TCP D One

Advantages of I-TCP

10

D No changes in the fixed network necessary, nochanges for the hosts (TCP protocol) necessary, all current optimizations to TCP still work

D Simple to control, mobile TCP is used only for onehop between, e.g., a foreign agent and mobile hostO transmission errors on the wireless link do not propagate

into the fixed networkO therefore, a very fast retransmission of packets is

possible, the short delay on the mobile hop is known

Page 11: TCP in Wireless Mobile Networks - Uni Koblenz-Landauunikorn/lehre/drako/ws13/07 TCP... · TCP in Wireless Mobile Networks 1 ... D Indirect TCP D 2 TCP sessions. D Snooping TCP D One

Advantages of I-TCP

11

D It is always dangerous to introduce newmechanisms in a huge network without knowing exactly how they behave.O New optimizations can be tested at the last hop,

without jeopardizing the stability of theInternet.

D It is easy to use different protocols forwired and wireless networks.

Page 12: TCP in Wireless Mobile Networks - Uni Koblenz-Landauunikorn/lehre/drako/ws13/07 TCP... · TCP in Wireless Mobile Networks 1 ... D Indirect TCP D 2 TCP sessions. D Snooping TCP D One

Disadvantages of I-TCP

12

D Loss of end-to-end semanticsO an acknowledgement to a sender no longer means

that a receiver really has received a packet ---foreign agents might crash.

D Higher latency possibleO due to buffering of data within the foreign agent

and forwarding to a new foreign agent

D Security issueO The foreign agent must be a trusted entity.

Page 13: TCP in Wireless Mobile Networks - Uni Koblenz-Landauunikorn/lehre/drako/ws13/07 TCP... · TCP in Wireless Mobile Networks 1 ... D Indirect TCP D 2 TCP sessions. D Snooping TCP D One

Snooping TCP

13

D Indirect TCPD 2 TCP sessions.

D Snooping TCPD One TCP session.D The access point snoops into the traffic and

buffers packets for fast re-transmission.

Page 14: TCP in Wireless Mobile Networks - Uni Koblenz-Landauunikorn/lehre/drako/ws13/07 TCP... · TCP in Wireless Mobile Networks 1 ... D Indirect TCP D 2 TCP sessions. D Snooping TCP D One

Snoop TCP

D Transparent extension of TCP within the foreign agentO changes of TCP only within the foreign agentO buffering of packets sent to the mobile hostO lost packets on the wireless link (both directions!) will be

retransmitted immediately by the mobile host or foreign agent,respectively (so called “local” retransmission)

O the foreign agent therefore “snoops” the packet flow and recognizes acknowledgements in both directions, it also filters ACKs

„wired“ Internet

snooping of ACKs buffering of data

end-to-end TCP connection

local retransmission correspondent hostforeign

agent

mobile host

14

Page 15: TCP in Wireless Mobile Networks - Uni Koblenz-Landauunikorn/lehre/drako/ws13/07 TCP... · TCP in Wireless Mobile Networks 1 ... D Indirect TCP D 2 TCP sessions. D Snooping TCP D One

Snooping TCP

15

D Data transfer to the mobile hostO FA buffers data until it receives ACK of the MH,

FA detects packet loss via duplicated ACKs or time-out

O fast retransmission possible, transparent for thefixed network

D Data transfer from the mobile hostO FA detects packet loss on the wireless link via

sequence numbers, FA answers directly with aNACK to the MH

O MH can now retransmit data with only a veryshort delay

Page 16: TCP in Wireless Mobile Networks - Uni Koblenz-Landauunikorn/lehre/drako/ws13/07 TCP... · TCP in Wireless Mobile Networks 1 ... D Indirect TCP D 2 TCP sessions. D Snooping TCP D One

Snooping TCP

16

D AdvantagesO End-to-end semantics is preserved.O Handover is easy. I-TCP requires a careful

handover of the system state. Here it falls back to the standard solution if no enhancements.

D ProblemsO snooping TCP does not isolate the wireless link as

good as I-TCPO snooping might be useless depending on

encryption schemes

Page 17: TCP in Wireless Mobile Networks - Uni Koblenz-Landauunikorn/lehre/drako/ws13/07 TCP... · TCP in Wireless Mobile Networks 1 ... D Indirect TCP D 2 TCP sessions. D Snooping TCP D One

Mobile TCP

17

D What if the mobile node is disconnected?D I-TCP

O more packets are buffered at AP.D Snooping TCP

O no more snoopingO Missing acknowledgement, TCP goes to slow-start.

D Mobile TCPO Improve efficiency.O Special handling of lengthy and/or frequent

disconnections.

Page 18: TCP in Wireless Mobile Networks - Uni Koblenz-Landauunikorn/lehre/drako/ws13/07 TCP... · TCP in Wireless Mobile Networks 1 ... D Indirect TCP D 2 TCP sessions. D Snooping TCP D One

Mobile TCP

D M-TCP splits as I-TCP doesO unmodified TCP fixed network to supervisory host (SH)O optimized TCP SH to MH

D Supervisory hostO no caching, no local retransmissionO monitors all packets, if disconnection detected

• set sender window size to 0• sender automatically goes into persistent mode

O old or new SH reopen the window

mobile hostaccess point(foreign agent) „wired“ Internet

“wireless” TCP standard TCP

18

Page 19: TCP in Wireless Mobile Networks - Uni Koblenz-Landauunikorn/lehre/drako/ws13/07 TCP... · TCP in Wireless Mobile Networks 1 ... D Indirect TCP D 2 TCP sessions. D Snooping TCP D One

Mobile TCP

19

D Advantages:O End-to-end semantics.O When mobile host is disconnected, it avoids

useless retransmissions and slow-start.O No buffering, handover is easy.

D Disadvantages:O Packet loss at the wireless link propagates back

to sender.

Page 20: TCP in Wireless Mobile Networks - Uni Koblenz-Landauunikorn/lehre/drako/ws13/07 TCP... · TCP in Wireless Mobile Networks 1 ... D Indirect TCP D 2 TCP sessions. D Snooping TCP D One

Time-out freezing

20

D Mobile hosts can be disconnected for a longer timeO no packet exchange possible, e.g., in a tunnel, disconnection

due to overloaded cells or mux. with higher priority trafficO TCP disconnects after time-out completely

D TCP freezingO MAC layer is often able to detect interruption in advanceO MAC can inform TCP layer of upcoming loss of connectionO TCP stops sending, but does now not assume a congested

linkO MAC layer signals again if reconnected

Page 21: TCP in Wireless Mobile Networks - Uni Koblenz-Landauunikorn/lehre/drako/ws13/07 TCP... · TCP in Wireless Mobile Networks 1 ... D Indirect TCP D 2 TCP sessions. D Snooping TCP D One

Time-out freezing

21

D AdvantageO scheme is independent of data

D DisadvantageO TCP on mobile host has to be changed, mechanism

depends on MAC layer

Page 22: TCP in Wireless Mobile Networks - Uni Koblenz-Landauunikorn/lehre/drako/ws13/07 TCP... · TCP in Wireless Mobile Networks 1 ... D Indirect TCP D 2 TCP sessions. D Snooping TCP D One

Selective retransmission

22

D TCP acknowledgements are often cumulativeO ACK n acknowledges correct and in-sequence receipt of

packets up to nO if single packets are missing quite often a whole packet

sequence beginning at the gap has to be retransmitted (go-back-n), thus wasting bandwidth

D Selective retransmission as one solutionO RFC2018 allows for acknowledgements of single packets,

not only acknowledgements of in-sequence packet streams without gaps

O sender can now retransmit only the missing packets

Page 23: TCP in Wireless Mobile Networks - Uni Koblenz-Landauunikorn/lehre/drako/ws13/07 TCP... · TCP in Wireless Mobile Networks 1 ... D Indirect TCP D 2 TCP sessions. D Snooping TCP D One

Selective retransmission

23

D AdvantageO much higher efficiency

D DisadvantageO more complex software in a receiver, more buffer

needed at the receiver

Page 24: TCP in Wireless Mobile Networks - Uni Koblenz-Landauunikorn/lehre/drako/ws13/07 TCP... · TCP in Wireless Mobile Networks 1 ... D Indirect TCP D 2 TCP sessions. D Snooping TCP D One

Comparison

24

Approach Mechanism Advantages DisadvantagesIndirect TCP splits TCP connection

into two connectionsisolation of wireless link, simple

loss of TCP semantics, higher latency at handover

Snooping TCP “snoops” data and acknowledgements, local retransmission

transparent for end-to-end connection, MAC integration possible

problematic with encryption, bad isolation of wireless link

M-TCP splits TCP connection, chokes sender via window size

Maintains end-to-end semantics, handles long term and frequent disconnections

Bad isolation of wireless link, processing overhead due to bandwidth management

Transmission/ time-out freezing

freezes TCP state atdisconnect, resumesafter reconnection

independent of contentor encryption, works forlonger interrupts

changes in TCP required, MAC dependant

Selective retransmission

retransmit only lost data very efficient slightly more complex receiver software, more buffer needed

Page 25: TCP in Wireless Mobile Networks - Uni Koblenz-Landauunikorn/lehre/drako/ws13/07 TCP... · TCP in Wireless Mobile Networks 1 ... D Indirect TCP D 2 TCP sessions. D Snooping TCP D One

Summary

D Classical TCP improvementD Indirect TCPD Snooping TCPD Mobile TCPD FreezingD Selective retransmission

25

Page 26: TCP in Wireless Mobile Networks - Uni Koblenz-Landauunikorn/lehre/drako/ws13/07 TCP... · TCP in Wireless Mobile Networks 1 ... D Indirect TCP D 2 TCP sessions. D Snooping TCP D One

TCP und Drahtlose/Mobile Kommunikation• TCP wurde im Hinblick auf Staukontrolle entwickelt

– Fundamentale Annahme: Segmente gehen in der Regel aufgrund überlasteter Router verloren

– Ergo ist es sinnvoll die erzeugte Last über die Sendefenstergröße zu regulieren

• TCP Strategie ist suboptimal für drahtlose Kommunikation– Drahtlosübertragung: Segmenten gehen aufgrund eines kurzzeitigen Übertragungsfehlers verloren (Überlast liegt nicht notwendigerweise vor)

– TCP‐Fenster sind somit in der Regel zu kleine  schlechte Performance

• Generelle TCP Verbesserungen (dafür Sorge tragen, dass Sendefenstergröße der bedienbaren Last entsprechend erhalten bleiben)– TCP unverändert beibehalten (z.B. Indirect TCP)– TCP erweitern– (Cross‐Layering) 

26