Professional Documents
Culture Documents
There are many different ways to distribute PTP across a facility (or multiple facilities) for the purpose of providing
timing to various transmitters/receivers (slave devices). PTP is transported over multicast from a master clock
(Grandmaster) and this multicast group propagates throughout the network to all endpoints that are requesting it.
There are various types of messages that get exchanged between the master clock and the slaves, each providing
necessary timing values to calculate that actual time and offset calculations that the devices will be referenced to.
Some PTP distribution networks are more scalable than others, and others can be more complex to configure.
Ultimately, the goal is to ensure that all slave devices can lock to PTP and stay locked. These slaves can include
endpoint devices such as SDI-to-IP or IP-to-SDI Gateways, multiviewers, keyers, etc.
More literature is available on the Arista website detailing the intricacies of PTP. This is strictly a document that details
configuration possibilities with recommendations for a media network.
arista.com
White Paper
The attributes configured on the Grandmasters, contributing to the BMCA are evaluated in the following order:
Announce Message: Message that advertises the PTP attributes (listed above) to determine what master is the Grandmaster. This
is done using the BMCA (Best Master Clock Algorithm). For SMPTE-2110 deployment, this value should be set to 0 (zero) – which
translates to 1 message per second (20=1)
Sync Message: Message that contains the time that a packet was transmitted from the master to the slave. In Two-Step mode, the
follow-up message contains the time that its partner sync packet was transmitted from the master. For SMPTE-2110 deployments,
the sync interval is set to -3, which translates to 8 messages a second. (2(-3)) = 0.125
Delay Request (Response): Messages used to calculate the one way delay of PTP. Delay request messages and delay response
messages is the same frequency as the sync interval.
Management Messages: These messages are used to maintain, monitor, and configure the PTP network.
Announce Timeout: Number of announce messages the device can miss before triggering a new BMCA to find a new GM. Generally,
this value is set to 3 (Arista default)
The table below represents the different range of values per message type or domain based on AES67 and 2059-2 profiles, and their
overlap. However, the most common values for these message types are:
Announce Interval = 0
Sync Interval = -3
Delay Request Interval = -3
arista.com
White Paper
All of the PTP messages above have the destination address of 224.0.1.129, though Event Messages utilize UDP Port 319 and General
Messages utilize UDP Port 320. Of the messages above, Sync and Delay Request Messages are Event messages, while Announce,
Delay Response, and Management Messages are General Messages.
The message exchange between the master and slave devices can be seen below:
Once the slave has all four time values (t1, t2, t3, t4) it can accurately calculate the offset between the slave and the master clock, as
well as the propagation delay between the two. Therefore, it is clear that the slave uses the Sync (and Follow-up), Delay Request, and
Delay response messages to synchronize to its master.
A Grandmaster is connected to a switch, and that switch interface will become a slave to its grandmaster. All other interfaces on the
switch that are PTP enabled, will be a master for its connected endpoint device. This endpoint device can be a transmitter, receiver,
or even another switch. A downstream switch will follow the same pattern mentioned above, whereby the interface joining the two
switches together (on the GM switch) will be the master to the downstream switch’s slave.
arista.com
White Paper
• All switches should be in Boundary Clock mode, and that Grandmaster A has a lower value for P1 than Grandmaster B.
• All interfaces connected to only slave devices should have a config on them to set the interfaces to master mode only. The
command is ‘ptp role master’.
• Notice that PTP A and PTP B only have one connection to each side of the network. Even though some PTP Grandmasters are
equipped with dual interfaces, architectures using dual interfaces have not been thoroughly tested and should be avoided.
• The connections from switch to GM, and from switch-to-switch, are in dynamic mode (ie, not master only – the interface can be
elected as master, slave, or passive, depending on the BMCA election).
• The reasoning behind connecting the two switches (SMPTE-2022-7) together is such that in the even that PTP A is the GM,
but a primary link on an endpoint is lost, then the device’s secondary connection will acquire PTP A’s timing information. All
devices, regardless of which connection receives PTP will be locked to the same clock. It is important to note that PTP messages
(in either Boundary Clock or Transparent mode, described below) will not traverse the peer-link in an MLAG domain. This is
currently not supported. In such a case, it is advised to add an extra connection (or two) between the switches, in addition to
the peer-link, that will be dedicated for PTP transport. Another important point is that, by default, all PTP messages that are
generated by the CPU are untagged, therefore, if the traffic must traverse a trunk, a native vlan must be configured on the trunk
interface.
Transparent Clocking devices remove PTP message jitter (the result of their own queues) differently. The multicast or unicast PTP
messages are passed through using entirely normal unicast or multicast forwarding, but the precise time that each packet takes to
transit the switch is recorded, and this time (correction factor) is included in the PTP messaging as it passes to the intended recipient.
The end-point can now use the correction factor to compensate for the delay through the switch (or multiple Transparent Clock
switch hops as well).
There are different use cases for creating a PTP Distribution network in TC mode, such as modular switches with dual supervisors, or
the front-end switch (such as a 7020TR) connected directly to both the GM and the data network.
Security: For each interface on an Arista switch, there is a configuration option called “ptp role master”. This ensures that the devices
connected to that interface can never become the GM for the overall network in the event that someone were to accidentally set
a higher priority 1 for its BMCA (or that the interface cannot be set to slave mode. It could be disastrous for the system if a rogue
device were accidentally connected into the network with a lower P1 value than the GM. PTP Role Master protects the system from
this scenario.
Message Suppression: Since each interface is a master only to the device connected to it, the delay request messages (sent from
slave to master) do not leak to other switch interfaces on the local or connected switches. All PTP messages terminate at the
boundary clock. This is important because all PTP messages have the same multicast address – 224.0.1.129. Therefore, when every
device transmits 224.0.1.129 around 8 times second, all of those messages would be received at every other device that is also PTP
aware. The number of messages grows exponentially as more and more PTP aware devices get added to the network. This can cause
some devices to get overloaded. Boundary clock restricts this.
arista.com
White Paper
Scalability: PTP aware devices have a limit to the number of messages that can be received per second, including the grandmasters.
Thousands of messages a second could cause devices to lock up. Since the Boundary Clock absorbs many of these messages, the
overall PTP distribution network can grow and expand without the concern of increasing the number of messages traversing the
network. Boundary mode helps to expand the capacity of the broadcast network by distributing the time synchronization workload
across the switches supporting BC.
Ease of Configuration: As Boundary Clock is operated by a PTP agent, it operates independently of routing protocols, therefore
expansion of the PTP distribution network does not require manipulation of any routing statements.
Some customers will opt for a Transparent Clock, which is acceptable and will be able to work provide accurate timing to endpoint
devices. Transparent Clock can be useful when the number of slave devices connected to a switch, such as a 7500R, grows to
an amount that the supervisor is unable to handle in Boundary Clock. This number can be around 400. Ensure that the mode of
operation for PTP is in Hybrid mode so that the GM does not receive every PTP message from every slave device.
Clock Recovery: Boundary switches continue providing timing data even if a master clock becomes incapacitated. Once the master
clock has recovered or a backup has taken over, the network recalibrates without losing a step, thus ensuring consistent, reliable
broadcast operations. Since transparent mode devices don’t interact with end stations, they can’t provide timing support in case of
a master clock failure. Also, by manually adjusting the local Priority 1 and Priority 2 values on the switches, a PTP hierarchy can be
created in the event that if all GMs fail, a specific switch will assume the role the reference clock for the entire system. This will remain
in place until a GM with a better Priority 1 or Clock Class participates in the BMCA.
NOTE: The PTP Source IP is what the switch uses to restamp the PTP messages from the switch to the endpoints. On a per switch
device, there can only be one PTP domain, and in addition to that, all devices in the facility should be locked to the same PTP clock.
arista.com
White Paper
(the above command ‘ptp role master’ ensures that the device connected to the interface will never become the GM for the PTP
domain. This is considered a best practice for PTP security.)
1. Every device in the network should have a read only status of the Grandmaster Clock Identity. This ID should be the same across
all switches and endpoints
2. Clock Identity is the ID of the specific switch that this command is run on.
3. Slave port is identified in two locations. This is the interface that is providing this switch with PTP
4. Steps Removed indicates how many hops the switch is from the Grandmaster. In the case above, the GM is connected directly to
the switch, therefore the value is 1.
arista.com
White Paper
1. Parent Clock Identity is the ID of the clock sourcing this switch. In this case, it is the Grandmaster. If this command was run on a
switch connected to this one, the ID would be the Clock Identity shown in the ‘show ptp’ output
2. Parent IP Address, in this case, is the IP of the GM itself, since it is directly connected to the switch. In the case of a switch
connected to this one, the Parent IP Address will be the Source IP entered in the Global Configuration of the switch.
3. Grandmaster Clock Quality is based on attributes in the BMCA. This GM is in freerun since the class is 248.
arista.com
White Paper
show ptp interface ethernet # counters (displays counters of required PTP messages, such as sync messages sent/received, delay-
req sent/received)
show ptp monitor (displays up to 100 entries of offset from master, mean path delay, and skew)
Note that this command is only available on EOS 4.21.1F and later. For more specifics on settable thresholds, please view the EOS
manual.
arista.com
White Paper
To perform the analysis of PTP for an interface, issue the following commands:
localhost(config)#monitor session test source eth1
localhost(config)#monitor session test destination cpu
localhost(config)#show mon session test
Take note of the mirror# next to the session name. This will be used for the next step.
localhost(config)#bash
[admin@localhost] tcpdump -i mirror1 host 224.0.1.129 | more
(the above will show the output on the terminal. Other linux notations can be used, as -v, -n, -XX etc.
or
This will provide a file that can be opened in wireshark to examine PTP packets. This file, by default, is in /home/admin and can be
obtained through USB or SCP
NOTE: After the capture is complete, exit out of bash back into config terminal and type ‘no mon session test’
2. Note that Arista BC’s do not perform an IGMP join on 224.0.1.129. If the BC is not directly connected to another BC, or a GM, a
static IGMP join will be required to receive the PTP traffic
3. Use the PTP counters to troubleshoot whether sync and delay request messages are being received / sent. In Hybrid mode
(multicast syncs / unicast delay requests/responses), confirm the global config contains a “ptp source ip <ip>” command
4. Port mirroring can be quite useful - but be mindful that different platforms mirror at different places in the pipeline, so beware
that this may give you a misleading view.
5. If a trunk is being used to transport either BC or TC PTP messages, ensure that there is a native vlan assigned on the trunk
interface
arista.com
White Paper
Case 1: Spine (PTP aware) & Leaf (non-PTP) L3LS w/ ECMP and Hashing
This deployment is tricky due to the spines (Arista 7504R) supporting Boundary Clock while the leaf switches (7160) do not. The
original configuration called for every 7504-7160 interface on the 7504 side to have ptp enabled, with ptp role master set as well.
Since the 7160s do not support boundary clock mode, and the leaf switches are all configured for different subnets from each other
and from the 7504, an RP was required to route the PTP traffic from the 7504 to the 7160.
The above topology and configuration would produce the following problems:
• Delay request messages from endpoints connected to Leaf switches would leak into other Leaf switches, and therefore other
devices
• On the L3 connections between the leaf and spine, it is possible that the PTP Master interface would not match the mroute for
224.0.1.129 on the leaf. For example, link on the spine would be the master, but link 3 on the leaf would be listed as the OIF for
224.0.1.129. This would prevent locking of all devices on that leaf. The resolution for this includes the following steps:
ºº Create a script on the spine (one dedicated for each leaf ) that is triggered by an event handler on loss of connectivity of link
1
ºº On the leaf switch, create two static mroutes back, with the PTP source IP as the destination - with a higher priority on link
1. Also create a static igmp join for 224.0.1.129
All of these steps are required to ensure proper PTP lock on an L3LS network topology, where the spine supports Boundary Clock
and the leaf switches do not. Choosing the correct platforms, ones with Boundary Clock support, will reduce the complexity of the
network configuration and also simplify the troubleshooting process.
arista.com
White Paper
The reasoning behind configuring the 7500R switch in TC mode is that the PTP agent used for implementing BC is hosted in the
supervisor. Therefore, if one supervisor were to failover, or be removed, the PTP agent would be forced to restart and negatively
impact all of the end devices locking to it. TC mode does not use this PTP agent, therefore the failure of a supervisor would not be
damaging to the timing of the overall system. Message suppression is still active due to the Hybrid mode described above, and a
correction factor is also present for more accurate offset calculations.
For increased redundancy, be sure to connect two GMs to the switch in TC mode.
Important Note: Not all platforms support Transparent Clock. This must be confirmed
The image above reflects a proposal for a project with Arista and a partner. The criteria were that GMs 1 and 3 would be the “main
PTP GMs” unless there was both a break between the two buildings and a failure of either 1 or 2.
Priority 1
Clock Class
Clock Accuracy
Clock Variance
Priority 2
arista.com
White Paper
GMID
Use Priority 2 as the critical attribute to break the tie as to which GM will be elected Grandmaster based on the requirements noted
above.
Therefore:
GM 1: Priority 1 = 1 ; Priority 2 = 2
GM 2: Priority 1 = 1 ; Priority 2 = 3
GM 3: Priority 1 = 1 ; Priority 2 = 4
GM 4: Priority 1 = 1 ; Priority 2 = 5
The above attribute settings will ensure GM 1 is the highest priority for being elected GM, followed by GM 2, 3, and 4. Note that it is
vital that all possible GMs be configured with the same Announce Interval, otherwise one GM may inadvertently be elected GM for
the system if its creation of Announce Messages are quicker than other GMs.
arista.com
White Paper
arista.com
White Paper
arista.com
White Paper
arista.com
White Paper
Conclusion
There are many possible variations to a functional PTP distribution network. However, when designing these types of networks,
especially in the M&E space where there are possibly hundreds of slave devices, scattered throughout a facility, scalability and CPU
utilization of the endpoints must be taken into account. It is recommended that the platforms selected for an M&E deployment,
and more specifically SMPTE-2110, support Boundary Clock and that this feature be enabled. In addition to those reasons, there
is a simplistic approach to relying on Boundary Clock, both in configuration and troubleshooting, as shown in the first Case Study.
Without Boundary Clock, in a routed environment, an RP will be required, which inevitably means that Anycast or a Bootstrap Router
will be required - adding to the complexity of the design. Also, ensuring that the network design supports boundary clock is vital
and should be the first topic of discussion when designing a PTP distribution network.
Copyright © 2016 Arista Networks, Inc. All rights reserved. CloudVision, and EOS are registered trademarks and Arista Networks
is a trademark of Arista Networks, Inc. All other company names are trademarks of their respective holders. Information in this
document is subject to change without notice. Certain features may not yet be available. Arista Networks, Inc. assumes no
responsibility for any errors that may appear in this document. Apr. 02, 2019
arista.com