客户端与服务端以 udp2raw+wg 的方式互联,服务端为公网 IPv4 ,udp2raw 客户端报警信息如下,报警触发主要是在最开始远程 rdp 内网主机的时候
[2023-02-20 12:35:39][WARN]huge packet,data len=1452 (>=1375).strongly suggested to set a smaller mtu at upper level,to get rid of this warn
[2023-02-20 12:35:39][WARN]pcap_sendpcaket failed with vaule -1,send error: PacketSendPacket failed, data_len=1558
[2023-02-20 12:35:39][WARN]huge packet,data len=1452 (>=1375).strongly suggested to set a smaller mtu at upper level,to get rid of this warn
[2023-02-20 12:35:39][WARN]pcap_sendpcaket failed with vaule -1,send error: PacketSendPacket failed, data_len=1558
[2023-02-20 12:35:39][WARN]huge packet,data len=1452 (>=1375).strongly suggested to set a smaller mtu at upper level,to get rid of this warn
[2023-02-20 12:35:39][WARN]pcap_sendpcaket failed with vaule -1,send error: PacketSendPacket failed, data_len=1558
应该是 MTU 的问题,服务端是 2 台不同的设备,服务端设置的都是 1280 的 MTU ,除去刷 openwrt 的硬件不同,其他均一致,比如客户端和服务端都加了--fix-gro 参数,用来修复 GRO 特性导致的 MTU 过大问题。
2 台设备分别是:
一台设备用红米 AX6 刷的 openwrt 作为主路由,这个无问题,这台即使开着 GRO 等网卡合并特性,依然不会报警。
一台是 PVE 虚拟直通的 I350 网卡刷的 openwrt 作为旁路由,端口映射到主路由,这台会在初始 rdp 内网主机的时候报警。
2 台 openwrt 网卡信息的主要区别在于 PVE 虚拟机多出 3 个 on 的选项,如下,
tx-udp_tnl-csum-segmentation: off [fixed]
tx-gso-partial: off [fixed]
tx-tunnel-remcsum-segmentation: off [fixed]
tx-sctp-segmentation: on
tx-esp-segmentation: off [fixed]
tx-udp-segmentation: on
tx-gso-list: on
其中 tx-gso-list: on ,我尝试用ethtool -K wg0 gso off
关闭不掉,这 3 个 on 从字面看像是分段的,udp2raw 告警和这 3 个 on 有关系吗?
附加 2 台网卡的完整信息
其中 PVE 虚拟机关掉了 GRO LRO GSO TSO ,红米 AX6 没有关掉(刚开始是关掉的,后面重启之后会重新 on ,但是可能加了--fix-gro 参数的缘故,红米 AX6 一直没有问题。) 红米 AX6:
Features for wg0:
rx-checksumming: on
tx-checksumming: on
tx-checksum-ipv4: off [fixed]
tx-checksum-ip-generic: on
tx-checksum-ipv6: off [fixed]
tx-checksum-fcoe-crc: off [fixed]
tx-checksum-sctp: off [fixed]
scatter-gather: on
tx-scatter-gather: on
tx-scatter-gather-fraglist: off [fixed]
tcp-segmentation-offload: on
tx-tcp-segmentation: on
tx-tcp-ecn-segmentation: on
tx-tcp6-segmentation: on
udp-fragmentation-offload: on
generic-segmentation-offload: on
generic-receive-offload: on
large-receive-offload: off [fixed]
rx-vlan-offload: off [fixed]
tx-vlan-offload: off [fixed]
ntuple-filters: off [fixed]
receive-hashing: off [fixed]
highdma: on
rx-vlan-filter: off [fixed]
vlan-challenged: off [fixed]
tx-lockless: on [fixed]
netns-local: off [fixed]
tx-gso-robust: off [fixed]
tx-fcoe-segmentation: off [fixed]
tx-gre-segmentation: off [fixed]
tx-ipip-segmentation: off [fixed]
tx-sit-segmentation: off [fixed]
tx-udp_tnl-segmentation: off [fixed]
fcoe-mtu: off [fixed]
tx-nocache-copy: off
loopback: off [fixed]
rx-fcs: off [fixed]
rx-all: off [fixed]
tx-vlan-stag-hw-insert: off [fixed]
rx-vlan-stag-hw-parse: off [fixed]
rx-vlan-stag-filter: off [fixed]
l2-fwd-offload: off [fixed]
busy-poll: off [fixed]
rx-gro-hw: off [fixed]
PVE 虚拟机:
root@OpenWrt:~# ethtool --show-offload wg0
Features for wg0:
rx-checksumming: on
tx-checksumming: on
tx-checksum-ipv4: off [fixed]
tx-checksum-ip-generic: on
tx-checksum-ipv6: off [fixed]
tx-checksum-fcoe-crc: off [fixed]
tx-checksum-sctp: off [fixed]
scatter-gather: on
tx-scatter-gather: on
tx-scatter-gather-fraglist: off [fixed]
tcp-segmentation-offload: off
tx-tcp-segmentation: off
tx-tcp-ecn-segmentation: off
tx-tcp-mangleid-segmentation: off
tx-tcp6-segmentation: off
generic-segmentation-offload: off
generic-receive-offload: off
large-receive-offload: off [fixed]
rx-vlan-offload: off [fixed]
tx-vlan-offload: off [fixed]
ntuple-filters: off [fixed]
receive-hashing: off [fixed]
highdma: on
rx-vlan-filter: off [fixed]
vlan-challenged: off [fixed]
tx-lockless: on [fixed]
netns-local: off [fixed]
tx-gso-robust: off [fixed]
tx-fcoe-segmentation: off [fixed]
tx-gre-segmentation: off [fixed]
tx-gre-csum-segmentation: off [fixed]
tx-ipxip4-segmentation: off [fixed]
tx-ipxip6-segmentation: off [fixed]
tx-udp_tnl-segmentation: off [fixed]
tx-udp_tnl-csum-segmentation: off [fixed]
tx-gso-partial: off [fixed]
tx-tunnel-remcsum-segmentation: off [fixed]
tx-sctp-segmentation: on
tx-esp-segmentation: off [fixed]
tx-udp-segmentation: on
tx-gso-list: on
fcoe-mtu: off [fixed]
tx-nocache-copy: off
loopback: off [fixed]
rx-fcs: off [fixed]
rx-all: off [fixed]
tx-vlan-stag-hw-insert: off [fixed]
rx-vlan-stag-hw-parse: off [fixed]
rx-vlan-stag-filter: off [fixed]
l2-fwd-offload: off [fixed]
hw-tc-offload: off [fixed]
esp-hw-offload: off [fixed]
esp-tx-csum-hw-offload: off [fixed]
rx-udp_tunnel-port-offload: off [fixed]
tls-hw-tx-offload: off [fixed]
tls-hw-rx-offload: off [fixed]
rx-gro-hw: off [fixed]
tls-hw-record: off [fixed]
rx-gro-list: off
macsec-hw-offload: off [fixed]
rx-udp-gro-forwarding: off
hsr-tag-ins-offload: off [fixed]
hsr-tag-rm-offload: off [fixed]
hsr-fwd-offload: off [fixed]
hsr-dup-offload: off [fixed]
这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。
V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。
V2EX is a community of developers, designers and creative people.