Skip to content

Commit 3a307bc

Browse files
committed
finish ping steps
1 parent ae0db13 commit 3a307bc

File tree

1 file changed

+101
-18
lines changed

1 file changed

+101
-18
lines changed

articles/virtual-network/how-to-virtual-machine-mtu.md

Lines changed: 101 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -205,6 +205,26 @@ Use the following steps to change the MTU size on a Linux virtual machine:
205205
rtt min/avg/max/mdev = 1.051/2.138/5.666/1.426 ms
206206
```
207207

208+
An indication that there is a mismatch in settings between the source and destination displays as an error message in the output. In this case, the MTU isn't set on the source network interface.
209+
210+
```output
211+
azureuser@vm-1:~/GetPathMTU$ ping 10.0.0.5 -c 10 -M do -s 3872
212+
PING 10.0.0.5 (10.0.0.5) 3872(3900) bytes of data.
213+
ping: local error: message too long, mtu=1500
214+
ping: local error: message too long, mtu=1500
215+
ping: local error: message too long, mtu=1500
216+
ping: local error: message too long, mtu=1500
217+
ping: local error: message too long, mtu=1500
218+
ping: local error: message too long, mtu=1500
219+
ping: local error: message too long, mtu=1500
220+
ping: local error: message too long, mtu=1500
221+
ping: local error: message too long, mtu=1500
222+
ping: local error: message too long, mtu=1500
223+
224+
--- 10.0.0.5 ping statistics ---
225+
10 packets transmitted, 0 received, +10 errors, 100% packet loss, time 9248ms
226+
```
227+
208228
1. Sign-in to **vm-2**.
209229
210230
1. Use the following example to run the Linux shell script to test the largest MTU size that can be used for a specific network path:
@@ -227,33 +247,33 @@ Use the following steps to change the MTU size on a Linux virtual machine:
227247
1. Verify the MTU size on the network interface using `PING`. For Linux, use the -M, -s, and -c flags. The -M option instructs ping to NOT fragment, -s sets the packet size, and -c sets the number of pings to send. To determine the packet size, subtract 28 from the MTU setting of 3900.
228248

229249
```bash
230-
ping 10.0.0.5 -c 10 -M do -s 3872
250+
ping 10.0.0.4 -c 10 -M do -s 3872
231251
```
232252

233253
```output
234-
azureuser@vm-1:~/GetPathMTU$ ping 10.0.0.5 -c 10 -M do -s 3872
235-
PING 10.0.0.5 (10.0.0.5) 3872(3900) bytes of data.
236-
3880 bytes from 10.0.0.5: icmp_seq=1 ttl=64 time=3.70 ms
237-
3880 bytes from 10.0.0.5: icmp_seq=2 ttl=64 time=1.08 ms
238-
3880 bytes from 10.0.0.5: icmp_seq=3 ttl=64 time=1.51 ms
239-
3880 bytes from 10.0.0.5: icmp_seq=4 ttl=64 time=1.25 ms
240-
3880 bytes from 10.0.0.5: icmp_seq=5 ttl=64 time=1.29 ms
241-
3880 bytes from 10.0.0.5: icmp_seq=6 ttl=64 time=1.05 ms
242-
3880 bytes from 10.0.0.5: icmp_seq=7 ttl=64 time=5.67 ms
243-
3880 bytes from 10.0.0.5: icmp_seq=8 ttl=64 time=1.92 ms
244-
3880 bytes from 10.0.0.5: icmp_seq=9 ttl=64 time=2.72 ms
245-
3880 bytes from 10.0.0.5: icmp_seq=10 ttl=64 time=1.20 ms
246-
247-
--- 10.0.0.5 ping statistics ---
254+
azureuser@vm-2:~/GetPathMTU$ ping 10.0.0.4 -c 10 -M do -s 3872
255+
PING 10.0.0.4 (10.0.0.4) 3872(3900) bytes of data.
256+
3880 bytes from 10.0.0.4: icmp_seq=1 ttl=64 time=3.70 ms
257+
3880 bytes from 10.0.0.4: icmp_seq=2 ttl=64 time=1.08 ms
258+
3880 bytes from 10.0.0.4: icmp_seq=3 ttl=64 time=1.51 ms
259+
3880 bytes from 10.0.0.4: icmp_seq=4 ttl=64 time=1.25 ms
260+
3880 bytes from 10.0.0.4: icmp_seq=5 ttl=64 time=1.29 ms
261+
3880 bytes from 10.0.0.4: icmp_seq=6 ttl=64 time=1.05 ms
262+
3880 bytes from 10.0.0.4: icmp_seq=7 ttl=64 time=5.67 ms
263+
3880 bytes from 10.0.0.4: icmp_seq=8 ttl=64 time=1.92 ms
264+
3880 bytes from 10.0.0.4: icmp_seq=9 ttl=64 time=2.72 ms
265+
3880 bytes from 10.0.0.4: icmp_seq=10 ttl=64 time=1.20 ms
266+
267+
--- 10.0.0.4 ping statistics ---
248268
10 packets transmitted, 10 received, 0% packet loss, time 9014ms
249269
rtt min/avg/max/mdev = 1.051/2.138/5.666/1.426 ms
250270
```
251271

252272
An indication that there is a mismatch in settings between the source and destination displays as an error message in the output. In this case, the MTU isn't set on the source network interface.
253273
254274
```output
255-
azureuser@vm-1:~/GetPathMTU$ ping 10.0.0.5 -c 10 -M do -s 3872
256-
PING 10.0.0.5 (10.0.0.5) 3872(3900) bytes of data.
275+
azureuser@vm-2:~/GetPathMTU$ ping 10.0.0.4 -c 10 -M do -s 3872
276+
PING 10.0.0.4 (10.0.0.4) 3872(3900) bytes of data.
257277
ping: local error: message too long, mtu=1500
258278
ping: local error: message too long, mtu=1500
259279
ping: local error: message too long, mtu=1500
@@ -265,7 +285,7 @@ Use the following steps to change the MTU size on a Linux virtual machine:
265285
ping: local error: message too long, mtu=1500
266286
ping: local error: message too long, mtu=1500
267287
268-
--- 10.0.0.5 ping statistics ---
288+
--- 10.0.0.4 ping statistics ---
269289
10 packets transmitted, 0 received, +10 errors, 100% packet loss, time 9248ms
270290
```
271291
@@ -415,6 +435,33 @@ Use the following steps to change the MTU size on a Windows Server virtual machi
415435
```
416436

