Linux 路由器上行鏈路介面上的神秘 rx_crc_errors

Linux 路由器上行鏈路介面上的神秘 rx_crc_errors

我有一台運行 Debian 11 的 Linux 機器,它充當邊緣設備和主機之間的路由器。在執行curl下載檔案的命令時,面向邊緣的介面將開始rx_crc_errors零星但持續積累- 計數突然增加,平均每秒一到兩次。結果是,從路由器和其後面的主機來看,此curl命令運行速度非常慢,並且下載速度僅為線路上可用速度的一小部分(並且我檢查了通過同一邊緣設備的其他路由器和伺服器,它們以更快的速度運行並且不會累積rx_crc_errors)。

邊緣路由器(累積這些 rx_crc_errors 的機器/介面的閘道)是執行 pfSense 22.01(最新)的 NetGate 1537。

到目前為止我們已經嘗試過的事情:

  • 更換了電纜
  • 更換 SFP 轉接器
  • 使用不同的交換器端口
  • 將整個主機更換為一台相同配置的主機

這些都沒有改變行為,據我所知,這消除了硬體作為問題根源的可能性。

curl https://dl.google.com/go/go1.18.1.linux-amd64.tar.gz --output t.dat從邊緣機器進行操作約 1 秒鐘即可完成。從具有 rx_crc_errors 的路由器需要 17 秒,而從其後面的主機則需要 21 秒。

錯誤顯示在上行鏈路介面上,如下所示:

...
2: enp3s0f0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP mode DEFAULT group default qlen 1000
    link/ether 10:1f:74:35:fc:94 brd ff:ff:ff:ff:ff:ff
    RX: bytes  packets  errors  dropped missed  mcast
    1609100899 1250023  508     0       0       2534
    TX: bytes  packets  errors  dropped carrier collsns
    20574398   206727   0       0       0       0
...

然後使用 ethtool 我可以取得顯示 CRC 錯誤的附加詳細資訊 ( rx_crc_errors: 508)

ethtool -S enp3s0f0
NIC statistics:
     rx_bytes: 1609111223
     rx_error_bytes: 0
     tx_bytes: 20588905
     tx_error_bytes: 0
     rx_ucast_packets: 1245869
     rx_mcast_packets: 2554
     rx_bcast_packets: 1687
     tx_ucast_packets: 202770
     tx_mcast_packets: 4038
     tx_bcast_packets: 0
     tx_mac_errors: 0
     tx_carrier_errors: 0
     rx_crc_errors: 508
     rx_align_errors: 0
     tx_single_collisions: 0
     tx_multi_collisions: 0
     tx_deferred: 0
     tx_excess_collisions: 0
     tx_late_collisions: 0
     tx_total_collisions: 0
     rx_fragments: 22
     rx_jabbers: 0
     rx_undersize_packets: 0
     rx_oversize_packets: 0
     rx_64_byte_packets: 1823
     rx_65_to_127_byte_packets: 9084
     rx_128_to_255_byte_packets: 2371
     rx_256_to_511_byte_packets: 585
     rx_512_to_1023_byte_packets: 80
     rx_1024_to_1522_byte_packets: 1236167
     rx_1523_to_9022_byte_packets: 0
     tx_64_byte_packets: 0
     tx_65_to_127_byte_packets: 200168
     tx_128_to_255_byte_packets: 5659
     tx_256_to_511_byte_packets: 370
     tx_512_to_1023_byte_packets: 230
     tx_1024_to_1522_byte_packets: 381
     tx_1523_to_9022_byte_packets: 0
     rx_xon_frames: 0
     rx_xoff_frames: 0
     tx_xon_frames: 0
     tx_xoff_frames: 0
     rx_mac_ctrl_frames: 0
     rx_filtered_packets: 33361
     rx_ftq_discards: 0
     rx_discards: 0
     rx_fw_discards: 0

請注意,我檢查過的任何其他機器上的所有其他介面的錯誤均為零。

我現在很困惑下一步要檢查什麼。我懷疑該問題在某種程度上與邊緣路由器有關,但有其他路由器連接到該邊緣路由器,但沒有相同的問題。在某一時刻,我使用從邊緣路由器到交換器的VLAN 中繼(802.1q 標記),但我禁用了此功能,並嘗試將MTU 提高4 個位元組至1504,這兩者都沒有產生任何明顯的差異- rx_crc_errors 仍然累積且性能如上所示較差。

關於診斷這些 rx_crc_errors 的原因還有其他想法嗎?

相關內容