Computer Networks/Ping/MTU
(Redirected from Ping/MTU)
The ping command has an option to configure the length or size of the buffer to be transmitted. These activities will show you how to use the ping command with a custom packet length to test the network's maximum transmission unit (MTU).
Preparation
editTo prepare for this activity:
- Start Windows.
- Log in if necessary.
Activity 1 - Ping the Default Gateway with a Custom Packet Length
editTo ping the default gateway with a custom packet length:
- Open a command prompt.
- Use ipconfig to display the default gateway address. Note the Default Gateway displayed.
- Type ping -l 1000 <default gateway address> where <default gateway address> is the default gateway address displayed above. For example, if the default gateway address was 192.168.1.1, you would type ping -l 1000 192.168.1.1. Then press Enter.
- Observe the results.
Activity 2 - Ping the Default Gateway with a Custom Packet Length and Do Not Fragment
editTo ping the default gateway with a custom packet length and do not fragment:
- Type ping -f -l 1000 <default gateway address> and press Enter. Note the addition of the -f option to prevent fragmentation of the packet.
- Observe the results.
Activity 3 - Vary Packet Length to Determine MTU
editTo determine MTU:
- Repeat Activity 2 but vary the length of the packet up or down as necessary until you determine the largest packet size that delivers successfully on your network. When the packet is too long, you will see an error similar to, "Packet needs to be fragmented but DF set." The maximum packet length for a standard Ethernet network is 1500 bytes, minus 20 bytes for Internet Protocol (IP) overhead, minus 8 bytes for Internet Control Message Protocol (ICMP) overhead, or an MTU of 1472. Your results are likely to be 1472 or lower, depending on the network equipment between your computer and the target host.
- Close the command prompt to complete this activity.