1 1 The Transport Layer: Review Smith College, CSC 249 February 22, 2018 2 TCP Congestion Control 1. How does a sender sense congestion? v 2. How does a sender determine its sending rate? v v 3. What algorithm is used to change the send-rate? v Many phases and alternatives...
15
Embed
The Transport Layer: Reviejcardell/Courses/CSC249/slides/C9_249.pdfTransport Layer Summary qTCP and UDP Services qEncapsulation (create and attach header) qMultiplexing and demultiplexing
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
1
1
The Transport Layer: Review
Smith College, CSC 249February 22, 2018
2
TCP Congestion Control1. How does a sender sense congestion?
v Loss event – timeout vs. 3 duplicate ACKs2. How does a sender determine its
sending rate?v The dynamic variable “CWND” (congestion window)v Variable ssthresh to determine how to grow cwnd
3. What algorithm is used to change the send-rate? v Many phases and alternatives...
2
3
5
Reaction to Loss Eventsq Exponential increase switches to linear increase
when CongWin gets to the ‘threshold’ value (size)
3
6
Identify everything on this graph
7
TCP Congestion Control AlgorithmIncrease Sending Rate Phase Options:1. When CongWin is below Threshold, sender in
slow-start phase, window grows exponentially.2. When CongWin is above Threshold, sender is in
v Manyoperatingsystemsauto-adjustRcvBufferq Sender limitsamountofun-ACKed (“in-flight”)datatoreceiver’srwnd valuev Guaranteesreceivebufferwillnotoverflow
9
19
TCP flow controlapplicationprocess
TCP socketreceiver buffers
TCPcode
IPcode
applicationOS
receiver protocol stack
The application may remove data from the TCP socket buffers ….
… slower than the TCP receiver is delivering it into the buffers
(sender is sending)
from sender
receiver controls sender, so sender won’t overflow receiver’s buffer by transmitting too much, too fast
flow control to the rescue!
20
Transport Layer ReviewqOther questions?
v
v
v
v
v
v
v
v
10
A fun tangent... Finite State Machines
21
Finite State Machines
22
11
23
TCP sender events:(1) data received from application:
1. Create a segment and assign a SEQ numberv SEQ # is byte-stream number of first data byte in segment
2. Start timer if it is not already runningv Timer is for the oldest un-acked segmentv Expiration interval: TimeOutInterval
(2) timeout:1. Retransmit segment that caused the timeout2. Restart the timer
(3) ACK received:q For previously unacked segments
1. update what is known to be acked2. start timer if there are outstanding segments
24
TCP Congestion Control
12
3-25
TCP Congestion Control: FSM
slow start
congestionavoidance
fastrecovery
loss:timeout
loss:timeout
new ACK
loss:3dupACK
loss:3dupACK
loss:timeout
cwnd > ssthresh
Transport Layer Summaryq TCP and UDP Servicesq Encapsulation (create and attach header)q Multiplexing and demultiplexingq Checksumq Connection managementq Reliable transport serviceq Congestion controlq Detect loss and retransmit
v Detect out-of-order and reorderq Flow Control
26
13
27
Transport services and protocols
q Provide logical communication, a virtual connection
…between application processes running on different hosts
This is not a physical path including routers
applicationtransportnetworkdata linkphysical
applicationtransportnetworkdata linkphysical
Introduction to the Network LayerqDesired network layer services...
ØActual network layer servicesqImplemented in hosts and routersqTwo main network layer functionsqThree main network layer protocols
28
14
32
Network Layer Services of IP?q Guaranteed delivery?q Guaranteed minimum delay?q In-order datagram delivery?q Guaranteed minimum bandwidth to
flow?q Restrictions on changes in inter-
packet spacing?
q IP Provides? à “Best-effort service”
33
Key Network-Layer Functions1. routing: determine route taken by
packets from source to destinationvNetwork-wide routing algorithms
2. forwarding: move packets from router’s input link to appropriate output linkvInternal to a single router
15
34
1
23
0111
Destination addressvalue in arrivingpacket’s header