New and Changed Information

The following table provides an overview of the significant changes up to the current release. The table does not provide an exhaustive list of all changes or of the new features up to this release.

Table 1. New Features and Changed Behavior in Cisco APIC

Cisco APIC Release Version

Feature

Description

Release 4.0(1x)

Resolution Factor enhancement

Support for changing the resolution factor to 11 which then can measure up to 214 milliseconds with an accuracy of 204ns.

Release 3.0(1x)

APIC Latency and Precision Time Protocol

This guide was released to provide a description of APIC Latency and Precision Time Protocol.

About Fabric Latency

Fabric latency is a troubleshooting tool to monitor the time taken by a packet to traverse from source to destination in the fabric. It can be used to measure latency between a combination of endpoints, endpoint groups, external interfaces, and IP addresses. Latency is measured from the Arrival time in the ingress leaf switch to the Departure time in the egress leaf switch. A prerequisite for fabric latency measurement is that all the nodes shall be synchronized with uniform time. Precision Time Protocol (PTP) is used for this, due to its' sub-microsecond accuracy, compared to NTP, which has only millisecond precisions. NTP is not sufficient to measure packet flight times within an ACI fabric, which is in the order of microseconds. Hence, latency feature requires all the nodes in the fabric to be synchronized using PTP.

There are two types of latency measurement:

  • Ongoing TEP-to-TEP latency

  • On-demand Tenant latency

Ongoing latency or Leaf-to-leaf (TEP to TEP) latency is used to measure latency across Tunnel End Points in leaf switches. It provides the average and maximum latency, standard deviation, and packet count computed at the destination leaf switch. The latency data collected for the last 30 seconds as well as the cumulative latency values are provided. The TEP-to-TEP latency measurements are enabled as soon as PTP is turned on in the fabric.

Tenant latency measurements can be configured to troubleshoot issues at the level of individual applications. They can be enabled for the IP flows matching a specific Flow rule programmed in the Latency TCAM. The flow rules semantics are similar to the current Atomic counter flow rules.


Note


If latency measurement is configured for a particular IP flow, then the latency measurement simultaneously being done for this flow’s tunnel, will not account for latency of this flow.


The following flow rules are supported for latency measurement, in addition to atomic counters:

  • Measure EP to EP latency

  • Measure EP to EPG latency

  • Measure EP to External IP latency

  • Measure EPG to EP latency

  • Measure EPG to EPG latency

  • Measure EPG to External IP latency

  • Measure External IP to EP latency

  • Measure External IP to EPG latency

  • Measure Any to EP latency

  • Measure External IP to External IP latency

  • Measure EP to Any latency


Note


Both Atomic counters and Latency measurements can be independently enabled or disabled on the same IP flow rules.


Latency data can be measured in two modes; average and histogram. The mode can be specified independently for ongoing latency as well as for each flow rule in tenant latency policies.

Average Mode

Average mode enables the following measurements.
  • Average latency for last 30 seconds

  • Standard deviation for last 30 seconds

  • Packet count for last 30 second

  • Accumulated average latency

  • Accumulated Maximum latency

  • Accumulated Packet Count


Note


The latency measurement in average mode may slightly differ in the low order multiples, of 0.1 microsecond, compared to an external measurement equipment.


Histogram Mode

Histogram mode enables the visualization of the distribution of packet counts across different latency intervals. There are 16 Histogram buckets, and each bucket is configured with a measurement interval. Bucket 0's measurement interval is 0 to 5 microseconds, and Bucket 1 between 5 to 10 microseconds ending in 80 microseconds for the last bucket. Each of these buckets include a 64 bit counter to measure packets whose latency fell within the bucket’s configured latency interval.

The histogram charts are useful for understanding the latency trends, but may not reflect the exact packet count. For measuring the actual number of packets, atomic counters may be used.

The maximum number of TEP-to-TEP latency entries supported is 384. In EX-based TORs, we can have at most 256 flows in average mode and 64 flows in histogram mode. In FX-based TORS, we can have at most 640 flows in average mode and 320 flows in histogram mode.

About PTP

