PTP over VLAN: SecureSync and VersaSync
Technical & Application Notes
1. Introduction
The Safran Navigation & Timing PTP implementation on SecureSync 2400 and VersaSync allows using the protocol on VLANs, with some limitations. If the Web UI of your software version doesn’t allow for configuring PTP on VLANs, it is possible to use the Command Line Interface (CLI) to do so.
In the release notes, there is a Known Issue listed for SecureSync 1.6.0 and VersaSync 1.8.0 that PTP over VLAN is not currently functional. Technically, PTP over VLAN is functional, but the configuration and maintenance through the Web UI is not supported or tested. The following method will provide a workaround to this limitation. 8 November 2023
2. Setup
2.1. Prerequisites
- SecureSync 2400 version 1.6.0 or higher, or VersaSync version 1.8.0 or higher.
- Via the Web UI, create a VLAN and configure it so that it displays a CONNECTED status.
- Disable PTP on Eth0 and Eth1 so that there is no conflict.
2.2. Enable/Disable PTP
In the CLI, type the following command:
Ptpifaceset <VLAN> on|off
(For instance, if PTP is to be enabled for eth0.0, then it should be ptpifaceset eth0.0 on)
2.3. Configure
To edit the configuration, the corresponding file will have to be copied from /etc/ptp to home/spectracom, then edited and set using the ptpifacesetcfg cli command, as follows:
spadmin@securesync:~$ cp /etc/ptp/ptp4l-<VLAN>.conf ptp.conf
spadmin@securesync:~$ vi ptp.conf
spadmin@securesync:~$ ptpifacesetcfg <VLAN> ptp.conf
The following table displays the default configurations for each profile:
Default Profile
Master
# profile Default
[global]
clock_servo linreg
hwts_filter full
step_threshold 0.5
tx_timestamp_timeout 100
masterOnly 1
Slave
# profile Default
[global]
clock_servo linreg
hwts_filter full
slaveOnly 1
step_threshold 0.5
tx_timestamp_timeout 100
Telecom G.8265.1
Master
# profile G.8265.1
[global]
clock_servo linreg
domainNumber 4
hwts_filter full
step_threshold 0.5
tx_timestamp_timeout 100
announceReceiptTimeout 2
hybrid_e2e 1
inhibit_multicast_service 1
masterOnly 1
unicast_listen 1
unicast_req_duration 300
Slave
# profile G.8265.1
[global]
clock_servo linreg
domainNumber 4
hwts_filter full
slaveOnly 1
step_threshold 0.5
tx_timestamp_timeout 100
hybrid_e2e 1
inhibit_multicast_service 1
logAnnounceInterval 1
unicast_listen 1
unicast_master_table 1
unicast_req_duration 300
[unicast_master_table]
table_id 1
peer_address <MASTER_IPV4>
UDPv4 <MASTER_IPV4>
Power Utility 61850-9-3
Master
# profile 61850-9-3
[global]
clock_servo linreg
hwts_filter full
step_threshold 0.5
tx_timestamp_timeout 100
delay_mechanism P2P
logAnnounceInterval 0
masterOnly 1
network_transport L2
Slave
# profile 61850-9-3
[global]
clock_servo linreg
hwts_filter full
priority1 255
priority2 255
slaveOnly 1
step_threshold 0.5
tx_timestamp_timeout 100
delay_mechanism P2P
logAnnounceInterval 0
network_transport L2
Power System C37.238
Master
# profile C37.238
[global]
alt_ts_displayname <TS_NAME>
clock_servo linreg
domainNumber 254
hwts_filter full
step_threshold 0.5
tx_timestamp_timeout 100
alt_time_offset_indicator 1
delay_mechanism P2P
logAnnounceInterval 0
masterOnly 1
network_transport L2
total_time_inaccuracy_enabled 1
Slave
# profile C37.238
[global]
clock_servo linreg
domainNumber 254
hwts_filter full
priority1 255
priority2 255
slaveOnly 1
step_threshold 0.5
tx_timestamp_timeout 100
alt_time_offset_indicator 1
delay_mechanism P2P
inhibit_multicast_service 0
logAnnounceInterval 0
network_transport L2
total_time_inaccuracy_enabled 1
Note: To follow our implementation, some parameters should always be set as indicated below:
[global]
clock_servo linreg
step_threshold 0.5
hwts_filter full
tx_timestamp_timeout 100
Please refer to the ptp4l man page for all available configuration items.
2.4. Slave configuration
For the Slave configuration, the validity of the reference needs to be manually set using the following CLI command:
MR_SetValidity 0 <0 (VLAN on eth0) | 1 (VLAN on eth1)> <0 (INVALID) | 1 (VALID)> 1
For example, setting the Eth0 VLAN reference as valid would appear as follows:
MR_SetValidity 0 0 1 1
3. Checking Status
You can verify that the system has been properly configured by checking the ori journal for basic information, and use the linuxptp pmc command for more advanced data.
3.1. Ori Journal
Ori journal provides information about the current mode, port state, and master (when configured as a slave). To access, run the following command:
journalctl -u ori
Here is example output if you enable PTP on Eth0 in Slave Only mode:
Apr 13 12:56:13 versasync-0c0381 ori[29954]: Request to enable eth0
Apr 13 12:56:13 versasync-0c0381 ori[29954]: [eth0] Starting...
Apr 13 12:56:13 versasync-0c0381 ori[29954]: [eth0] eth0 is in Slave Only mode
Apr 13 12:56:13 versasync-0c0381 ori[29954]: [eth0] All ports connected
Apr 13 12:56:13 versasync-0c0381 ori[29954]: [eth0] Starting ptp4l
Apr 13 12:56:14 versasync-0c0381 ori[29954]: [eth0] Started port state change routine
Apr 13 12:56:14 versasync-0c0381 ori[29954]: [eth0] Starting update routine
Apr 13 12:56:15 versasync-0c0381 ori[29954]: [eth0] eth0 is now LISTENING
Apr 13 12:56:19 versasync-0c0381 ori[29954]: [eth0] eth0 is now UNCALIBRATED
Apr 13 12:56:24 versasync-0c0381 ori[29954]: [eth0] eth0 is now SLAVE
Apr 13 12:56:25 versasync-0c0381 ori[29954]: [eth0] New master: c03eba.fffe.62e7b9
And here is example output if you enable PTP on Eth0 in Master Only mode:
Apr 13 12:56:13 versasync-0c0381 ori[29954]: Request to enable eth0
Apr 13 12:56:13 versasync-0c0381 ori[29954]: [eth0] Starting...
Apr 13 12:56:13 versasync-0c0381 ori[29954]: [eth0] eth0 is in Slave Only mode
Apr 13 12:56:13 versasync-0c0381 ori[29954]: [eth0] All ports connected
Apr 13 12:56:13 versasync-0c0381 ori[29954]: [eth0] Starting ptp4l
Apr 13 12:56:14 versasync-0c0381 ori[29954]: [eth0] Started port state change routine
Apr 13 12:56:14 versasync-0c0381 ori[29954]: [eth0] Starting update routine
Apr 13 12:56:15 versasync-0c0381 ori[29954]: [eth0] eth0 is now LISTENING
Apr 13 12:56:19 versasync-0c0381 ori[29954]: [eth0] eth0 is now UNCALIBRATED
Apr 13 12:56:24 versasync-0c0381 ori[29954]: [eth0] eth0 is now SLAVE
Apr 13 12:56:25 versasync-0c0381 ori[29954]: [eth0] New master: c03eba.fffe.62e7b9
3.2. PMC Commands
In order to use PTP pmc commands to monitor your PTP functionality, you must be on at least SecureSync software version 1.8.0 or VersaSync 1.10.0.
PTP pmc commands are in the following form:
sudo pmc -b 0 -us /var/run/ptp4l-<VLAN> "get <ITEM>"
To access the current port state, you can use the following command:
sudo pmc -b 0 -us /var/run/ptp4l-<VLAN> “get port_data_set"
Here is an example output on a Master configuration:
spadmin@versasync-0c0381:~$ sudo pmc -b 0 -us /var/run/ptp4l-eth0 "get port_data_set"
sending: GET PORT_DATA_SET
000cec.fffe.0e00fc-1 seq 0 RESPONSE MANAGEMENT PORT_DATA_SET
portIdentity 000cec.fffe.0e00fc-1
portState MASTER
logMinDelayReqInterval 0
peerMeanPathDelay 0
logAnnounceInterval 1
announceReceiptTimeout 3
logSyncInterval 0
delayMechanism 1
logMinPdelayReqInterval 0
versionNumber 2
To obtain the current clock class and accuracy, use the following command:
sudo pmc -b 0 -us /var/run/ptp4l-<VLAN> "get grandmaster_settings_np "
Here is an example of the current clock class and accuracy on a Master configuration:
spadmin@versasync-0c0381:~$ sudo pmc -b 0 -us /var/run/ptp4l-eth0 "get grandmaster_settings_np"
sending: GET GRANDMASTER_SETTINGS_NP
000cec.fffe.0e00fc-0 seq 0 RESPONSE MANAGEMENT GRANDMASTER_SETTINGS_NP
clockClass 6
clockAccuracy 0x21
offsetScaledLogVariance 0x58e0
currentUtcOffset 37
leap61 0
leap59 0
currentUtcOffsetValid 1
ptpTimescale 1
timeTraceable 1
frequencyTraceable 1
timeSource 0x20
To see the current grandmaster information, use the following command:
sudo pmc -b 0 -us /var/run/ptp4l-<VLAN> "get parent_data_set"
Here is an example of the grandmaster pmc information:
spadmin@versasync-0c0381:~$ sudo pmc -b 0 -us /var/run/ptp4l-eth0 "get parent_data_set"
sending: GET PARENT_DATA_SET
000cec.fffe.0e00fc-0 seq 0 RESPONSE MANAGEMENT PARENT_DATA_SET
parentPortIdentity c03eba.fffe.62e7b9-1
parentStats 0
observedParentOffsetScaledLogVariance 0xffff
observedParentClockPhaseChangeRate 0x7fffffff
grandmasterPriority1 128
gm.ClockClass 248
gm.ClockAccuracy 0xfe
gm.OffsetScaledLogVariance 0xffff
grandmasterPriority2 128
grandmasterIdentity c03eba.fffe.62e7b9
The current offset from master is found using the following command:
sudo pmc -b 0 -us /var/run/ptp4l-<VLAN> "get current_data_set"
Example current offset to master:
spadmin@versasync-0c0381:~$ sudo pmc -b 0 -us /var/run/ptp4l-eth0 "get current_data_set"
sending: GET CURRENT_DATA_SET
000cec.fffe.0e00fc-0 seq 0 RESPONSE MANAGEMENT CURRENT_DATA_SET
stepsRemoved 1
offsetFromMaster -21.0
meanPathDelay 19985.0
4. Limitations & Notes
- As a physical network interface has only one physical clock, at most one PTP slave instance can run on Eth0 (the same is also true of Eth1). So hundreds of VLAN instances on one Ethernet interface will not multiply the amount of potential slaves.
- For the Slave configuration, the validity of the reference needs to be manually set (see “Slave Configuration” in the Setup section).
- With our current implementation, a “true” boundary clock mode (one ptp4l instance for both ports) is not supported; therefore, the total time inaccuracy required for Power Profile C37.238 cannot be passed along.