This article discusses latency in ICMP pings when a Junos OS platform is responsible for ICMP echo reply.
An ICMP ping shows intermittent latency on a directly connected link with the default Junos Class of Service (CoS) configuration.
Topology
SRX1 (192.168.1.1)---------------------------(192.168.1.2) SRX2
Procedure
From SRX1, ping the directly connected interface IP 192.168.1.2:
SRX1> ping 192.168.1.2
64 bytes from 192.168.1.2: icmp_seq=28 ttl=64 time=0.524 ms
64 bytes from 192.168.1.2: icmp_seq=29 ttl=64 time=0.503 ms
64 bytes from 192.168.1.2: icmp_seq=30 ttl=64 time=16.205 ms
64 bytes from 192.168.1.2: icmp_seq=31 ttl=64 time=0.543 ms
64 bytes from 192.168.1.2: icmp_seq=32 ttl=64 time=32.299 ms
Note that the time is nearly 0.5 ms for most of the ping requests, but in some instances we see a value which is much larger.
Although ICMP is a great way to check for link availability, it is not a good way to test latency or delay on a Juniper Networks platform. One of the best and most accurate ways to test for latency is to simulate data plane traffic using a traffic generator for the transit traffic.
Juniper Networks platform architecture separates the control plane from the data plane. There are various rate-limiting and prioritization functions within the packet forwarding engine (PFE) and the routing engine. When a ping is sent from the routing platform to the end device, it is using the control plane on the local router in order to generate the ICMP request packet. The control plane is used again when the ICMP reply packet is received from the end device.
ICMP messages are considered low priority within Junos OS, so the routing platform will respond to and process other higher priority messages, such as routing updates, before processing the ICMP messages. The microkernel may introduce tens of milliseconds of processing delay to ICMP message handling. The delay is not uniform, meaning that some ICMP messages might be delayed while others may not be delayed. This matches the behavior observed here with the testing.
ICMP ping latency in traffic generated for the device itself is not a recommended way of testing the bandwidth or integrity of the link.