The Precision Time Protocol (PTP) is a time synchronization protocol defined in IEEE 1588 for nodes distributed across a network. With PTP, you can synchronize distributed clocks with an accuracy of less than 1 microsecond using Ethernet networks. PTP's accuracy comes from the hardware support for PTP in the Cisco Application Centric Infrastructure (ACI) fabric spine and leaf switches. The hardware support allows the protocol to compensate accurately for message delays and variation across the network.


Note


This document uses the term "client" for what the IEEE1588-2008 standard refers to as the "slave." The exception is instances in which the word "slave" is embedded in the Cisco Application Policy Infrastructure Controller (APIC) CLI commands or GUI.


PTP is a distributed protocol that specifies how real-time PTP clocks in the system synchronize with each other. These clocks are organized into a master-client synchronization hierarchy with the grandmaster clock, which is the clock at the top of the hierarchy, determining the reference time for the entire system. Synchronization is achieved by exchanging PTP timing messages, with the members using the timing information to adjust their clocks to the time of their master in the hierarchy. PTP operates within a logical scope called a PTP domain.

The PTP process consists of two phases: establishing the master-client hierarchy and synchronizing the clocks. Within a PTP domain, each port of an ordinary or boundary clock uses the following process to determine its state:

  1. Establish the master-client hierarchy using the Best Master Clock Algorithm (BMCA):

    • Examine the contents of all received Announce messages (issued by ports in the master state).

    • Compare the data sets of the foreign master (in the Announce message) and the local clock for priority, clock class, accuracy, and so on.

    • Determine its own state as either master or client.

  2. Synchronize the clocks:

    • Use messages, such as Sync and Delay_Req, to synchronize the clock between the master and clients.

Guidelines and Limitations

  • Latency requires all the nodes in the fabric to be synchronized using Precision Time Protocol (PTP).

  • Latency measurement and PTP are supported only on second generation or later Cisco ACI switches. The following first generation Cisco ACI switches are not supported for latency measurement and PTP:

    • N9K-C9332PQ

    • N9K-C9336PQ

    • N9K-C9372PX

    • N9K-C9372PX-E

    • N9K-C9372TX

    • N9K-C9372TX-E

    • N9K-C9396PX

    • N9K-C9396TX

    • N9K-C93120TX

    • N9K-C93128TX

    • N9K-X9736PQ

  • When the Cisco ACI fabric has mixed generation of switches, the latency can be measured only for packets that go through newer generation leaf and spine switches, which support latency measurement with PTP. This implies all spine switches need to be PTP capable switches because it is difficult to predict which spine forwards which traffic flow.

  • In the presence of first generation leaf switches, it is recommended to use external grandmaster and have its connectivity to all the spine switches. Otherwise, the PTP messages from the grandmaster spine may be blocked by first generation switches before they reach all the switches. Using an external grandmaster connected to all spine switches ensures that the PTP messages from the external grandmaster reach all the switches even in the presence of first generation leaf switches.

  • An external grandmaster clock is not mandatory, but we recommend one for high accuracy.

  • To support latency measurements across Cisco ACI pods, all pods need to synchronize to the same clock. For this purpose, we recommend that you connect an external PTP grandmaster with a primary reference time clock (PRTC) such as GPS/GNSS to IPN. Configure the IPN nodes as PTP nodes such that each pod can synchronize to the grandmaster through IPN with almost the same number of hops. If a grandmaster with a PRTC is not available, you can use one of the IPN nodes or Cisco ACI switches as the grandmaster without a PRTC based on the Best Master Clock Algorithm (BMCA). By default, Cisco ACI switches are configured with PTP priority1 of 255, except for one spine switch in each pod that is configured with PTP priority1 of a value lower than the other Cisco ACI switches by one (that is, 254). To make sure that all pods synchronize to the same clock, IPN nodes must be configured as PTP nodes or at least must not block PTP messages from one pod to another.

  • PTP operates only in boundary clock mode. End-to-end transparent clock and peer-to-peer transparent clock modes are not supported.

  • PTP supports transport over User Datagram Protocol (UDP). Transport over Ethernet is not supported.

  • PTP supports multicast communication only; unicast mode is not supported.

  • Beginning with release 4.0(1), you can change the resolution factor to 11, which then can measure up to 214 milliseconds with an accuracy of 204ns.

