PTP settings EcoRouter Documentation / PTP settings
Precision Time Protocol
PTP (Precision Time Protocol) is the protocol used for clock synchronization in the network. In local networks it provides synchronization accuracy of tens nanoseconds (by comparision to the NTP which provides synchronization accuracy of milliseconds). Such accuracy level neded for some measuring and management systems. The two version of the protocol exist. The EcoRouter supports only the PTPv2. The PTP operates on a master-slave basis, i.e. in one synchronization scheme there must be a source (master) and a synchronization receiver (slave). Devices that are not a synchronization source or receiver may participate in the synchronization propagation scheme as intermediate devices, if the correction field is filled in the corresponding PTP packets.
There are the following device types of devices involved into the PTPv2 synchronization propagation scheme:
- ordinary clock (device has only one role in the scheme - master or slave);
- boundary clock (device has two roles in the scheme - master and slave. For example, the device as a slave receives synchronization from one network segment and transmit as a master to another one network segment);
- transparent clock (device which participates in the synchronization scheme as intermediate node between the master and the slave and fills the correction field in the corresponding PTP packets).
The following PTPv2 operating modes exist:
- E2E (end-to-end - the correction takes into account only the delay time on the intermediate devices);
- P2P (peer-to-peer - the correction takes into account both the delay time on the intermediate devices and the signal propagation time between the intermediate devices).
The following PTPv2 operating levels exist:
- L2 (IEEE 802.3 Ethernet using the following multicast address: 01-1B-19-00-00-00, 01-80-C2-00-00-0E);
- L3 (IPv4/IPv6 using the following multicast address: 224.0.1.129/FF0x::181, 224.0.0.107/FF02::6B).
The current EcoRouter realization supports the L2/L3 E2E transparent/boundary clock operating modes.
Before configuring, you must enable PTP support on the device. To do this, perform the following steps:
1. Run the enable ptp command in configuration mode.
2. Save the configuration.
3. Reboot the device.
ecorouter(config)#enable ptp
Changes will be applied after reboot. Please save config and reload.
ecorouter(config)#enable ptp
Changes will be applied after reboot. Please save config and reload.
ecorouter(config)#ptp mode transparent-e2e udp
% PTP is not enabled yet: reload required. Please save config and reload.
ecorouter(config)#write
Building configuration...
ecorouter(config)#exit
ecorouter#reload
reboot system? (y/n): y
...reboot...
ecorouter login: admin
Password:
User Access Verification
EcoBNGOS version 3.2.5 EcoRouter 07/02/19 13:48:51
ecorouter>show running-config
...
hw mgmt ip 192.168.255.1/24
!
enable ptp
!
ip vrf management
...
ecorouter>enable
ecorouter#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
ecorouter(config)#enable ptp
PTP has already been enabled.
The configuration mode (config) command for PTPv2 configuring on the router looks as following:
ptp mode {transparent|boundary} {e2e|p2p} {ethernet|udp}
The command parameters are shown in the table below.
Parameter | Description |
---|---|
transparent|boundary | Clock type. transparent - transparent clock; boundary - boundary clock |
e2e|p2p | PTPv2 mode. e2e – End-to-End mode; p2p – Peer-to-Peer mode |
ethernet|udp | Message mode. ethernet – L2 mode; udp – L3 mode |
Note: mode of operation udp will be available for configuration only after specifying the IP-address for sending service messages. Configuration mode command (config) to configure the ip-address for sending service messages has the form:
ptp source <A.B.C.D>
The context configuration mode (config-port) command for enabling PTPv2 on the specific port looks as following:
ptp {transparent|slave|master}
As a result of the command execution PTPv2 will be enabled on the specific port in the transparent, slave or master mode or the grandmaster selection algorithm will be included - bmca (Best Master Clock Algorithm), which will automatically determine mode of operation of the port (master or slave).
The transparent port mode is available only if the router configured as transparent.
The slave and master port modes are available only if the router configured as boundary.
When turn on bmca with default settings parameter values priority1 and priority2 are equal 128. The priority values for filling in the corresponding fields in the announcements can be changed using the configuration mode command (config):
ptp announcment priority <0-255> <0-255>
The Show Commands
Команда и результат ее выполнения | Комментарий |
---|---|
show ptp status | Display the current PTP status |
Device type: boundary Delay measurement mechanism: end-to-end Mode: udp Clock ID: 1c8776fffe4005a1 Ports: ge3: slave | Clock type Delay measurement mode Message mode Clock ID Ports used for PTP and its modes |
show ptp boundary-clock | Display PTP detailed information (only for boundary type) |
ge3: State: slave Assigned by: static Grandmaster ID: 1c8776fffe4005a1 Priority: N/A Offset: 456 ns Path Delay: 783 ns | Port whose information is displayed Port state Way of port state specifying (static/bmc) Grandmaster clock ID Clock priority. Used for BMC (for static way of port state specifying is N/A) Last value of evaluated message transmission delay in nanoseconds |