TCP. √. 概述 报文格式 连接管理 TCP 的数据传输 流控与拥塞控制 错误控制 (Timer). √. √. √. Congestion Control vs Flow Control. Congestion control is a global issue – involves every router and host within the subnet: keep sender from overrunning network
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.Content is provided to you AS IS for your information and personal use only.Download presentation by click this link.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.During download, if you can't get a presentation, the file might be deleted by the publisher.
Congestion Control vs Flow Control • Congestion control is a global issue – involves every router and host within the subnet: keep sender from overrunning network • Flow control – scope is point-to-point; involves just sender and receiver: keep sender from overrunning receiver. 网络 (a) Flow control (b) Congestion control
流控与阻塞控制 • Flow Control 常用的流量控制方法有:漏桶(leaky bucket)技术、停--等(Stop and Wait )协议、滑动窗口(Sliding Window)协议、ON/OFF,端-端流量控制等 • Congestion Control 常用的拥塞控制方法有:资源预分配、数据包丢弃、定数拥塞控制法和抑制数据包法。
发生报文丢失时表示发生了拥塞,TCP 发送方通过以下方式检测丢包 传输定时器超时 收到重复的ACK(至少三个) ECN (显式拥塞通知) Packet Dst Src Drop Ack 拥塞检测 Timeout! No Ack = Congestion!
Reduce window less packets in the network Increase window more packets in the network Idea: Concept of a congestion window– window is smaller when congestion is larger and vice versa Controlling Congestion
TCP 拥塞控制 • TCP 拥塞控制机制。由发送方实现 • 发送方的发送窗口大小设置如下: 发送窗口 = MIN (流控窗口, 拥塞窗口) 其中 • 流控窗口:由接收方通报(即TCP报头中的窗口字段的值) • 拥塞窗口:由发送端根据网络的反馈来动态调整 • rwnd prevents the sender from overwhelming the receiver and cwnd prevents the data from overwhelming the network.
M1, M2 ACK2, ACK3 M3 丢失! M4 ACK3 M5 ACK3 M6 ACK3 ACK7 M3 快重传举例 主机 A 主机 B A 发送 M1 和 M2 B 确认 M1和M2 A 发送 M3 但丢失了 A 发送 M4 B 只能再次确认M2(因为 M3没有收到) A 发送 M5 B 发送第二个重复确认ACK3 A 发送 M6 B 发送第三个重复确认ACK3 A 收到了三个重复的确认 ACK3,就立即重传 M3,而不必等待超时重传。
BaseRTT is the minimum of all measured RTTs (commonly the RTT of the first packet) If not overflowing the connection, then ExpectRate = CongestionWindow/BaseRTT Source calculates ActualRate once per RTT Source compares ActualRate with ExpectRate Diff = ExpectedRate - ActualRate if Diff < a increase CongestionWindow linearly else if Diff > b decrease CongestionWindow linearly else leave CongestionWindow unchanged TCP Vegas Congestion Control
基于路由器的拥塞控制方法 使路由器的队列维持两个参数,即队列长度最小门限 THmin和最大门限 THmax。 RED 对每一个到达的数据报都先计算平均队列长度 LAV。 若平均队列长度小于最小门限 THmin,则将新到达的数据报放入队列进行排队。 若平均队列长度超过最大门限 THmax,则将新到达的数据报丢弃。 若平均队列长度在最小门限 THmin 和最大门限THmax 之间,则按照某一概率 p 将新到达的数据报丢弃。 随机早期丢弃 RED (Random Early Discard) 丢弃 以概率p丢弃 排队 数据报 到达 从队首 发送 最小门限 THmin 平均队列长度 Lav 最大门限 THmin