Cable latency measurement
In one embodiment, a system includes a first data communication device including packet processing circuitry to provide a probe packet including an egress timestamp TS 1 indicating a time at which the probe packet egresses the first data communication device, and a network interface to send the probe packet via at least one network connection to a second data communication device, and receive from the second data communication device a response packet including the egress timestamp TS 1 , wherein the packet processing circuitry is configured to associate with the response packet an ingress timestamp TS 2 indicating a time at which the response packet ingresses the first data communication device, and a network metric processor to compute a data latency in the at least one network connection responsively to TS 1 , TS 2 , and an indication of an internal latency of the probe packet in the second data communication device.
1. A system comprising:
a first data communication device to generate a data packet, and including:
packet processing circuitry to egress mirror the data packet yielding a probe packet including an egress timestamp TS 1 ; and
a network interface to send the data packet and the probe packet via at least one network connection to a second data communication device, the at least one network connection being at least one cable; and
the second data communication device, an internal latency of data packets in the second data communication device being dynamic, the second data communication device including packet processing circuitry to: receive the probe packet; encapsulate the probe packet with an encapsulation header yielding a return packet, the encapsulation header including a source identification of the second data communication device and a destination identification of the first data communication device; compute the internal latency of the probe packet in the second data communication device based on the difference between a time of ingress of the probe packet in the second data communication device and a time of egress of the return packet from the second data communication device to the first communication device computed based on a time difference of an internal clock of the second data communication device; egress mirror the return packet yielding a response packet; record the computed internal latency in the response packet; and send the response packet to the first data communication device, and wherein:
the network interface of the first data communication device is configured to receive from the second data communication device the response packet including: the egress timestamp TS 1 ; and the computed internal latency of the probe packet in the second data communication device;
the packet processing circuitry of the first data communication device is configured to receive the response packet; ingress mirror the response packet with an ingress timestamp TS 2 yielding an ingress mirrored packet; and provide the ingress mirrored packet to a network metric processor, the ingress timestamp TS 2 indicating a time at which the response packet ingresses the first data communication device; and
the first data communication device includes the network metric processor to compute a data latency in the at least one network connection between the first data communication device and the second data communication device responsively to the ingress mirrored packet based on TS 2 less TS 1 less the computed internal latency of the probe packet in the second data communication device.
2. The system according to claim 1 , wherein the first data communication device and the second data communication device are not clock synchronized.
3. A method comprising:
generating a data packet in a first data communication device;
egress mirroring the data packet yielding a probe packet including an egress timestamp TS 1 ;
sending the data packet and the probe packet via at least one network connection to a second data communication device, the at least one network connection being at least one cable, wherein an internal latency of data packets in the second data communication device is dynamic;
receiving the probe packets by the second data communication device;
encapsulating the probe packet with an encapsulation header yielding a return packet, the encapsulation header including a source identification of the second data communication device and a destination identification of the first data communication device;
computing by the second data communication device the internal latency of the probe packet in the second data communication device based on the difference between a time of ingress of the probe packet in the second data communication device and a time of egress of the return packet from the second data communication device to the first communication device computed based on a time difference of an internal clock of the second data communication device;
egress mirroring the return packet yielding a response packet;
recording by the second data communication device the computed internal latency in the response packet;
sending the response packet to the first data communication device;
receiving from the second data communication device the response packet;
ingress mirroring the response packet with an ingress timestamp TS 2 yielding an ingress mirrored packet, the ingress timestamp TS 2 indicating a time at which the response packet ingresses the first data communication device; and
computing a data latency in the at least one network connection between the first data communication device and the second data communication device responsively to the ingress mirrored packet based on TS 2 less TS 1 less the computed internal latency of the probe packet in the second data communication device.
4. The method according to claim 3 , wherein the first data communication device and the second data communication device are not clock synchronized.