csee w4140 networking laboratory
Skip this Video
Download Presentation
CSEE W4140 Networking Laboratory

Loading in 2 Seconds...

play fullscreen
1 / 21

CSEE W4140 Networking Laboratory - PowerPoint PPT Presentation

  • Uploaded on

CSEE W4140 Networking Laboratory. Lecture 7: TCP congestion control Jong Yul Kim 03.04.2009. Announcements. Midterm next week in class(1:10~2:25 pm) Problems from the lab exercises, quiz Subnets Network protocols Similar to ARP exercises we did in class

I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
Download Presentation

PowerPoint Slideshow about ' CSEE W4140 Networking Laboratory' - kermit-baxter

An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.

- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript
csee w4140 networking laboratory

CSEE W4140Networking Laboratory

Lecture 7: TCP congestion control

Jong Yul Kim


  • Midterm next week in class(1:10~2:25 pm)
    • Problems from the lab exercises, quiz
    • Subnets
    • Network protocols
      • Similar to ARP exercises we did in class
      • For example, learn how TCP sequence numbers, ACK numbers work
    • Problems about debugging networks
  • Lab 5 part 2 after Spring Break
    • Lab report for lab 5 part 1 is due after spring break
short review of tcp from last time
Short review of TCP from last time
  • Characteristics of the IP network
    • Delivers packets from host to host
    • May lose packets (discarded by routers)
    • Doesn’t care about packet order
  • TCP is a
    • reliable,
    • in-order,
    • byte-stream service
    • (delivers data from application to application)
short review of tcp from last time1
Short review of TCP from last time
  • TCP is a reliable, in-order, byte-stream service
    • The beauty of TCP is that it works without explicit support from the network
    • Each end of the connection cooperate to make sure packets are delivered reliably and in order
  • Techniques used by TCP
    • Sequence numbers
    • Acknowledgements (and numbers)
    • Retransmissions
    • Timer
today s lecture
Today’s lecture
  • TCP Flow Control
    • Throttling the rate of sender so that the receiver’s buffer does not overflow
  • TCP Congestion Control
    • Throttling the rate of sender in the face of network congestion
tcp flow control receive window
TCP Flow Control (Receive Window)
  • When a connection is established, the receiver allocates a receive buffer.
  • Incoming packets are stored in the buffer so that the application can read data from the buffer.
tcp flow control receiver behavior
TCP Flow Control (Receiver behavior)
  • The receiver lets the sender know:
    • how much space is left in the buffer= RcvWindow
    • by placing that value in the window size field
    • in every segment that it sends to the sender
tcp flow control sender behavior
TCP Flow Control (Sender behavior)
  • Sender can fill up the spare room in the receiver’s buffer by sending more data
  • Sender maintains the size of data that has already been sent but unacknowledged = bytes_unACKed
  • Makes sure that
    • bytes_unACKed ≤ RcvWindow
network congestion
Network Congestion
  • Why does congestion occur?
    • Too many senders sending at high rate
    • Routers dropping packets due to overflowing buffers
  • What are the symptoms?
    • Packet loss
    • Packet queuing delay
    • More retransmission  more packet loss
    • Link bandwidth wasted on retransmissions
tcp congestion control
TCP Congestion Control
  • Remember: TCP has no support from the network about congestions
    • Need to use end-to-end congestion control
  • TCP relies on perceived network congestion and throttles the sending rate accordingly
how does tcp know there is congestion in the network
How does TCP know there is congestion in the network?
  • Answer: packet loss
    • Timeout
    • Three duplicate ACKs shown in diagram on right
how does tcp limit sending rate
How does TCP limit sending rate?
  • Using a variable called congestion window = CongWin
  • Size of unacknowledged data must be less than CongWin bytes_unACKed ≤ CongWin
  • Sending rate is roughly CongWin/RTT bytes/sec

We can throttle the sending rate by controlling CongWin

tcp congestion control algorithm
TCP Congestion Control Algorithm
  • Is an algorithm that controls CongWin
  • Simply stated:
    • Packet loss (=congestion)  decrease CongWin
    • All is well  increase CongWin
  • Three main parts
    • Additive-Increase, Multiplicative Decrease
    • Slow Start
    • Reaction to timeout events
additive increase multiplicative decrease aimd
Additive Increase, Multiplicative Decrease (AIMD)
  • Additive Increase
    • Increase CongWin by 1 MSS every RTT while there is no packet loss
  • Multiplicative Decrease
    • Decrease CongWin by half when packet is lost
slow start ss
Slow Start (SS)
  • When connection is established
    • CongWin is set to 1 MSS
    • Increase CongWin by 1 MSS every ACK
      • Different from Additive Increase
    • Until a loss occurs
    • Result is an exponentially fast growth in sending rate
reaction to timeouts
Reaction to Timeouts
  • We already discussed that TCP perceives congestion through packet loss
  • Packet is considered lost when:
    • Timeout occurs
    • Three duplicate ACKs are received
  • But timeouts and three duplicate ACKs are different.
    • What do they tell about the severity of congestion?
reaction to timeouts1
Reaction to Timeouts
  • Let’s do something different for timeout.
    • Reset CongWin to 1 MSS
    • Begin again from Slow Start
    • Slow start (exponential increase) until when?
  • New variable called Threshold
    • Threshold is set to ½ CongWin
    • After Threshold, do AIMD instead of SS
three way handshake
Three-Way Handshake

Why is two-way handshake not enough?

main points of lab 5 parts 5 8
Main Points of Lab 5 Parts 5~8
  • More about TCP
    • Interactive applications over TCP
    • Data transfer applications over TCP
    • Retransmissions
    • Congestion Control
  • Parts of Lab 5 may not be done because of the use of serial WAN link