417437
```output
438+
PS C:\Users\azureuser> ping 10.0.0.5 -f -l 3872
439+
440+
Pinging 10.0.0.5 with 3872 bytes of data:
441+
Reply from 10.0.0.5: bytes=3872 time=1ms TTL=128
442+
Reply from 10.0.0.5: bytes=3872 time<1ms TTL=128
443+
Reply from 10.0.0.5: bytes=3872 time=1ms TTL=128
444+
Reply from 10.0.0.5: bytes=3872 time=1ms TTL=128
445+
446+
Ping statistics for 10.0.0.5:
447+
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
448+
Approximate round trip times in milli-seconds:
449+
Minimum = 0ms, Maximum = 1ms, Average = 0ms
450+
```
451+
452+
An indication that there is a mismatch in settings between the source and destination displays as an error message in the output. In this case, the MTU isn't set on the source network interface.
453+
454+
```output
455+
PS C:\Users\azureuser> ping 10.0.0.5 -f -l 3872
456+
457+
Pinging 10.0.0.5 with 3872 bytes of data:
458+
Packet needs to be fragmented but DF set.
459+
Packet needs to be fragmented but DF set.
460+
Packet needs to be fragmented but DF set.
461+
Packet needs to be fragmented but DF set.
462+
463+
Ping statistics for 10.0.0.5:
464+
Packets: Sent = 4, Received = 0, Lost = 4 (100% loss),
418465
```
419466
420467
1. Use `netsh` to determine the subinterface name for the subsequent commands.
@@ -469,6 +516,42 @@ Use the following steps to change the MTU size on a Windows Server virtual machi
469516
vm-2 10.0.0.4 1 Success 3892
470517
```
471518

519+
1. Verify the MTU size on the network interface using `PING`. For Windows, use -f and -l. The -f option instructs ping to NOT fragment and -l sets the packet size. To determine the packet size, subtract 28 from the MTU setting of 3900.
520+
521+
```powershell
522+
ping 10.0.0.4 -f -l 3872
523+
```
524+
525+
```output
526+
PS C:\Users\azureuser> ping 10.0.0.4 -f -l 3872
527+
528+
Pinging 10.0.0.4 with 3872 bytes of data:
529+
Reply from 10.0.0.4: bytes=3872 time=1ms TTL=128
530+
Reply from 10.0.0.4: bytes=3872 time<1ms TTL=128
531+
Reply from 10.0.0.4: bytes=3872 time=1ms TTL=128
532+
Reply from 10.0.0.4: bytes=3872 time=1ms TTL=128
533+
534+
Ping statistics for 10.0.0.4:
535+
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
536+
Approximate round trip times in milli-seconds:
537+
Minimum = 0ms, Maximum = 1ms, Average = 0ms
538+
```
539+
540+
An indication that there is a mismatch in settings between the source and destination displays as an error message in the output. In this case, the MTU isn't set on the source network interface.
541+
542+
```output
543+
PS C:\Users\azureuser> ping 10.0.0.4 -f -l 3872
544+
545+
Pinging 10.0.0.4 with 3872 bytes of data:
546+
Packet needs to be fragmented but DF set.
547+
Packet needs to be fragmented but DF set.
548+
Packet needs to be fragmented but DF set.
549+
Packet needs to be fragmented but DF set.
550+
551+
Ping statistics for 10.0.0.4:
552+
Packets: Sent = 4, Received = 0, Lost = 4 (100% loss),
553+
```
554+
472555
1. Use `netsh` to determine the subinterface name for the subsequent commands.
473556
474557
```powershell

0 commit comments

Comments
 (0)