running oscillator); the “priority” as
determined by the local PTP administrators (which is used as an override
mechanism and not required to be
set for proper operation); the device’s
clock ID (which typically includes the
device’s MAC address); and other attributes used by the BMC.
Having every PTP device run the
BMC and process Announce messages means administrators can simply
power on a system and have a network
of time-synchronized devices automatically configured for optimal performance, regardless of spontaneous
network topology changes.
Boundary clocks. Because switches and routers effectively segment a
PTP network, PTP introduced boundary clocks as a means of distributing
a master clock to different parts of
the network. The PTP standard describes a boundary clock as containing a single timekeeper disciplined
by PTP but having multiple PTP ports
in a domain. A port may serve as either the source of time (a PTP master)
to devices attached to it or one that
synchronizes the timekeeper (a PTP
slave) to some other clock connected
to that port. A boundary clock can be
implemented to replace a traditional
network switch or router in larger networks that are normally segmented
by such devices. Because boundary
clocks differ in operation from the
PTP clocks previously described in
this article, PTP differentiates the two
by referring to them as either ordinary
clocks or boundary clocks.
Each port of a boundary clock can
be thought of as a separate ordinary
clock instance that shares a single
timekeeper with the boundary clock’s
other ordinary clock instances. Only
one port on the device can be in the
slave state, which eliminates contentious use of the device’s timekeeper
(two ports trying to adjust the time,
for example). All other ports are considered masters to the devices on their
respective segments.
The existence of boundary clocks re-
quires PTP to use the term grandmaster
to describe the master to the entire PTP
network, since the slaves on a bound-
ary-clock port consider the boundary
clock to be their master. Each master
port is responsible for handling the
same duties as an ordinary clock mas-
ter, which effectively hides all of the
slaves from the boundary clock’s mas-
ter. Likewise, a slave ordinary clock (or
another boundary clock with the con-
nected port in the slave state) is hidden
from the PTP hierarchy “above” the
boundary clock. A boundary clock does
not pass the PTP synchronization mes-
sages from its slaves “up” to its master.
Without this behavior, a grandmaster
would be responsible for processing
Delay Request messages and issuing
Delay Response messages from and to,
respectively, every slave device on the
entire PTP network. In most cases it
would not be able to run the protocol
stack effectively.
For example, if the grandmaster goes
offline, the next most eligible slave
device can announce itself as master
(once its BMC algorithm has determined it’s appropriate to do so), and
the boundary clock will transition the
port connected to that slave to the slave
state. That boundary clock will then
have a port that was once in the slave
state now in the master state to other
ordinary and boundary clocks. Those
clocks will then evaluate that new master with the BMC algorithm and transition appropriately, repeating this
process for the rest of the hierarchy.
Depending on the network topology,
this situation may not be ideal as the
number of hops in between this new
master and a slave will have increased
by one (the boundary clock connected
Figure 4. Device hierarchy using boundary clocks.
boundary Clock 1
boundary Clock 2
ordinary
Clock 1
boundary Clock 3
ordinary
Clock 2
ordinary
Clock 3
ordinary
Clock 4
ordinary
Clock 5
Figure 5. Boundary clocks used to join different network technologies.
boundary Clock 1
boundary Clock 2
ordinary
Clock 1
boundary Clock 3
ordinary
Clock 2
ordinary
Clock 3
ordinary
Clock 4
ordinary
Clock 5