Precision Time Protocol is used to synchronize clocks throughout the network. On a local area network, it achieves clock accuracy in the sub-microsecond range, making it suitable for measurement and control systems. RouterOS supports IEEE 1588-2008, PTPv2. Support is hardware dependant, please see the supported device list below.
Supported features:
Sub-menu: /system ptp
Property | Description |
---|---|
port | Sub-menu used for adding, removing, or viewing assigned ports |
status | Sub-menu that shows PTP ports, their state, and delay on slave ports |
comment (string; Default: ) | Short description of the PTP profile |
name (string; Default: ) | Name of the PTP profile |
delay-mode (auto | e2e | ptp; Default: auto) | Configures delay mode for PTP profile
|
priority1 (integer [0..255]; auto; Default: auto) | the priority value for influencing grandmaster election |
profile (802.1as; default; g8275.1; Default: default) | IEEE 1588-2008 includes a profile concept defining PTP operating parameters and options. IEEE 802.1AS is an adaptation of PTP for use with Audio Video Bridging and Time-Sensitive Networking. Uses delay-mode=p2p, transport-mode=l2; recommends using priority1=auto. g8275.1 profile is for frequency and phase synchronization in a fully PTP-aware network. Only allows priority1=auto (128), priority2=128, domain=24, delay-mode=e2e, transport=l2. default profile, PTPv2 default configuration, allows for more configuration options than other profiles, but default values with auto settings correspond to: priority1=128. priority2=128, domain=0,transport=ipv4, delay-mode=e2e |
transport (auto; ipv4; l2; Default: auto) | transport protocol to be used: IPv4 or layer2 |
For more details regarding Precision Time Protocol please see the following standards IEEE 1588 and IEEE 802.1as. |
We strongly recommend keeping default/auto values, as there are different requirements between profiles. And assigning them manually can result in misconfiguration. |
To configure the device to participate in PTP you first need to create a PTP profile:
/system ptp add name=ptp1 #to view the created profile use /system ptp print Flags: I - inactive, X - disabled 0 name="ptp1" priority1=auto delay-mode=auto transport=auto profile=default |
Only 1 PTP profile is supported per device |
After creating a PTP profile, you need to assign ports to it:
/system ptp port add interface=ether1 ptp=ptp1 #to view assigned ports use /system ptp port print Flags: I - inactive 0 ptp=ptp1 interface=ether8 1 ptp=ptp1 interface=ether22 |
To monitor the PTP profile, use the monitor command:
#on grandmaster device [admin@grandmaster] > system ptp monitor numbers=0 name: test clock-id: 64:D1:54:FF:FE:EB:AE:C3 priority1: 30 priority2: 128 i-am-gm: yes #on non-grandmaster device [admin@328] /system ptp monitor 0 name: ptp1 clock-id: 64:D1:54:FF:FE:EB:AD:C7 priority1: 128 priority2: 128 i-am-gm: no gm-clock-id: 64:D1:54:FF:FE:EB:AE:C3 gm-priority1: 30 gm-priority2: 128 master-clock-id: 64:D1:54:FF:FE:EB:AE:C3 slave-port: ether8 freq-drift: 2147483647 ppb offset: 1396202830 ns hw-offset: 1306201921 ns slave-port-delay: 2075668440 ns |
Property | Description |
---|---|
clock-id: | local clock ID |
priority1: | priority1 value, depending on the PTP profile selected, an adjustable value used to influence the grandmaster election. |
priority2: | priority2 value, non-adjustable in RouterOS |
i-am-gm: yes | no | shows if the device is a grandmaster clock |
gm-clock-id: | grandmaster clock ID - Within a domain, a clock that is the ultimate source of time for clock synchronization using the protocol. |
gm-priority1: | grandmaster priority1 |
gm-priority2: | grandmaster priority2 |
master-clock-id: | master clock ID - In the context of a single Precision Time Protocol (PTP) communication path, a clock that is the source of time to which all other clocks on that path synchronize. |
slave-port: | shows which port is going towards the master or grandmaster clock |
freq-drift: | frequency drift in PPB (parts per billion) - time that would be lost every second in relation to the master clock, IF there was no synchronization. |
offset: | difference between clock values |
hw-offset: | offset difference from the hardware clock |
slave-port-delay: | the time it takes for a packet to be delivered to a directly connected device |
Note: devices not included in the list below, does not support Precision Time Protocol
Supported on: