https://www.jianshu.com/p/cb3bd1e34f3a
WINDOWS 10:"VMware Network Adapter VMnet8"[mtu 1500]---[mtu 1500]"ens33":Linux
netsh interface ipv4 show subinterfaces "VMware Network Adapter VMnet8"
MTU MediaSenseState 传入字节 传出字节 接口
------ --------------- --------- --------- -------------
1500 1 4461 67219 VMware Network Adapter VMnet8
# ip a
2: ens33: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
link/ether 00:0c:29:e7:54:74 brd ff:ff:ff:ff:ff:ff
inet 192.168.232.110/24 brd 192.168.232.255
# nmcli con modify ens33 802-3-ethernet.mtu 1600
# nmcli con up ens33
# ping -c 1 -s 1572 192.168.232.2
PING 192.168.232.2 (192.168.232.2) 1572(1600) bytes of data.
1580 bytes from 192.168.232.2: icmp_seq=1 ttl=128 time=0.326 ms
--- 192.168.232.2 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.326/0.326/0.326/0.000 ms
# tcpdump -i ens33 icmp
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on ens33, link-type EN10MB (Ethernet), capture size 262144 bytes
02:21:11.240517 IP backend > _gateway: ICMP echo request, id 14608, seq 1, length 1580
02:21:11.240812 IP _gateway > backend: icmp
02:21:11.240819 IP _gateway > backend: ICMP echo reply, id 14608, seq 1, length 1480
netsh interface ipv4 set subinterface "VMware Network Adapter VMnet8" mtu=1000000
确定。
netsh interface ipv4 show subinterface "VMware Network Adapter VMnet8"
MTU MediaSenseState 传入字节 传出字节 接口
------ --------------- --------- --------- -------------
1000000 1 239347 365732 VMware Network Adapter VMnet8
ping -f -l 65500 192.168.232.110
正在 Ping 192.168.232.110 具有 65500 字节的数据:
请求超时。
# nmcli con modify ens33 802-3-ethernet.mtu 16110
# nmcli con up ens33
Connection successfully activated (D-Bus active path: /org/freedesktop/NetworkManager/ActiveConnection/41)
# ip link
2: ens33: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 16110 qdisc fq_codel state UP mode DEFAULT group default qlen 1000
link/ether 00:0c:29:e7:54:74 brd ff:ff:ff:ff:ff:ff
ping -n 1 -f -l 9170 192.168.232.110
正在 Ping 192.168.232.110 具有 9170 字节的数据:
来自 192.168.232.110 的回复: 字节=9170 时间<1ms TTL=64
192.168.232.110 的 Ping 统计信息:
数据包: 已发送 = 1,已接收 = 1,丢失 = 0 (0% 丢失),
往返行程的估计时间(以毫秒为单位):
最短 = 0ms,最长 = 0ms,平均 = 0ms
ping -n 1 -f -l 9171 192.168.232.110
正在 Ping 192.168.232.110 具有 9171 字节的数据:
请求超时。
192.168.232.110 的 Ping 统计信息:
数据包: 已发送 = 1,已接收 = 0,丢失 = 1 (100% 丢失),