- 論壇徽章:
- 1
|
本帖最后由 running_life 于 2016-08-24 10:57 編輯
環(huán)境:
1、用centos6.7或者ubuntu等ping網(wǎng)關(guān)發(fā)現(xiàn)icmp_seq有跳號(hào)的現(xiàn)象,跳號(hào)時(shí)會(huì)卡頓在那,就像丟包一樣,但是沒(méi)有報(bào)出丟包錯(cuò)誤。最后終止ping時(shí),看到有丟包信息輸出,例如:
2262 packets transmitted, 2219 received, 1% packet loss, time 2264329ms
rtt min/avg/max/mdev = 11.293/12.013/19.907/0.739 ms
65515 bytes from 192.168.0.1: icmp_seq=941 ttl=255 time=165 ms
65515 bytes from 192.168.0.1: icmp_seq=942 ttl=255 time=123 ms
65515 bytes from 192.168.0.1: icmp_seq=943 ttl=255 time=129 ms
65515 bytes from 192.168.0.1: icmp_seq=944 ttl=255 time=120 ms
65515 bytes from 192.168.0.1: icmp_seq=945 ttl=255 time=122 ms
65515 bytes from 192.168.0.1: icmp_seq=946 ttl=255 time=117 ms
65515 bytes from 192.168.0.1: icmp_seq=947 ttl=255 time=118 ms
65515 bytes from 192.168.0.1: icmp_seq=948 ttl=255 time=120 ms
65515 bytes from 192.168.0.1: icmp_seq=949 ttl=255 time=118 ms
65515 bytes from 192.168.0.1: icmp_seq=950 ttl=255 time=118 ms
65515 bytes from 192.168.0.1: icmp_seq=951 ttl=255 time=118 ms
65515 bytes from 192.168.0.1: icmp_seq=952 ttl=255 time=127 ms
65515 bytes from 192.168.0.1: icmp_seq=953 ttl=255 time=125 ms
65515 bytes from 192.168.0.1: icmp_seq=954 ttl=255 time=115 ms
65515 bytes from 192.168.0.1: icmp_seq=955 ttl=255 time=168 ms
65515 bytes from 192.168.0.1: icmp_seq=956 ttl=255 time=117 ms
65515 bytes from 192.168.0.1: icmp_seq=957 ttl=255 time=122 ms
65515 bytes from 192.168.0.1: icmp_seq=958 ttl=255 time=115 ms
65515 bytes from 192.168.0.1: icmp_seq=959 ttl=255 time=126 ms
65515 bytes from 192.168.0.1: icmp_seq=964 ttl=255 time=126 ms
用strace跟蹤發(fā)現(xiàn),掉包數(shù)正好跟下面這個(gè)信息數(shù)吻合,網(wǎng)上查了下,有說(shuō)tcp發(fā)送接收緩沖參數(shù)設(shè)置問(wèn)題的。
recvmsg(3, 0x7ffe371089c0, 0) = -1 EAGAIN (Resource temporarily unavailable)
我已經(jīng)設(shè)置了這些參數(shù),但是還是掉包
net.core.rmem_default = 262144
net.core.rmem_max = 4194304
net.core.wmem_default = 262144
net.core.wmem_max = 1048576
net.ipv4.tcp_rmem = 4096 87380 4194304
net.ipv4.tcp_wmem = 4096 16384 4194304
2、用windows環(huán)境ping這個(gè)網(wǎng)關(guān)就沒(méi)有掉包現(xiàn)象。 |
|