When troubleshooting MTU and ICMP reachability across vendor platforms, understanding how each calculates the ping packet size is critical. Cisco, Juniper, and PC operating systems all interpret the ping size parameter differently, leading to different on-wire packet lengths.

Cisco

In Cisco, the ping size parameter specifies the total packet size including the IP header (20 bytes) and ICMP header (8 bytes). The data payload is what remains.

The encapsulation headers added by the egress interface will be included on top of this size. Importantly, the MTU command under an interface specifies the L2 payload size — the maximum data + IP + ICMP that the interface will forward. So if you set MTU 1500 on an Ethernet interface, the on-wire frame size will be 1500 + 14 bytes (Ethernet header) = 1514 bytes. For VLAN-tagged frames, add another 4 bytes (802.1Q tag).

Note: IOS XR has different MTU semantics; see Cisco IOS XR MTU documentation.

Example

ping X size 1000

Breaking down the 1000 bytes:

  • IP header: 20 bytes
  • ICMP header: 8 bytes
  • Data payload: 972 bytes

On the wire:

  • Untagged Ethernet: 1000 + 14 (Ethernet) = 1014 bytes
  • VLAN-tagged Ethernet: 1000 + 14 + 4 (802.1Q) = 1018 bytes

Juniper

In Juniper, the ping size parameter specifies the data payload size only, not including IP and ICMP headers. When calculating the on-wire packet length, you must add the IP header (20 bytes) and ICMP header (8 bytes).

Example

ping X size 1000

Breaking down the packet:

  • Data payload: 1000 bytes
  • IP header: 20 bytes
  • ICMP header: 8 bytes
  • Total: 1028 bytes

On the wire:

  • Untagged Ethernet: 1028 + 14 (Ethernet) = 1042 bytes
  • VLAN-tagged Ethernet: 1028 + 14 + 4 (802.1Q) = 1046 bytes

Windows and macOS

Windows and macOS use the same logic as Juniper: the size parameter represents data payload only, not including IP and ICMP headers.

If you want to ping with a size that results in a 1500-byte on-wire MTU-compliant frame:

1
2
# For MTU 1500: 1500 - 20 (IP) - 8 (ICMP) - 14 (Ethernet) = 1458 bytes
ping 192.168.1.1 -f -l 1458

However, if you want to match a data payload of 1472 bytes (a common baseline for “MSS-friendly” ICMP), which totals 1500 with headers:

1
ping 192.168.1.1 -f -l 1472

Summary Table

PlatformSize ParameterIncludes IP/ICMP Headers?Data for size 1000On-Wire (Untagged)
CiscoTotal packetYes972 bytes1014 bytes
JuniperData payloadNo1000 bytes1042 bytes
Windows/macOSData payloadNo1000 bytes1042 bytes

Key Takeaway

When testing MTU and troubleshooting path issues across vendors:

  • Cisco ping size = what you see on the wire (minus L2 encapsulation)
  • Juniper/Windows/macOS ping size = data only; add 28 bytes (IP + ICMP) + L2 overhead to get on-wire size

This difference is a common source of confusion when verifying MTU compliance across multi-vendor networks.


The content of this post was created by the author; AI was used for editing and restructuring.