由于巨型帧在 Linux 中不起作用,因此以固定数据包大小发送 Ping

由于巨型帧在 Linux 中不起作用,因此以固定数据包大小发送 Ping

我必须将主机通过 ipv4 地址相互连接。我将每个主机的 MTU 修改为 9000。然后我想以固定数据包大小 +1500 发送 Ping 请求,以验证是否可以发送和接收巨型帧。

当我发送正常 ping 时,我会按预期收到回复,但使用 -s“8972”标志时,我既没有收到超时也没有收到回复。我损失了 100%

我在 mininet 中创建了一个小环境来分享我的问题。我已将两个 MTU 主机修改为 9000。这些是我在 mininet 中的命令:

mininet> h1 ifconfig h1-eth0
h1-eth0   Link encap:Ethernet  direcciónHW 06:49:45:e2:7e:18  
          Direc. inet:10.0.0.1  Difus.:10.255.255.255  Másc:255.0.0.0
          Dirección inet6: fe80::449:45ff:fee2:7e18/64 Alcance:Enlace
          ACTIVO DIFUSIÓN FUNCIONANDO MULTICAST  MTU:90    </code>00  Métrica:1
          Paquetes RX:295 errores:0 perdidos:27 overruns:0 frame:0
          Paquetes TX:36 errores:0 perdidos:20 overruns:0 carrier:0
          colisiones:0 long.colaTX:1000 
          Bytes RX:67960 (67.9 KB)  TX bytes:11499 (11.4 KB)

mininet> h2 ifconfig h2-eth0
h2-eth0   Link encap:Ethernet  direcciónHW 2e:96:2a:84:5f:88  
          Direc. inet:10.0.0.2  Difus.:10.255.255.255  Másc:255.0.0.0
          Dirección inet6: fe80::2c96:2aff:fe84:5f88/64 Alcance:Enlace
          ACTIVO DIFUSIÓN FUNCIONANDO MULTICAST  MTU:9000  Métrica:1
          Paquetes RX:304 errores:0 perdidos:28 overruns:0 frame:0
          Paquetes TX:33 errores:0 perdidos:0 overruns:0 carrier:0
          colisiones:0 long.colaTX:1000 
          Bytes RX:70325 (70.3 KB)  TX bytes:6954 (6.9 KB)

mininet> h1 ping h2
PING 10.0.0.2 (10.0.0.2) 56(84) bytes of data.
64 bytes from 10.0.0.2: icmp_seq=1 ttl=64 time=2.41 ms
64 bytes from 10.0.0.2: icmp_seq=2 ttl=64 time=0.386 ms
^C
--- 10.0.0.2 ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 1001ms
rtt min/avg/max/mdev = 0.386/1.399/2.412/1.013 ms

mininet> h1 ping -d -v -M "do" -s 1473 -c 3 h2
PING 10.0.0.2 (10.0.0.2) 1473(1501) bytes of data.
--- 10.0.0.2 ping statistics ---
3 packets transmitted, 0 received, 100% packet loss, time 2017ms


mininet> h1 ping -d -v -M "do" -s 1472 -c 3 h2
PING 10.0.0.2 (10.0.0.2) 1472(1500) bytes of data.
1480 bytes from 10.0.0.2: icmp_seq=1 ttl=64 time=2.65 ms
1480 bytes from 10.0.0.2: icmp_seq=2 ttl=64 time=0.419 ms
1480 bytes from 10.0.0.2: icmp_seq=3 ttl=64 time=0.089 ms
--- 10.0.0.2 ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2000ms
rtt min/avg/max/mdev = 0.089/1.055/2.657/1.140 ms



<code>
mininet> h1 ping -M "do" -s 8972 -c 3 h2
PING 10.0.0.2 (10.0.0.2) 8972(9000) bytes of data.
--- 10.0.0.2 ping statistics ---
3 packets transmitted, 0 received, 100% packet loss, time 1999ms
</code>

相关内容