Transport Protocols
Kameswari Chebrolu
- Dept. of Electrical Engineering, IIT Kanpur
Transport Protocols Kameswari Chebrolu Dept. of Electrical - - PowerPoint PPT Presentation
Transport Protocols Kameswari Chebrolu Dept. of Electrical Engineering, IIT Kanpur End-to-End Protocols Convert host-to-host packet delivery service into a process-to-process communication channel Demultiplexing: Multiple applications
– Demultiplexing: Multiple applications can share the
– Ports are not interpreted globally – servers have well defined ports (look at /etc/services)
SrcPort DstPort Checksum Length Data
16 31
Application process Application process Application process UDP Packets arrive Ports Queues Packets demultiplexed
– Maintains state to provide reliable service
– Handles byte streams instead of messages
– Supports flow of data in each direction
– Prevents sender from overrunning the receiver
– Prevents sender from overloading the network
Application process Write bytes TCP Send buffer Segment Segment Segment Transmit segments Application process Read bytes TCP Receive buffer
■■■
Options (variable) Data Checksum SrcPort DstPort HdrLen Flags UrgPtr AdvertisedWindow SequenceNum Acknowledgment 4 10 16 31 Sender Data (SequenceNum) Acknowledgment + AdvertisedWindow Receiver
(client) (server) SYN, SequenceNum = x ACK, Acknowledgment =y+1 A c k n
l e d g m e n t = x + 1 S Y N + A C K , S e q u e n c e N u m = y ,
➢ Need mechanism for each side to learn other side's resources
➢
➢
➢
➢
– On 3rd dupack, retransmit packet, ssthresh = min
– Another dupack, cwnd = cwnd +1; transmit packet if
– On ack acknowledging new data, cwnd = ssthresh,
60 20 1.0 2.0 3.0 4.0 5.0 6.0 7.0 8.0 9.0 Time (seconds) 70 30 40 50 10 10.0
Sending application LastByteWritten TCP LastByteSent LastByteAcked Receiving application TCP LastByteRead NextByteExpected LastByteRcvd
– MaxSendBuffer and MaxRcvBuffer
– LastByteRcvd – LastByteRead <= MaxRcvBuffer – AdvertisedWindow = MaxRcvBuffer – ((NextByteExpected – 1) –
– MaxWindow = min (cwnd, AdvertisedWindow)
– EffectiveWindow = MaxWindow – (LastByteSent –
– LastByteWritten – LastByteAcked <= MaxSendBuffer – Persist when AdvertisedWindow is zero
– a is between 0.8-0.9 – small a heavily influenced by temporary fluctuations – large a not quick to adapt to real changes
– If variance is small, EstimatedRTT can be trusted – If variance is large, timeout should not depend
– 32 bit sequence number space
Bandwidth Time until Wraparound T1 (1.5Mbps) 6.6 hrs Ethernet (10Mbps) 57 minutes T3 (45 Mbps) 13 minutes FDDI (100Mbps) 6 minutes STS-3 (155Mbps) 4 minutes STS-12 (622Mbps) 55 seconds STS-24 (1.2Gbps) 28 seconds
– Sliding window based – Provides flow and congestion control