Computer Networks/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
To prepare for this activity:
 * 1) Start Windows.
 * 2) Log in if necessary.

Activity 1 - Ping the Default Gateway with a Custom Packet Length
To ping the default gateway with a custom packet length:
 * 1)  Open a command prompt.
 * 2) Use  ipconfig to display the default gateway address.  Note the Default Gateway displayed.
 * 3) Type ping -l 1000  where 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.
 * 4) Observe the results.

Activity 2 - Ping the Default Gateway with a Custom Packet Length and Do Not Fragment
To ping the default gateway with a custom packet length and do not fragment:
 * 1) Type ping -f -l 1000  and press Enter.  Note the addition of the -f option to prevent fragmentation of the packet.
 * 2) Observe the results.

Activity 3 - Vary Packet Length to Determine MTU
To determine MTU:
 * 1) 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.
 * 2) Close the command prompt to complete this activity.

Readings

 * Wikipedia: Ping (networking utility)
 * Wikipedia: Maximum transmission unit
 * Wikipedia: Internet Protocol
 * Wikipedia: Internet Control Message Protocol (ICMP)