Configuring High Precision Timestamping

This section has the following details:

Overview

The High Precision Timestamping (HPT) feature (also called as Rx timestamping) enables high precision time stamping of packets arriving at the ingress port of a Cisco Nexus 3550-T switch. This is used to track and/or record data received by the Nexus 3550-T switch. The time-stamping is for data packets going through the fabric (not to/from host). Typically, time stamping is enabled on a span destination port. The timestamp data, that is the HPT trailer, is appended when the packet egresses the port, that has the HPT feature enabled. The application attached to this egress port decodes the data. You can use the N3550-timestamp-decoder available on Github. or Wireshark version 3.0.0+ to decode the data. You can run the decoder tool with --trailer and --offset 20 options.

An HPT trailer incudes the device ID, port ID, timestamp data, flags and CRC. The device ID and port ID are used for identification purpose to map the timestamp data with a device.

Use the the decoder tool as displayed below:


[n3550-timestamp-decoder-master/build]$ ./timestamp-decoder --read /users/<path-to-input-pcap>/HPT_90.cap --trailer --offset 20

A sample output is displayed below:


2022/09/06-11:59:50.509047248389  (032:046)   106 bytes

The first element (with the date and time) displays the timestamp details. The next field (032:046) indicates that device ID is 32, and the port is 46. The port id is typically one less than the interface number, so in this case it indicates that the packet traversed through interface e1/47.

Rx timestamps are by default in the same timescale as the HW clock (for e.g, PTP operates in TAI). Beginning with NX-OS release 10.2(3v), a new command, time-stamp hpt utc-offset , has been introduced to enable UTC-offset correction to ensure that the Rx timestamps are in UTC timescale.


Note


There is no support to strip the HPT trailer on a NX-OS device.


Limitations

Limitations of HPT are:

  • HPT can be enabled on a physical port or a port channel; cannot be enabled on a port channel member.

  • HPT configuration on a port needs to be removed before it can be made part of a port channel.

Enabling High Precision Timestamping

Use this procedure to enable HPT on a 3550-T switch port.

Procedure

  Command or Action Purpose

Step 1

configure terminal

Example:

switch# configure terminal
switch(config)#

Enters global configuration mode.

Step 2

time-stamp hpt device-id device_id

Example:

switch(config)# time-stamp hpt device-id 10 

This step is optional. The range for device id is 0 to 255; default value is 0.

Step 3

interface interface-type interface-id

Example:

switch(config)# interface ethernet 1/2 

Enter the interface configuration mode.

Step 4

time-stamp hpt

Example:

switch(config-if)# time-stamp hpt 

Enables time stamping on the required interface.

Step 5

(Optional) time-stamp hpt utc-offset

Example:

switch(config-if)# time-stamp hpt utc-offset 

Enables Rx timestamping to be converted to UTC format.

Step 6

(Optional) Use either the show run interface type interface-id or the show time-stamp hpt brief command to get the configured HPT details.

Example:

switch# show run interface ethernet 1/5
or
switch# show time-stamp hpt brief
(Optional)

Displays the HPT details.

Configuration Examples

In the following example, the device ID is 100, and HPT is configured on interface Ethernet 1/47.


switch# show time-stamp hpt brief
Time-stamp HPT Device ID : 100
Timestamp HPT port status
-----------------------
Port State
------- --------------
Eth1/47 hpt enabled

In the following example, you can see that the HPT UTC time-stamping is enabled.


switch# sh time-stamp hpt brief
Time-stamp HPT Device ID : 0
Time-stamp HPT UTC Timestamp Enabled : enabled
Timestamp HPT port status
-----------------------
Port State
------- --------------
Eth1/4 hpt enabled

In the following example, you can see that the HPT UTC time-stamping is disabled.


switch# sh time-stamp hpt brief
Time-stamp HPT Device ID : 0
Time-stamp HPT UTC Timestamp Enabled : disabled
Timestamp HPT port status
-----------------------
Port State
------- --------------
Eth1/4 hpt enabled