Download presentation
Presentation is loading. Please wait.
1
TCP Overview
2
End to end issues
3
Segment format
4
Connection establishment
6
TCP sliding window
8
Stream control Transmission Protocol
9
Simple demultiplexor
10
TCP Congestion Control
Determines the network capacity Adjust the number of packets that can have safely in transit Acks to pace the transmission of packets TCP is self clocking Avoids congestion Maxwindow=MIN(CongestionWindow,AdvertisedWindow) EffectiveWindow=MaxWindow-(LastByteSent-LastByteAcked)
11
Caused By the shortage of buffer space. slow links. slow processors
Possible solutions End-to-end versus link-by-link control Rate-Based versus Credit-Based control The rate-based traffic-flow technique constantly Integrated congestion control
12
Principles of Congestion Control
informally: “too many sources sending too much data too fast for network to handle” different from flow control! manifestations: lost packets (buffer overflow at routers) long delays (queueing in router buffers) a top-10 problem!
13
Scenario 1: Queuing Delays
unlimited shared output link buffers Host A lin : original data Host B lout two senders, two receivers one router, infinite buffers no retransmission large delays when congested maximum achievable throughput
14
Scenario 2: Retransmits
one router, finite buffers sender retransmission of lost packet Host A lout lin : original data l'in : original data, plus retransmitted data Host B finite shared output link buffers
15
Scenario 3: Congestion Near Receiver
four senders multihop paths timeout/retransmit l in Q: what happens as and increase ? l in Host A lout lin : original data l'in : original data, plus retransmitted data finite shared output link buffers Host B
16
Approaches towards congestion control
Two broad approaches towards congestion control: End-end congestion control: no explicit feedback from network congestion inferred from end-system observed loss, delay approach taken by TCP Network-assisted congestion control: routers provide feedback to end systems single bit indicating congestion (SNA, DECbit, TCP/IP ECN, ATM) explicit rate sender should send at
17
TCP Congestion Control
end-end control (no network assistance) sender limits transmission: LastByteSent-LastByteAcked CongWin Roughly, CongWin is dynamic, function of perceived network congestion How does sender perceive congestion? loss event = timeout or 3 duplicate acks TCP sender reduces rate (CongWin) after loss event three mechanisms: AIMD slow start conservative after timeout events rate = CongWin RTT Bytes/sec
18
TCP AIMD multiplicative decrease: cut CongWin in half after loss event
additive increase: increase CongWin by 1 MSS every RTT in the absence of loss events: probing Long-lived TCP connection
19
TCP Slow Start When connection begins, increase rate exponentially fast until first loss event When connection begins, CongWin = 1 MSS Example: MSS = 500 bytes & RTT = 200 msec initial rate = 20 kbps available bandwidth may be >> MSS/RTT desirable to quickly ramp up to respectable rate
20
TCP Slow Start (more) When connection begins, increase rate exponentially until first loss event: double CongWin every RTT done by incrementing CongWin for every ACK received Summary: initial rate is slow but ramps up exponentially fast Host A Host B one segment RTT two segments four segments time
21
Refinement (more) Implementation: Variable Threshold
Q: When should the exponential increase switch to linear? A: When CongWin gets to 1/2 of its value before timeout. Implementation: Variable Threshold At loss event, Threshold is set to 1/2 of CongWin just before loss event
22
TCP sender congestion control
Event State TCP Sender Action Commentary ACK receipt for previously unacked data Slow Start (SS) CongWin = CongWin + MSS, If (CongWin > Threshold) set state to “Congestion Avoidance” Resulting in a doubling of CongWin every RTT Congestion Avoidance (CA) CongWin = CongWin+MSS * (MSS/CongWin) Additive increase, resulting in increase of CongWin by 1 MSS every RTT Loss event detected by triple duplicate ACK SS or CA Threshold = CongWin/2, CongWin = Threshold, Set state to “Congestion Avoidance” Fast recovery, implementing multiplicative decrease. CongWin will not drop below 1 MSS. Timeout CongWin = 1 MSS, Set state to “Slow Start” Enter slow start Duplicate ACK Increment duplicate ACK count for segment being acked CongWin and Threshold not changed
23
Congestion Avoidance Mechanisms
Helps to avoid congestion Additional functionality into the router to assist in anticipation of congestion to control congestion once it happens to repeatedly increase load in an effort to find the point at which congestion occurs, and then back off
24
Mechanisms router-centric: DECbit and RED Gateways
host-centric: TCP Vegas
25
DECbit
26
DECbit Add binary congestion bit to each packet header Router
monitors average queue length over last busy+idle cycle set congestion bit if average queue length greater than 1 when packet arrives attempts to balance throughput against delay
27
DECbit End Hosts destination echos bit back to source
source records how many packets resulted in set bit if less than 50% of last window's worth had bit set, then increase CongestionWindow by 1 packet if 50% or more of last window's worth had bit set, then decrease CongestionWindow by 0.875 times
28
UDP—User Datagram Protocol
An unreliable, connectionless transport layer protocol UDP format. See picture Two additional functions beyond IP: Demultiplexing: deliver to different upper layer entities such as DNS, RTP, SNMP based on the destination port # in the header. i.e., UDP can support multiple applications in the same end systems. (Optionally) check the integrity of entire UDP. (recall IP only checks the integrity of IP header.) If source does not want to compute checksum, fill checksum with all 0s. If compute checksum and the checksum happens to be 0s, then fill all 1s. UDP checksum computation is similar to IP checksum, with two more: Add extra 0s to entire datagram if not multiple of 16 bits. Add pseudoheader to the beginning of datagram. UDP pseudoheader
29
Back to UDP—User Datagram Protocol
UDP datagram Source Port Destination Port UDP Length UDP Checksum Data Back to UDP—User Datagram Protocol Figure 8.16
30
Back to UDP—User Datagram Protocol
UDP pseudoheader Source IP Address Destination IP Address Protocol = UDP Length 1.Pseudoheader is to ensure that the datagram has indeed reached the correct destination host and port. 2. The padding of 0s and pseudoheader is only for the computation of checksum and not be transmitted. Figure 8.17
31
Thank u
Similar presentations
© 2024 SlidePlayer.com Inc.
All rights reserved.