UDP 跟踪路由延迟?

UDP 跟踪路由延迟?

在私有网络上的两个 Linux 系统之间运行 traceroute 命令时,我们会看到超时包。但是,使用 TCP 或 ICMP over traceroute 时,我们不会遇到此类情况。这是一个使用直接连接电缆的私有网络,因此中间没有交换机或路由器。

每次,如果我们在 1 毫秒内运行以下两个命令,我们就可以清楚地看到超时。但是,TCP/ICMP 没有问题。

命令:

[root@sch024 opt]# traceroute -s 192.168.173.1 -r -F 192.168.173.2 1472
traceroute to 192.168.173.2 (192.168.173.2), 30 hops max, 1472 byte packets
 1  192.168.173.2 (192.168.173.2)  0.251 ms  0.228 ms  0.211 ms

[root@sch024 opt]# traceroute -s 192.168.173.1 -r -F 192.168.173.2 1472
traceroute to 192.168.173.2 (192.168.173.2), 30 hops max, 1472 byte packets
 1  * * *
 2  * * *
 3  * * *
 4  * * *
 5  * * *
 6  * 192.168.173.2 (192.168.173.2)  0.219 ms  0.203 ms

发送端的 TCPdump 输出:(问题发生时延迟 5 秒)

11:31:25.921047 IP 192.168.173.1.46286 > 192.168.173.2.33437: UDP, length 1472
11:31:25.921072 IP 192.168.173.1.23033 > 192.168.173.2.33438: UDP, length 1472
11:31:25.921093 IP 192.168.173.1.34026 > 192.168.173.2.33439: UDP, length 1472
11:31:25.921115 IP 192.168.173.1.19438 > 192.168.173.2.33440: UDP, length 1472
11:31:25.921140 IP 192.168.173.1.13794 > 192.168.173.2.33441: UDP, length 1472
11:31:25.921162 IP 192.168.173.1.21963 > 192.168.173.2.33442: UDP, length 1472
11:31:25.921186 IP 192.168.173.1.63873 > 192.168.173.2.33443: UDP, length 1472
11:31:25.921208 IP 192.168.173.1.51599 > 192.168.173.2.33444: UDP, length 1472
11:31:25.921230 IP 192.168.173.1.48325 > 192.168.173.2.33445: UDP, length 1472
11:31:25.921253 IP 192.168.173.1.11303 > 192.168.173.2.33446: UDP, length 1472
11:31:25.921275 IP 192.168.173.1.18195 > 192.168.173.2.33447: UDP, length 1472
11:31:25.921298 IP 192.168.173.1.56580 > 192.168.173.2.33448: UDP, length 1472
11:31:25.921323 IP 192.168.173.1.9626 > 192.168.173.2.33449: UDP, length 1472
11:31:30.922509 IP 192.168.173.1.19061 > 192.168.173.2.33450: UDP, length 1472
11:31:30.922535 IP 192.168.173.1.29498 > 192.168.173.2.33451: UDP, length 1472
11:31:30.922555 IP 192.168.173.1.39393 > 192.168.173.2.33452: UDP, length 1472
11:31:30.922577 IP 192.168.173.1.24223 > 192.168.173.2.33453: UDP, length 1472
11:31:30.922596 IP 192.168.173.1.29305 > 192.168.173.2.33454: UDP, length 1472
11:31:30.922616 IP 192.168.173.1.45487 > 192.168.173.2.33455: UDP, length 1472
11:31:30.922635 IP 192.168.173.1.25939 > 192.168.173.2.33456: UDP, length 1472
11:31:30.922656 IP 192.168.173.1.50773 > 192.168.173.2.33457: UDP, length 1472

接收端的类似 tcpdump 输出:

11:31:25.923657 IP 192.168.173.1.19438 > 192.168.173.2.33440: UDP, length 1472
11:31:25.923680 IP 192.168.173.1.13794 > 192.168.173.2.33441: UDP, length 1472
11:31:25.923703 IP 192.168.173.1.21963 > 192.168.173.2.33442: UDP, length 1472
11:31:25.923729 IP 192.168.173.1.63873 > 192.168.173.2.33443: UDP, length 1472
11:31:25.923747 IP 192.168.173.1.51599 > 192.168.173.2.33444: UDP, length 1472
11:31:25.923770 IP 192.168.173.1.48325 > 192.168.173.2.33445: UDP, length 1472
11:31:25.923793 IP 192.168.173.1.11303 > 192.168.173.2.33446: UDP, length 1472
11:31:25.923816 IP 192.168.173.1.18195 > 192.168.173.2.33447: UDP, length 1472
11:31:25.923841 IP 192.168.173.1.56580 > 192.168.173.2.33448: UDP, length 1472
11:31:25.923861 IP 192.168.173.1.9626 > 192.168.173.2.33449: UDP, length 1472
11:31:30.925070 IP 192.168.173.1.19061 > 192.168.173.2.33450: UDP, length 1472
11:31:30.925091 IP 192.168.173.2 > 192.168.173.1: ICMP 192.168.173.2 udp port 33450 unreachable, length 556
11:31:30.925095 IP 192.168.173.1.29498 > 192.168.173.2.33451: UDP, length 1472
11:31:30.925099 IP 192.168.173.2 > 192.168.173.1: ICMP 192.168.173.2 udp port 33451 unreachable, length 556
11:31:30.925102 IP 192.168.173.1.39393 > 192.168.173.2.33452: UDP, length 1472
11:31:30.925106 IP 192.168.173.2 > 192.168.173.1: ICMP 192.168.173.2 udp port 33452 unreachable, length 556
11:31:30.925127 IP 192.168.173.1.24223 > 192.168.173.2.33453: UDP, length 1472
11:31:30.925138 IP 192.168.173.2 > 192.168.173.1: ICMP 192.168.173.2 udp port 33453 unreachable, length 556
11:31:30.925142 IP 192.168.173.1.29305 > 192.168.173.2.33454: UDP, length 1472

有人能帮忙诊断一下问题出在哪里吗?我们已经尝试过了:

  • 交换电缆
  • 换卡。

目前,该端口位于独立 NIC 卡上,没有其他端口正在使用。增加以下内核参数,但仍然没有运气

net.core.rmem_default = 8388608
net.core.rmem_max = 16777216
net.core.wmem_default = 8388608
net.core.wmem_max = 16777216
net.ipv4.ipfrag_high_thresh = 1310720
net.ipv4.udp_rmem_min = 16384
net.ipv4.udp_wmem_min = 16384
net.ipv4.udp_mem = 8388608 12582912 16777216

我们也在考虑是否可以将流量更改为 TCP,但应用程序不允许。因此,性能受到严重影响。任何建议和意见都将不胜感激。

相关内容