Configure Hybrid Timing¶
This chapter configures a node with GNSS and a PTP backhaul using the
system CLI. The same instances serve every scenario; Changes per
Scenario lists the changes per
scenario. All commands are run as an administrator after you source the admin
user environment source /etc/platform/openrc.
Note
Interface names (eno8703, eno8503, eno8403, enp108s0f0) and
the serial device (/dev/ttyACM0) are examples from a reference
system. Identify the right ports on your hardware first
(system host-if-list, system host-port-list) and substitute them.
Multi-host systems. Each host is timed independently, from its own GNSS
receiver and its own connection to your upstream network grandmaster. Hosts do
not synchronize time with one another, and no time relationship exists between
them that requires configuration. On a system with more than one such host (for
example AIO-DX), repeat the procedure in this chapter on each host, against
that host’s own sources. Instance and interface names are unique across the
system, so give each host’s instances different names (for example, add a host
prefix such as c1-) and use that host’s name in every host-*-assign
command. A swact (controller switchover) does not disturb the clock discipline
of either host.
Prerequisites
Check the following before you create any instance:
The GNSS receiver is attached and has a fix (see GNSS Receiver Control (Granite Rapids-D) and Granite Rapids-D GNSS Monitoring and Quality Metrics).
You know which port is the E825 base port (the port whose PHC the DPLL disciplines -
eno8703in the examples), which port connects to the backhaul, and which ports serve the fronthaul on the E825 and, if installed, the E830.The upstream grandmaster is on the same time base as your GNSS and is configured with the fast message rates (Requirements).
Instance Model¶
Instance |
Service |
Interface (name -> port) |
Notes |
|---|---|---|---|
|
|
|
Configures the SDP pins. |
|
|
|
GNSS source; serial device for NMEA. Gearshift channel |
|
|
|
|
|
|
|
Fronthaul grandmaster (E825). |
|
|
|
Fronthaul grandmaster (E830). Omit if there is no E830. |
|
|
none |
Aligns the system clock with the E825 PHC. |
|
|
|
Servoing backhaul client. Gearshift channel |
|
|
none (a |
The manager. |
The instance names are your choice, but dpll-mgr1 must reference the
backhaul ptp4l instance and the ts2phc instances by name
(dpll-mgr Configuration Reference).
Procedure
This procedure builds the node as a PTP boundary clock with GNSS primary
and an L2 (G.8275.1) backhaul secondary - scenario A. In the examples the
host is controller-0.
Create the clock instance and configure the E825 SDP pins.
~(keystone_admin)]$ system ptp-instance-add clock0 clock ~(keystone_admin)]$ system host-ptp-instance-assign controller-0 clock0 ~(keystone_admin)]$ system ptp-interface-add clock0if1 clock0 ~(keystone_admin)]$ system ptp-interface-parameter-add clock0if1 sdp1=input tspll_cfg=timeref_156.25 ~(keystone_admin)]$ system host-if-ptp-assign controller-0 eno8703 clock0if1
sdp1=inputreceives the GNSS 1PPS into the DPLL;tspll_cfgselects the timing-module reference frequency.Create the GNSS ts2phc instance.
~(keystone_admin)]$ system ptp-instance-add ts1 ts2phc ~(keystone_admin)]$ system ptp-instance-parameter-add ts1 ts2phc.nmea_serialport=/dev/ttyACM0 ~(keystone_admin)]$ system host-ptp-instance-assign controller-0 ts1 ~(keystone_admin)]$ system ptp-interface-add ts1if1 ts1 ~(keystone_admin)]$ system ptp-interface-parameter-add ts1if1 ts2phc.channel=1 ts2phc.pin_index=1 ~(keystone_admin)]$ system host-if-ptp-assign controller-0 eno8703 ts1if1
Create the E825 fronthaul grandmaster.
~(keystone_admin)]$ system ptp-instance-add ptp01fh ptp4l ~(keystone_admin)]$ system ptp-instance-parameter-add ptp01fh domainNumber=24 dataset_comparison=G.8275.x ~(keystone_admin)]$ system ptp-instance-parameter-add ptp01fh logAnnounceInterval=-3 logSyncInterval=-4 logMinDelayReqInterval=-4 ~(keystone_admin)]$ system host-ptp-instance-assign controller-0 ptp01fh ~(keystone_admin)]$ system ptp-interface-add ptp01fhif1 ptp01fh ~(keystone_admin)]$ system host-if-ptp-assign controller-0 eno8503 ptp01fhif1
Create the system-clock synchronization instance.
~(keystone_admin)]$ system ptp-instance-add phc1 phc2sys ~(keystone_admin)]$ system ptp-instance-parameter-add phc1 domainNumber=24 uds_address=/var/run/ptp4l-ptp01fh cmdline_opts='-w -s eno8703' ~(keystone_admin)]$ system host-ptp-instance-assign controller-0 phc1
(Optional) Add the E830.
If the node has an E830 adapter, give it its own
ts2phcinstance and fronthaul grandmaster. Thets2instance uses the generic PHC source, so the E830 PHC follows the E825 PHC the source currently controlling it.~(keystone_admin)]$ system ptp-interface-add clock0if2 clock0 ~(keystone_admin)]$ system ptp-interface-parameter-add clock0if2 sdp1=input ~(keystone_admin)]$ system host-if-ptp-assign controller-0 enp108s0f0 clock0if2 ~(keystone_admin)]$ system ptp-instance-add ts2 ts2phc ~(keystone_admin)]$ system ptp-instance-parameter-add ts2 cmdline_opts='-s generic' ~(keystone_admin)]$ system host-ptp-instance-assign controller-0 ts2 ~(keystone_admin)]$ system ptp-interface-add ts2if1 ts2 ~(keystone_admin)]$ system ptp-interface-parameter-add ts2if1 ts2phc.channel=1 ts2phc.pin_index=1 ~(keystone_admin)]$ system host-if-ptp-assign controller-0 enp108s0f0 ts2if1 ~(keystone_admin)]$ system ptp-instance-add ptp02fh ptp4l ~(keystone_admin)]$ system ptp-instance-parameter-add ptp02fh domainNumber=24 dataset_comparison=G.8275.x ~(keystone_admin)]$ system ptp-instance-parameter-add ptp02fh logAnnounceInterval=-3 logSyncInterval=-4 logMinDelayReqInterval=-4 ~(keystone_admin)]$ system host-ptp-instance-assign controller-0 ptp02fh ~(keystone_admin)]$ system ptp-interface-add ptp02fhif1 ptp02fh ~(keystone_admin)]$ system host-if-ptp-assign controller-0 enp108s0f0 ptp02fhif1
Create the servoing backhaul and export it on SDP0.
~(keystone_admin)]$ system ptp-instance-add ptp01bh ptp4l ~(keystone_admin)]$ system ptp-instance-parameter-add ptp01bh domainNumber=24 tx_timestamp_timeout=700 clientOnly=1 ~(keystone_admin)]$ system ptp-instance-parameter-add ptp01bh free_running=0 servo_offset_threshold=10 servo_num_offset_values=5 gear=P ~(keystone_admin)]$ system ptp-instance-parameter-add ptp01bh logAnnounceInterval=-3 logSyncInterval=-4 logMinDelayReqInterval=-4 ~(keystone_admin)]$ system host-ptp-instance-assign controller-0 ptp01bh ~(keystone_admin)]$ system ptp-interface-add ptp01bhif1 ptp01bh ~(keystone_admin)]$ system host-if-ptp-assign controller-0 eno8403 ptp01bhif1 ~(keystone_admin)]$ system ptp-interface-parameter-add clock0if1 sdp0=output period_sdp0=1pps
Parameters to create servoing backhaul¶ Parameter
Why it matters here
clientOnly=1The backhaul instance only receives; it never becomes a grandmaster.
free_running=0The servo is enabled, so the backhaul can discipline the PHC when
dpll-mgrdrives it.servo_offset_threshold=10,servo_num_offset_values=5Servo lock criteria (nanoseconds / number of consecutive samples).
gear=PThe instance starts parked (monitor-only). From then on
dpll-mgrsets the gear.logAnnounceInterval=-3,logSyncInterval=-4,logMinDelayReqInterval=-4Fast message rates. Use the same values on the upstream grandmaster.
sdp0=output period_sdp0=1pps(onclock0if1)Exports the backhaul-disciplined PHC as a 1PPS on SDP0, which feeds the DPLL pin
SDP0_REF0N.Create and configure the dpll-mgr instance.
~(keystone_admin)]$ system ptp-instance-add dpll-mgr1 dpll-mgr ~(keystone_admin)]$ system ptp-instance-parameter-add dpll-mgr1 --section config phc_interface=eno8703 channel_ptp_bh=ptp01bh channel_ts2_0=ts1 channel_ts2_1=ts2 ~(keystone_admin)]$ system host-ptp-instance-assign controller-0 dpll-mgr1
--sectionis a flag; thename=valuepairs follow it. You supply only the site-specific values. The system fills in the rest (dpll-mgr Configuration Reference): the UDS sockets for the three channels, the PTP domain (taken fromptp01bh), the GNSS-primary pin priorities, and the holdover tiers (30 / 60 / 240 minutes).If the node has no E830, omit
channel_ts2_1.Apply the
ptp-instance.~(keystone_admin)]$ system ptp-instance-apply
ptp-instance-applyfirst validates thedpll-mgrconfiguration. If a required key is missing or a channel names an instance that does not exist on the host or has the wrong service type, the apply is rejected with a message naming the problem and nothing is pushed to the host (Top Issues in Detail, issue 1).Services start in dependency order:
ptp4landts2phcfirst, thendpll-mgrandphc2sys.dpll-mgrdoes not need the upstream grandmaster to start: without one,ptp01bhstays inLISTENING(Gearshift: PARK and DRIVE) anddpll-mgrkeeps checking for the grandmaster while GNSS remains the source.Verify the configuration.
Changes per Scenario¶
The step-by-step procedure above configures the reference deployment, which is scenario A. The other supported scenarios use the same instances and the same procedure. Each one differs only in the settings listed below:
Scenario A: GNSS primary, L2 PTP backhaul secondary. This is the reference configuration, and it needs no changes.
Scenario B: GNSS primary, PTS (G.8275.2 unicast) backhaul secondary. Only the backhaul instance changes.
Scenario C: PTP backhaul primary, GNSS secondary. Only the
dpll-mgrpin priority changes.
Scenario A: GNSS Primary, L2 PTP Backhaul Secondary¶
This is the configuration in Step-by-Step Procedure (Reference Configuration). No pin-priority keys are needed: the shipped defaults are GNSS-primary.
Scenario B: GNSS Primary, PTS (G.8275.2 Unicast) Backhaul Secondary¶
Everything is the same as scenario A except the backhaul instance (step to create the servoing backhaul and export it on SDP0 above), which receives PTP over UDPv6 unicast from a configured grandmaster using a unicast master table (see Configure PTP Partial Timing Support). In this example the backhaul uses domain 44:
~(keystone_admin)]$ system ptp-instance-add ptp01bh ptp4l
~(keystone_admin)]$ system ptp-instance-parameter-add ptp01bh --section global domainNumber=44 tx_timestamp_timeout=700 clientOnly=1 fault_reset_interval=-2 logAnnounceInterval=-3 logMinDelayReqInterval=-4 logSyncInterval=-4 network_transport=UDPv6
~(keystone_admin)]$ system ptp-instance-parameter-add ptp01bh --section global free_running=0 servo_offset_threshold=10 servo_num_offset_values=5 gear=P
~(keystone_admin)]$ system ptp-instance-parameter-add ptp01bh --section unicast_master_table_1 table_id=1 logQueryInterval=1 UDPv6=<grandmaster-address>
~(keystone_admin)]$ system host-ptp-instance-assign controller-0 ptp01bh
~(keystone_admin)]$ system ptp-interface-add ptp01bhif1 ptp01bh
~(keystone_admin)]$ system ptp-interface-parameter-add ptp01bhif1 unicast_master_table=1
~(keystone_admin)]$ system ptp-interface-parameter-add ptp01bhif1 inhibit_announce=1
~(keystone_admin)]$ system host-if-ptp-assign controller-0 eno8403 ptp01bhif1
~(keystone_admin)]$ system ptp-interface-parameter-add clock0if1 sdp0=output period_sdp0=1pps
The dpll-mgr configuration does not change: the PTP domain is derived
from the backhaul instance (44 here), so ptp_domain_number is not set.
Scenario C: PTP Backhaul Primary, GNSS Secondary¶
The instances are identical to scenario A. Add one key to the dpll-mgr
configuration so the backhaul pin outranks GNSS on the phase plane see
Two DPLL Planes: Frequency and Phase.
~(keystone_admin)]$ system ptp-instance-add dpll-mgr1 dpll-mgr
~(keystone_admin)]$ system ptp-instance-parameter-add dpll-mgr1 --section config phc_interface=eno8703 channel_ptp_bh=ptp01bh channel_ts2_0=ts1 channel_ts2_1=ts2 dpll1_pin_priority_map="GNSS_REF4P:12, SDP0_REF0N:0"
~(keystone_admin)]$ system host-ptp-instance-assign controller-0 dpll-mgr1
~(keystone_admin)]$ system ptp-instance-apply
Leave dpll0_pin_priority_map at its default: the frequency plane stays on
GNSS in both scenarios.
To switch a running system between the two scenarios, change only this key:
# A -> C: make the backhaul primary
~(keystone_admin)]$ system ptp-instance-parameter-add dpll-mgr1 --section config dpll1_pin_priority_map="GNSS_REF4P:12, SDP0_REF0N:0"
~(keystone_admin)]$ system ptp-instance-apply
# C -> A: remove the override (reverts to GNSS_REF4P:0, SDP0_REF0N:12)
~(keystone_admin)]$ system ptp-instance-parameter-delete dpll-mgr1 --section config dpll1_pin_priority_map="GNSS_REF4P:12, SDP0_REF0N:0"
~(keystone_admin)]$ system ptp-instance-apply
The apply restarts the PTP services, including dpll-mgr, which reprograms
both DPLL devices. A brief HOLDOVER_0 during the re-selection is normal.
dpll-mgr Configuration Reference¶
Command Surface¶
Command |
Purpose |
|---|---|
|
Add or replace configuration keys. Re-adding a key replaces its previous value. |
|
Remove a key (by value or by parameter UUID). A key that has a default reverts to it on the next apply. |
|
Lists the keys you set. |
|
Validates, renders and pushes the configuration, then restarts the PTP services. |
The rendered file on the host is
/etc/linuxptp/ptpinstance/dpll-mgr-<instance>.json.
dpll-mgr Configuration Keys¶
Key |
Required |
Meaning |
|---|---|---|
|
Yes |
The E825 base port whose PHC the DPLL disciplines. Cannot be derived. |
|
Yes |
Name of the backhaul |
|
Yes |
Name of the GNSS |
|
No |
Name of the second |
|
No |
Normally derived from the backhaul instance’s |
|
No |
Frequency-plane priorities. Default |
|
No |
Phase-plane priorities (decides the master). Default
|
|
No |
Holdover tier dwell times in minutes. Defaults 30 / 60 / 240. They only affect when the holdover alarm escalates (Holdover and Alarm Escalation). |
Note
The keys that are not listed here are rejected.
Pin Names¶
A priority map is a comma-separated list of PIN:priority entries, for
example "GNSS_REF4P:0, SDP0_REF0N:12". Priorities run from 0 (best) to
14; 15 disconnects the pin. A pin name that the system does not
recognize is rejected when you add it, so a typo is caught immediately. This
release supports the pins in the table below. You can use the short alias; the
stored configuration always contains the canonical name.
Pin |
Alias |
Role |
|---|---|---|
|
|
GNSS 1PPS (primary GNSS input) |
|
|
PTP backhaul via SDP0 |
|
|
PTP via SDP2 |
Verify the Configuration¶
# Instances and the host assignment
~(keystone_admin)]$ system ptp-instance-list
~(keystone_admin)]$ system host-ptp-instance-list controller-0
# What you set
~(keystone_admin)]$ system ptp-instance-show dpll-mgr1
# On the host
systemctl status dpll-mgr@dpll-mgr1
cat /var/run/dpll_mgr/status.json
A healthy scenario A node shows:
Check |
Expected |
|---|---|
|
|
|
|
|
|
|
|
|
|
Upstream grandmaster clockClass (parent data set of |
6, |
Fronthaul clockClass |
6 |
Alarms |
No timing alarms (ID 100.119) in |
A healthy scenario C node shows current_master: SDP0_REF0N, gearshift
ptp_bh: DRIVE, ts2_0: PARK, ts2_1: DRIVE, ptp01bh port state
SLAVE, and the GNSS pin selectable (a healthy standby).
Normal Operating Values¶
Use these values to tell a healthy node from one that needs attention. The values on your system depend on your environment and network, so use them as a guide to what to expect, not as guarantees.
Note
Values in the tables are results measured in lab testing.
Measurement |
Where to read it |
Normal value |
|---|---|---|
Backhaul servo offset |
|
Within 100 ns; about 0 to a few ns once locked |
Upstream grandmaster present |
|
|
Failover from GNSS to the backhaul |
|
About 12 s (with a brief |
Return from the backhaul to GNSS |
|
About 12 s |
Lock to the backhaul after it is restored |
|
About 19 s |
Entering holdover when both sources are lost |
|
About 1 s |
|
|
Under 1 ms |
Dead GNSS |
|
About 10 s |
Dead backhaul |
|
About 1 minute (up to 75 s) |
Alarms and notifications after a transition |
|
Up to 30 to 90 s after the DPLL changes |
|
|
About 0.03 % of a CPU core and 14 MB of memory |
Looks alarming but is normal:
ptp01bhinUNCALIBRATEDwhile GNSS is the active source (the instance is parked).A brief
HOLDOVER_0while the DPLL re-locks during a failover.dpll_lock_statusoflocked_ho_acq(this is a healthy lock).SDP0_REF0Nshown asdisconnectedon the frequency (eec) side ofstatus.json(Two DPLL Planes: Frequency and Phase).A GNSS signal loss alarm while the node runs on the backhaul.
clockClass 135, 165, 7 or 140 on the fronthaul during holdover (clockClass on the Fronthaul).
Check the troubleshooting chapter when:
master_offsetstays above 100 ns (Top Issues in Detail, issue 4 and issue 5).master_offsetis in the hundreds of microseconds or more after a longts2phcoutage (restartts2phc, Top Issues in Detail, issue 3).The node stays in holdover after a source is back (Top Issues in Detail, issue 3 and issue 4).
An alarm stays raised for longer than about 90 seconds after the DPLL is locked (Other Symptoms).
Monitor and Operate Hybrid Timing shows how to read these values.
Modify or Remove the Configuration¶
Change a key by adding it again; it replaces the old value. For example, to
put the second channel under a different ts2phc instance (ts3 must
already exist and be assigned to this host):
~(keystone_admin)]$ system ptp-instance-parameter-add dpll-mgr1 --section config channel_ts2_1=ts3
~(keystone_admin)]$ system ptp-instance-apply
To change it back, add the original value in the same way:
~(keystone_admin)]$ system ptp-instance-parameter-add dpll-mgr1 --section config channel_ts2_1=ts2
~(keystone_admin)]$ system ptp-instance-apply
An optional key can also be removed with
system ptp-instance-parameter-delete
(dpll-mgr Configuration Reference);
a key that has a default returns to it.
Remove hybrid timing by unassigning and deleting the instances. See Remove PTP Configurations.