Hybrid Timing Failover Behavior

Source States at a Glance

+-------------------+   GNSS lost        +---------------------+  backhaul lost     +------------------+
| GNSS locked       |------------------->| Backhaul locked     |------------------->| Holdover         |
| (primary)         |<-------------------| (secondary)         |<-------------------| tier 0 -> 3      |
+-------------------+   GNSS restored    +---------------------+  backhaul restored +------------------+
          ^                                                                                   ^
          |                                                                                   |
          |                                                                                   |
          |           both sources lost  /  GNSS (primary) restored while in holdover         |
          +-----------------------------------------------------------------------------------+

Figure 1. Source states and transitions. In scenario C the roles are exchanged: the backhaul is the primary and GNSS the secondary.

Failover and fail-back are driven by the DPLL’s own selection. dpll-mgr follows it, reprograms the gears, and the alarms and the advertised clockClass follow. The sequence is the same in both directions, and the software part of every decision completes in under a millisecond - the time you observe is the DPLL hardware re-locking to the new reference (How Long Does a Transition Take?).

Scenarios A and B: GNSS Primary, PTP Backhaul Secondary

Columns bh / ts1 / ts2 are the gears of ptp01bh / ts1 / ts2 (Gearshift: PARK and DRIVE). Notifications are the PTP Notification states (Synchronization-State Notifications).

#

Event

Active source and DPLL state

Gears bh / ts1 / ts2

ptp01bh port state

Fronthaul clockClass

Alarms

Notifications

1

Normal operation

GNSS_REF4P, locked_ho_acq

PARK / DRIVE / DRIVE

UNCALIBRATED

6

None.

ptp01bh reports Monitoring; ts1 reports SYNCHRONIZED; overall state Locked.

2

GNSS lost, backhaul healthy

Brief HOLDOVER_0 (about 12 s) then SDP0_REF0N, locked_ho_acq

DRIVE / PARK / DRIVE

SLAVE

The upstream grandmaster’s class (normally 6)

A GNSS/1PPS signal loss alarm is raised for the GNSS source (minor, escalating to major once the loss exceeds holdover_seconds).

ptp01bh reports Locked; ts1 reports FAILURE-NOFIX; overall state Locked.

3

GNSS restored

Back to GNSS_REF4P (about 12 s)

PARK / DRIVE / DRIVE

UNCALIBRATED

6

The GNSS signal-loss alarm clears.

ptp01bh reports Monitoring; ts1 reports SYNCHRONIZED; overall state Locked.

4

Backhaul lost (link down or upstream grandmaster gone) while GNSS is active

No change - GNSS stays the master

PARK / DRIVE / DRIVE

FAULTY (local link down) or LISTENING (grandmaster gone)

6

A not locked to remote PTP Grand Master alarm is raised for ptp01bh; it clears when the backhaul returns.

ptp01bh moves to Holdover, then Freerun; ts1 reports SYNCHRONIZED; overall state Locked.

5

Both sources lost

HOLDOVER_0 advancing to HOLDOVER_3

PARK / DRIVE / DRIVE

any

135, then 165, or 7, then 140, depending on the node’s configuration and state (clockClass on the Fronthaul)

DPLL holdover alarm, severity escalating with the tier (Holdover and Alarm Escalation).

ptp01bh moves to Holdover, then Freerun; ts1 reports FAILURE-NOFIX; overall state moves to Holdover, then Freerun.

6

Upstream grandmaster disappears while locked to the backhaul

Backhaul is rejected: holdover, backhaul pins disconnected

PARK / DRIVE / DRIVE

LISTENING

135, then 165

DPLL holdover alarm. When the grandmaster returns, the backhaul re-locks and the alarm clears; there is no lock/holdover oscillation.

ptp01bh moves to Holdover, then Freerun; ts1 reports FAILURE-NOFIX; overall state moves to Holdover, then Freerun.

7

Upstream grandmaster degraded but present (it lost its own GNSS)

Stays locked to the backhaul - no failover, no holdover

DRIVE / PARK / DRIVE

grandmaster still present

The degraded class is relayed (for example 7, then 140)

No DPLL holdover alarm. An out-of-tolerance alarm can appear if the time offset grows.

ptp01bh reports Locked; ts1 reports FAILURE-NOFIX; overall state Locked.

8

GNSS ts2phc stops while GNSS is active

GNSS is treated as lost (its pins are disconnected on both DPLL devices): failover to the backhaul if it is healthy, otherwise holdover

as event 2 or 5

as event 2 or 5

as event 2 or 5

As event 2 or 5, after the loss is detected (about 10 s). Restart ts2phc to recover (Top Issues in Detail).

As event 2 or 5.

9

Backhaul ptp4l stops while locked to the backhaul

Detected within about a minute (worst case about 75 s); backhaul pins stay disconnected; holdover until ptp4l genuinely recovers

PARK / DRIVE / DRIVE

n/a

135, then 165

DPLL holdover alarm and the process alarm for the stopped instance.

ptp01bh moves to Holdover, then Freerun; ts1 reports FAILURE-NOFIX; overall state moves to Holdover, then Freerun.

Scenario C: PTP Backhaul Primary, GNSS Secondary

#

Event

Active source and DPLL state

Gears bh / ts1 / ts2

ptp01bh port state

Fronthaul clockClass

Alarms

Notifications

1

Normal operation

SDP0_REF0N, locked_ho_acq; GNSS is selectable (a healthy standby)

DRIVE / PARK / DRIVE

