Skip to content

Commit 2285ea2

Browse files
committed
fixes
1 parent 6364bc0 commit 2285ea2

File tree

1 file changed

+62
-1
lines changed

1 file changed

+62
-1
lines changed

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

Lines changed: 62 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,11 +182,27 @@ Use the following steps to change the MTU size on a Linux virtual machine:
182182

183183
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.
184184

185-
```bash
185+
```bash
186186
ping 10.0.0.5 -c 10 -M do -s 3872
187187
```
188188

189189
```output
190+
azureuser@vm-1:~/GetPathMTU$ ping 10.0.0.5 -c 10 -M do -s 3872
191+
PING 10.0.0.5 (10.0.0.5) 3872(3900) bytes of data.
192+
3880 bytes from 10.0.0.5: icmp_seq=1 ttl=64 time=3.70 ms
193+
3880 bytes from 10.0.0.5: icmp_seq=2 ttl=64 time=1.08 ms
194+
3880 bytes from 10.0.0.5: icmp_seq=3 ttl=64 time=1.51 ms
195+
3880 bytes from 10.0.0.5: icmp_seq=4 ttl=64 time=1.25 ms
196+
3880 bytes from 10.0.0.5: icmp_seq=5 ttl=64 time=1.29 ms
197+
3880 bytes from 10.0.0.5: icmp_seq=6 ttl=64 time=1.05 ms
198+
3880 bytes from 10.0.0.5: icmp_seq=7 ttl=64 time=5.67 ms
199+
3880 bytes from 10.0.0.5: icmp_seq=8 ttl=64 time=1.92 ms
200+
3880 bytes from 10.0.0.5: icmp_seq=9 ttl=64 time=2.72 ms
201+
3880 bytes from 10.0.0.5: icmp_seq=10 ttl=64 time=1.20 ms
202+
203+
--- 10.0.0.5 ping statistics ---
204+
10 packets transmitted, 10 received, 0% packet loss, time 9014ms
205+
rtt min/avg/max/mdev = 1.051/2.138/5.666/1.426 ms
190206
```
191207

192208
1. Sign-in to **vm-2**.
@@ -208,6 +224,51 @@ Use the following steps to change the MTU size on a Linux virtual machine:
208224
3900
209225
```
210226
227+
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.
228+
229+
```bash
230+
ping 10.0.0.5 -c 10 -M do -s 3872
231+
```
232+
233+
```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 ---
248+
10 packets transmitted, 10 received, 0% packet loss, time 9014ms
249+
rtt min/avg/max/mdev = 1.051/2.138/5.666/1.426 ms
250+
```
251+
252+
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.
253+
254+
```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.
257+
ping: local error: message too long, mtu=1500
258+
ping: local error: message too long, mtu=1500
259+
ping: local error: message too long, mtu=1500
260+
ping: local error: message too long, mtu=1500
261+
ping: local error: message too long, mtu=1500
262+
ping: local error: message too long, mtu=1500
263+
ping: local error: message too long, mtu=1500
264+
ping: local error: message too long, mtu=1500
265+
ping: local error: message too long, mtu=1500
266+
ping: local error: message too long, mtu=1500
267+
268+
--- 10.0.0.5 ping statistics ---
269+
10 packets transmitted, 0 received, +10 errors, 100% packet loss, time 9248ms
270+
```
271+
211272
# [Windows](#tab/windows)
212273

213274
Use PowerShell to test the connection and MTU size between **vm-1** and **vm-2**.

0 commit comments

Comments
 (0)