TCP/IP拥塞控制

时间:2023-03-08 21:32:15

TCP/IP拥塞控制包括:慢启动和拥塞避免。其操作流程如下所述:

  • 初始化。拥塞窗口cwnd = 1,慢启动门限ssthresh = 65535
  • 如果没有发生拥塞

    若 cwnd < ssthresh

    则执行慢启动,cwnd = cwnd + 1。相当于发送字节数以指数形式上升

    若cwnd >= ssthresh

    则执行拥塞避免,cwnd = cwnd + 1/cwnd。相当于发送字节数以线性方式上升

  • 如果发生拥塞

    ssthresh = cwnd / 2    

    若因为超时引发拥塞。cwnd = 1

    若因为重复ACK引发拥塞

      如收到3个及3个以上重复ACK。cwnd = ssthresh + 重复ACK数 * 报文段大小

      如收到新ACK。cwnd = ssthresh