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.
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 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:
-
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.
-
-
Synchronize the clocks:
-
Use messages, such as
Sync
andDelay_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 Navigation pane, click Precision Time Protocol and in the Work pane under Properties, select Enabled and click Submit. . In the |
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 Navigation pane, click . . In the |
Step 2 |
Right click on Atomic Counter and Latency Policy to open a policy configuration wizard and perform the following actions: |
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:
|
Step 2 |
To verify PTP on ACI switches: Example:
|
Step 3 |
To verify troubleshooting steps: Example:
|
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:
|
Step 2 |
Configure an EP to EP policy: Example:
|
Step 3 |
To enable both atomic counter and latency (average mode), here’s the XML Example:
|
Step 4 |
To change the collection type for Ongoing-mode from average to histogram. Example:
|