Computer Network - Transport Layer 2

TCP Overview

TCP segment structure

Sequence number and ACK

TCP reliable data transfer

TCP reliable data transmission services over unreliable IP service layer provided on the foundation, pipelining, cumulative acknowledgment, TCP retransmission timer single

Event triggers retransmission: Timeout, receive duplicate ACK

Progressive: temporarily consider repeating the ACK, not consider the flow control, congestion control not consider

TCP RTT and overtime

TCP sender events

  • Data received from the application layer
    • Create a Segment
    • The first sequence number is a byte number Segment
    • The timer was started
    • Set the timeout: TimeOutInterval
  • time out
    • Segment caused by retransmission timeout
    • Restart timer
  • ACK received
    • If confirmed previously unrecognized Segment
      • Update SendBase
      • If the window there are unacknowledged packets, restarts the timer

Watch a pseudo-code:

TCP retransmission examples



receiver

Fast retransmission mechanism

Implementation of the TCP, if time-out occurs, the time-out interval will reset, coming timeout interval doubled, leading to a large, before retransmission of lost packets to wait a long time

  • Detecting a packet loss by repeating the ACK
    • Sender transmits a plurality of packets will be back to back
    • If a packet is lost, it could trigger more duplicate ACK
  • If the sender received three segment ACK on the same data, the data is assumed to have been lost after
    • Fast retransmit: that before the timer timeout
      retransmit

Fast retransmit algorithm

TCP Flow Control


TCP Connection Management

Three-way handshake

TCP life cycle

Congestion control principle

Congestion (Congestion)

Informal definition: "Too many sending host sends too much data or sending too fast, so that the network can not handle."

  • which performed:
    • Packet loss (router buffer overflow)
    • Packet delay is too large (queued in the router cache)

The causes and costs of congestion: scenario 1

The causes and costs of congestion: scenario 2


The causes and costs of congestion: scenario 3


Congestion control method

  • End congestion control:

    • The network layer provides no explicit support
    • End system by observing the loss, delay, etc.
    • Network behavior to determine whether congestion occurs
    • TCP taking this approach
  • Network-assisted congestion control:

    • Explicitly router network congestion feedback information to the sender
    • Simple congestion indication (1bit): SNA, DECbit, TCP / IP ECN, ATM)
    • What rate should be taken to indicate the sender

ATM ABR congestion control


TCP Congestion Control

The basic principles of TCP congestion control

Additive increase - multiplicative decrease: AIMD

TCP slow start: SS


Threshold variable

Loss event processing

TCP congestion control: summary

TCP Congestion Control

TCP congestion control algorithm

TCP Performance Analysis

TCP throughput: throughput

  • Given the congestion window size and RTT, the average throughput of TCP is how much?
    • Ignored Slow start
  • CongWin assumed time-out occurs when the size is W, throughput is W / RTT
  • After the timeout, CongWin = W / 2, throughput is W / 2RTT
  • Average throughput is: 0.75W / RTT

TCP future


Fairness of TCP

Have fairness


Non fairness

summary

  • The basic principles of the transport layer services

    • Multiplexing / demultiplexing
    • Reliable data transmission
    • flow control
    • Congestion Control
  • Internet transport layer

    • UDP
    • TCP

Guess you like

Origin www.cnblogs.com/ygjzs/p/12554069.html