
如果A->B连续发送了10个包(即1-10),此时出现网络拥堵,1-10这10个包都没有收到确认, 那么这时发送窗口的大小为这10个包大小,接着慢启动发生,cwnd变为1,并重传了第1个包 问题: 此时A的发送窗口大小应该还是原来的10包大小吧,如果这样的话,那么只有当cwnd>10时(假设不考虑B的接收缓冲区情况) ,A才能发送新的数据包(即11开始的包)? 上面举例的意思是想搞明白: 在一段时间正常数据传输后,接着慢启动,那么慢启动是怎样影响滑动...
by chenzhanyiczy - 内核源码 - 2010-09-10 14:37:50 阅读(4398) 回复(9)
本帖最后由 chenzhanyiczy 于 2010-09-05 23:52 编辑 如果A->B连续发送了10个包(即1-10),此时出现网络拥堵,1-10这10个包都没有收到确认, 那么这时发送窗口的大小为这10个包大小,接着慢启动发生,cwnd变为1,并重传了第1个包 问题: 此时A的发送窗口大小应该还是原来的10包大小吧,如果这样的话,那么只有当cwnd>10时(假设不考虑B的接收缓冲区情况) ,A才能发送新的数据包(即11开始的包)?
tcp/IP详解1这样描述: 设置拥塞窗口cwnd为1, 发送1个报文段, 收到一个ACK后, cwnd加1, 然后发送2个, 收到2个ACK后, cwnd加2, 然后发送4个... 这确实是指数增长, 但是, 因为延时ACK的存在, 发送的2个报文段可能只收到1个ACK, 所以cwnd只增加1而不是增加2. 在延时ACK影响的范围内, 这是线性增长. tcp/IP卷2中的源码: [code] u_int cw = tp->snd_cwnd; u_int incr = tp->t_maxseg; ... 拥塞避免算法 tp->snd_cwnd = min(cw + in...
谁能帮我解释1701-1715之间的意思?我不是很清楚,一起讨论讨论 qq:121035422 /* This is Jacobson's slow start and congestion avoidance. 1697 * SIGCOMM '88, p. 328. 1698 */ 1699 static __inline__ void tcp_cong_avoid(struct tcp_opt *tp) 1700 { 1701 if (tp->;snd_cwnd <= tp->;snd_ssthresh) { 1702 /* In "safe" area, increase. */ 1703 if (tp->;snd_cwnd < tp->;snd...
谁能帮我解释1701-1715之间的意思?我不是很清楚,一起讨论讨论\r\nqq:121035422\r\n\r\n/* This is Jacobson\'s slow start and congestion avoidance. \r\n1697 * SIGCOMM \'88, p. 328.\r\n1698 */\r\n1699 static __inline__ void tcp_cong_avoid(struct tcp_opt *tp)\r\n1700 {\r\n1701 if (tp->;snd_cwnd <= tp->;snd_ssthresh) {\r\n1702 /* In \"safe\" area, increase. */\r\n1703 ...
在linux'内核中的慢启动代码: void tcp_slow_start(struct tcp_sock *tp) { int cnt; /* increase in packets */ /* RFC3465: ABC Slow start * Increase only after a full MSS of bytes is acked * * tcp sender SHOULD increase cwnd by the number of * previously unacknowledged bytes ACKed by each incoming * acknowledgment, provided the increase is not more than L */ if (sysctl_tcp_abc && tp->b...
[code] static __inline__ void reno_cong_avoid(struct tcp_opt *tp) { if (tp->snd_cwnd <= tp->snd_ssthresh) { /* In "safe" area, increase. */ if (tp->snd_cwnd < tp->snd_cwnd_clamp) tp->snd_cwnd++; } else { /* In dangerous area, increase slowly. * In theory this is tp->snd_cwnd += 1 / tp->snd_cwnd */ if (tp->snd_cwnd_cnt >= bictcp_cwnd(tp)) { i...
做了一个简单的c/s程序。 server端运行在一个有个独立ip的vsp上(系统是centos 5.6)。 client端在家里店电脑上(系统是windowXP) 用cygwin的ssh连接。 client 向 server发送数据时 很快,但是server向client发送数据时特别慢,发送一个几十字节的包举要10秒。 但是用scp 从服务器上复制文件到本地又很快。 这个c/s程序在自己局域网内测试时是没有这种速度问题的(系统环境一摸一样)。 不知哪位高手能指点一下,这个问题搞了...
SCO tcp/IP网络管理---tcp/IP的启动 1 tcp/IP的启动 tcp/IP受/etc/tcp脚本文件的控制,在你进入多用户状态时启动,在你进入单用户状态时关闭/etc/tcp文件操作内容:他是一个脚本文件,其功能如下: 通过配置支持tcp/IP所必须的流设备来启动或关闭tcp/IP,并启动或关闭与tcp/IP相关的daemon. 以ROOT登录,使用命令行:tcp START或tcp STOP手工启动或关闭tcp/IP。 该文件与etc/rc2.d和/etc/rc0.d目录下的文件...
做了一个简单的c/s程序。 server端运行在一个有个独立ip的vsp上(系统是centos 5.6)。 client端在家里店电脑上(系统是windowXP) 用cygwin的ssh连接。 client 向 server发送数据时 很快,但是server向client发送数据时特别慢,发送一个几十字节的包举要10秒。 但是用scp 从服务器上复制文件到本地又很快。 这个c/s程序在自己局域网内测试时是没有这种速度问题的(系统环境一摸一样)。 不知哪位高手能指点一下,这个问题搞了...