Configuring PTP Using the APIC GUI

PTP is a system-wide policy and will be enabled on all the supported leafs/spines of all the PODs. When PTP is enabled, ongoing TEP-to-TEP latency measurements get enabled automatically.

Procedure


On the menu bar, click System > System Settings. In the Navigation pane, click Precision Time Protocol and in the Work pane under Properties, select Enabled and click Submit.


Configuring Fabric Latency Parameters Using the APIC GUI

PTP must be enabled on all the Leaf switches and Spines in the fabric. See Configuring PTP Using the APIC GUI.

Procedure


Step 1

On the menu bar, click Tenants > Tenant_name. In the Navigation pane, click Policies > Troubleshoot > Atomic Counter and Latency Policy.

Step 2

Right click on Atomic Counter and Latency Policy to open a policy configuration wizard and perform the following actions:

  1. In the Name field, enter a name for the policy.

  2. In the Features field, check the Latency Statistics box.

  3. In the Mode field, choose either avg or historgram latency modes to apply to the policy.

  4. In the Source (IP or CEP) field, enter the identifying information for the traffic source.

    Note

     

    The required identifying information differs depending on the type of source (endpoint, endpoint group, external interface, or IP address.

  5. In the Destination (IP or CEP) field, enter the identifying information for the traffic destination.

Step 3

Optionally, in the Filters table, click the + icon to specify filtering of the traffic to be counted. In the resulting Create Atomic Counter Filter dialog box, you can specify filtering by the IP protocol number (TCP=6, for example) and by source and destination IP port numbers. Click Submit.

Step 4

In the Work pane, click the Operational tab and click the Latency subtab to view the Latency statistics.


Configuring PTP Using the NX-OS CLI

Procedure


Step 1

Enable PTP.

Example:

Enable ptp:
========
apic# configure terminal
apic(config)# ptp
Disable ptp:
========
apic# configure terminal
apic(config)# no ptp

Step 2

To verify PTP on ACI switches:

Example:

leaf1# show ptp brief
PTP port status
-----------------------
Port         State
-------  --------------
Eth1/49     Slave

leaf1#
leaf1#
leaf1# show ptp clock
PTP Device Type: Boundary clock
Clock Identity :  0c:75:bd:ff:fe:03:1d:10
Clock Domain: 0
Number of PTP ports: 1
Priority1 : 255
Priority2 : 255
Clock Quality:
        Class : 248
        Accuracy : 254
        Offset (log variance) : 65535
Offset From Master : 32
Mean Path Delay : 128
Steps removed : 1
Local clock time:Thu Jul 27 19:43:42 2017

leaf1#
leaf1# show ptp clock foreign-masters record interface ethernet 1/49

P1=Priority1, P2=Priority2, C=Class, A=Accuracy,
OSLV=Offset-Scaled-Log-Variance, SR=Steps-Removed
GM=Is grandmaster

---------   -----------------------  ---  ----  ----  ---  -----  --------
Interface         Clock-ID           P1   P2    C     A    OSLV   SR
---------   -----------------------  ---  ----  ----  ---  -----  --------

Eth1/49    d4:6d:50:ff:fe:e6:4d:3f   254  255   248   254  65535  0    GM

leaf1#
leaf1#
leaf1# show ptp corrections

PTP past corrections
-----------------------------------------------------------------------------------
Slave Port              SUP Time               Correction(ns)    MeanPath Delay(ns)
----------  -------------------------------  ------------------  ------------------
Eth1/49       Thu Jul 27 19:44:11 2017 364281    36                  152
Eth1/49       Thu Jul 27 19:44:11 2017 114565    16                  132
Eth1/49       Thu Jul 27 19:44:10 2017 862912    8                   132
Eth1/49       Thu Jul 27 19:44:10 2017 610823    8                   132
Eth1/49       Thu Jul 27 19:44:10 2017 359557    16                  132
Eth1/49       Thu Jul 27 19:44:10 2017 109937    8                   132
Eth1/49       Thu Jul 27 19:44:09 2017 858113    16                  132
Eth1/49       Thu Jul 27 19:44:09 2017 606536    16                  132
Eth1/49       Thu Jul 27 19:44:09 2017 354837    -16                 132
Eth1/49       Thu Jul 27 19:44:09 2017 104226    24                  148
Eth1/49       Thu Jul 27 19:44:08 2017 853263    24                  148
Eth1/49       Thu Jul 27 19:44:08 2017 601780    16                  148
Eth1/49       Thu Jul 27 19:44:08 2017 349639    -4                  148
Eth1/49       Thu Jul 27 19:44:08 2017 99970     16                  144
Eth1/49       Thu Jul 27 19:44:07 2017 848507    0                   144
Eth1/49       Thu Jul 27 19:44:07 2017 596143    24                  144
Eth1/49       Thu Jul 27 19:44:07 2017 344808    4                   144
Eth1/49       Thu Jul 27 19:44:07 2017 93156     -16                 140
Eth1/49       Thu Jul 27 19:44:06 2017 843263    24                  140
Eth1/49       Thu Jul 27 19:44:06 2017 590189    8                   140
leaf1#
leaf1#
leaf1# show ptp counters all

PTP Packet Counters of Interface Eth1/49:
----------------------------------------------------------------
Packet Type                  TX                      RX
----------------    --------------------    --------------------
Announce                          56                    5424
Sync                             441                   43322
FollowUp                         441                   43321
Delay Request                   7002                       0
Delay Response                     0                    7002
PDelay Request                     0                       0
PDelay Response                    0                       0
PDelay Followup                    0                       0
Management                         0                       0
----------------------------------------------------------------

leaf1#
leaf1#
leaf1# show ptp parent

PTP PARENT PROPERTIES

Parent Clock:
Parent Clock Identity:  d4:6d:50:ff:fe:e6:4d:3f
Parent Port Number: 258
Observed Parent Offset (log variance): N/A
Observed Parent Clock Phase Change Rate: N/A

Grandmaster Clock:
Grandmaster Clock Identity:  d4:6d:50:ff:fe:e6:4d:3f
Grandmaster Clock Quality:
        Class: 248
        Accuracy: 254
        Offset (log variance): 65535
        Priority1: 254
        Priority2: 255

leaf1#

Step 3

To verify troubleshooting steps:

Example:

apic1# show troubleshoot eptoep session eptoep latency 
 
Source --> Destination
Last Collection(30 seconds)
+--------------------+-------------------------------+--------------+
| Average (microsec) | Standard Deviation (microsec) | Packet Count |
+--------------------+-------------------------------+--------------+
| 18                 | 24                            | 1086         |
|                    |                               |              |
+--------------------+-------------------------------+--------------+
 
 
 
Cumulative
+--------------------+----------------+--------------------+
| Average (microsec) | Max (microsec) | Total Packet Count |
+--------------------+----------------+--------------------+
| 18                 | 202            | 6117438            |
|                    |                |                    |
+--------------------+----------------+--------------------+

Configuring Latency and PTP Using the REST API

To configure the flow policy parameters, follow the same steps for configuring atomic counters in Cisco APIC Troubleshooting guide: https://www.cisco.com/c/en/us/td/docs/switches/datacenter/aci/apic/sw/1-x/troubleshooting/b_APIC_Troubleshooting/b_APIC_Troubleshooting_chapter_0110.html#id_40942.

Procedure


Step 1

To enable PTP mode:

Example:

/api/node/mo/uni/fabric/ptpmode.xml
<latencyPtpMode state=”enabled”>

Step 2

Configure an EP to EP policy:

Example:

<dbgacEpToEp name="EP_to_EP_Policy" adminSt="enabled" usage=“latency-stats” latencyCollect = “histogram”>
</dbgacEpToEp>

Step 3

To enable both atomic counter and latency (average mode), here’s the XML

Example:

<dbgacEpToEp name="EP_to_EP_Policy" adminSt="enabled" usage=“latency-stats|atomic-counter” latencyCollect = “average”>
</dbgacEpToEp>

Step 4

To change the collection type for Ongoing-mode from average to histogram.

Example:

<latencyOngoingMode userMode=”histogram”>