SLAVE

The upstream grandmaster’s class (normally 6)

None.

ptp01bh reports Locked; ts1 reports SYNCHRONIZED; overall state Locked.

2

Backhaul lost (link or grandmaster)

Failover to GNSS_REF4P (about 12-19 s)

PARK / DRIVE / DRIVE

LISTENING or FAULTY

6

Not locked to remote PTP Grand Master alarm for ptp01bh.

ptp01bh moves to Holdover, then Freerun; ts1 reports SYNCHRONIZED; overall state Locked.

3

Backhaul restored

Back to SDP0_REF0N (about 19 s)

DRIVE / PARK / DRIVE

SLAVE

upstream class

The alarm clears.

ptp01bh reports Locked; ts1 reports SYNCHRONIZED; overall state Locked.

4

GNSS lost while on the backhaul

No change - the standby is lost

DRIVE / PARK / DRIVE

SLAVE

upstream class

GNSS signal-loss alarm for the standby source.

ptp01bh reports Locked; ts1 reports FAILURE-NOFIX; overall state Locked.

5

Both lost

HOLDOVER_0 advancing to HOLDOVER_3

PARK / DRIVE / DRIVE

any

135, then 165, or 7, then 140, depending on the node’s configuration and state (clockClass on the Fronthaul)

DPLL holdover alarm (Holdover and Alarm Escalation).

ptp01bh moves to Holdover, then Freerun; ts1 reports FAILURE-NOFIX; overall state moves to Holdover, then Freerun.

The remaining events (grandmaster degraded, process stops) behave as in Scenarios A and B: GNSS Primary, PTP Backhaul Secondary, with the roles of GNSS and the backhaul exchanged.

Holdover and Alarm Escalation

When no source is valid, the DPLL holds the last good frequency and phase. dpll-mgr tracks how long it has been in holdover and moves through four tiers. The dwell time of each tier is configurable (ho_0, ho_1, ho_2, in minutes - dpll-mgr Configuration Reference). Each tier change re-raises the DPLL holdover alarm (alarm ID 100.119) with a higher severity:

Tier (holdover_level)

Elapsed in holdover (defaults)

Alarm severity

clockClass on the fronthaul (default holdover_seconds)

HOLDOVER_0 (0)

0 to ho_0 (30 min)

Warning

135

HOLDOVER_1 (1)

ho_0 to ho_1 (30 to 60 min)

Minor

135

HOLDOVER_2 (2)

ho_1 to ho_2 (60 to 240 min)

Major

135

HOLDOVER_3 (3)

ho_2 onward (240 min and later)

Critical

165

The clockClass values above are the common case. Depending on the node’s configuration and state, the fronthaul can instead advertise 7 then 140, or 248 (clockClass on the Fronthaul). The change from the within-specification class to the out-of-specification class follows holdover_seconds, not the tier.

source lost
+-----------------+-------------------+-----------------------+--------------->
|                 |                   |                       |
0                 ho_0 (30 min)       ho_1 (60 min)           ho_2 (240 min)
  tier 0            tier 1              tier 2                  tier 3
  WARNING           MINOR               MAJOR                   CRITICAL
  clockClass 135 (within holdover_seconds, default 4 h)         165
(not to scale)

Figure 2. Holdover Tiers and Default Dwell Times.

  • The alarm text is <hostname> DPLL holdover tier <n> - timing reference lost for <m> min, and its entity ID is host=<hostname>.instance=<dpll-mgr instance>.ptp=holdover.

  • The defaults (30 / 60 / 240 minutes) line up the Major-to-Critical escalation with the in-specification holdover window used for the clockClass (holdover_seconds, default 14400 s = 4 h), so the alarm severity and the advertised quality tell the operator the same story.

  • The tier settings only change when the alarm severity escalates. They do not program the DPLL, change pin priorities or affect holdover accuracy.

  • Start-up grace: no holdover alarm is raised before the node has locked for the first time after dpll-mgr starts.

  • When a source returns and the DPLL locks, the alarm clears automatically.

How Long Does a Transition Take?

Transition

Typical time

Dominated by

GNSS -> backhaul

about 12 s

DPLL hardware re-lock

Backhaul restored -> backhaul lock

about 19 s

DPLL hardware re-lock

GNSS restored -> GNSS lock

about 12 s

DPLL hardware re-lock

Loss of both sources -> holdover

about 1 s

Dead GNSS ts2phc detected

about 10 s

liveness checks (Lock States, Holdover, and Liveness)

Dead backhaul ptp4l detected

about a minute (worst case about 75 s)

liveness checks (Lock States, Holdover, and Liveness)

dpll-mgr decision and gearshift

under 1 ms

software

The times in this section are typical results from lab testing. The values on your system depend on your environment and network. The re-lock times are a property of the DPLL hardware, not of dpll-mgr. In normal operation dpll-mgr uses about 0.03 % of a platform CPU core and about 14 MB of memory, and does not need a dedicated core.

Alarms and the ptp-notification state follow the DPLL with an additional delay of up to about 30 to 90 seconds. Allow for this when you check the system immediately after a transition.

Fail-Back

Fail-back is automatic. When the primary source becomes valid again, the DPLL re-selects it (its priority is better), dpll-mgr returns the gears to the primary’s pattern, and the secondary-source alarms clear. No operator action is needed, with one exception: a ts2phc instance that was stopped for a long time must be restarted (systemctl restart), not just started, so that it re-steps the PHC (Top Issues in Detail).