UDP 追蹤路由延遲?

UDP 追蹤路由延遲?

在專用網路上的兩個 Linux 系統之間執行 traceroute 命令時,我們看到超時套件。但是,我們在透過追蹤路由使用 TCP 或 ICMP 時沒有看到此類症狀。這是一個具有直接連接電纜的專用網絡,因此中間沒有交換器或路由器。

每次,如果我們在 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,但應用程式不允許我們這樣做。因此,性能受到嚴重影響。任何意見和建議將不勝感激。

相關內容