Ping - sweep range of sizes
The extended ping commands on a Cisco IOS device allows you to send a series of pings of increasing MTU size in order to determine the maximum MTU that is allowed on a particular path. This feature is called
Sweep range of sizes. The following is an example of how the command can be implemented:
R1#ping Protocol [ip]: Target IP address: 192.168.12.2 Repeat count : 1 Datagram size : 1500 Timeout in seconds : Extended commands [n]: y Ingress ping [n]: Source address or interface: DSCP Value : Type of service : Set DF bit in IP header? [no]: y Validate reply data? [no]: Data pattern [0x0000ABCD]: Loose, Strict, Record, Timestamp, Verbose[none]: Sweep range of sizes [n]: y Sweep min size : 1490 Sweep max size : 1510 Sweep interval : Type escape sequence to abort. Sending 21, [1490..1510]-byte ICMP Echos to 192.168.12.2, timeout is 2 seconds: Packet sent with the DF bit set !!!!!!!!!!!.......... Success rate is 52 percent (11/21), round-trip min/avg/max = 1/1/2 ms R1#
Note the following:
- The Do not Fragment (DF) bit must be set in order to disable any fragmentation. Otherwise, pings with larger MTUs will be successful because they become fragmented, and the purpose of the sweep range of sizes feature is negated.
- The repeat count in this case measures how many times the full sweep will be performed. It's a good idea to always choose 1 so that only one sweep is performed.
- You must specify the minimum and maximum MTU size you want to send. Note that in the above example, the values 1490 to 1510 were chosen. Note also that the output states
Sending 21echo requests since the range is inclusive.
- The sweep interval indicates by how much the size of the MTU will be incremented for each ping. An interval of 1 is used to ensure that we identify the exact size that fails.
- Note that 11 pings were successful, and the rest were not. This indicates that an MTU size of 1490, 1491, 1492, ... 1498, 1499, and 1500 were successful. From 1501 and on they were unsuccessful. Thus the maximum MTU allowed on this path is 1500.