PTPv2 (slave mode)
Precision time protocol (PTP) is used to synchronize network clocks. It is best suited to situations where time accuracy is of the utmost importance, as it supports accuracy in the sub‑microsecond range. Conversely, NTP accuracy is in the range of milliseconds or tens of milliseconds.
The following CLI commands are available:
config system ptp set status {enable | disable} set mode {multicast | hybrid} set delay-mechanism {E2E | P2P} set request-interval <integer> set interface <interface> end
Command |
Description |
---|---|
status {enable | disable} |
Enable or disable the FortiGate system time by synchronizing with a PTP server (default = disable). |
mode {multicast | hybrid} |
Use multicast or hybrid transmission (default = multicast). |
delay-mechanism {E2E | P2P} |
Use end-to-end (E2E) or peer-to-peer (P2P) delay detection (default = E2E). |
request-interval <integer> |
The logarithmic mean interval between the delay request messages sent by the client to the server in seconds (default = 1). |
interface <interface> |
The interface that the PTP client will reply through. |
Sample configuration
This example uses the following topology:
To configure a FortiGate to act as a PTP client that synchronizes itself with a Linux PTP server:
- Enable debug messages:
diagnose debug application ptpd -1
This command will provide details to debug the PTP communication with the server.
- Check the system date:
execute date
current date is: 2019-01-01
- Configure PTP in global mode:
config system ptp
set status enable
set interface wan2
end
The following debug message appears:
(global) # [notice]PTPDv2 started successfully on wan2 using "slaveonly" preset (PID 5958)
[info]TimingService.PTP0: PTP service init
[info]Observed_drift loaded from kernel: 0 ppb
[notice]Now in state: PTP_LISTENING
[warning]TimingService: No TimingService available for clock sync
[info]New best master selected: 000c29fffe236b0c(unknown)/1
[notice]Now in state: PTP_SLAVE, Best master: 000c29fffe236b0c(unknown)/1 (IPv4:172.16.200.55)
[notice]Received first Sync from Master
[critical]Offset above 1 second. Clock will step.
[warning]Change time from Tue Jan 1 00:00:28 2019 to Mon Jan 14 15:11:10 2019.[notice]Now in state: PTP_LISTENING
[info]New best master selected: 000c29fffe236b0c(unknown)/1
[notice]Now in state: PTP_SLAVE, Best master: 000c29fffe236b0c(unknown)/1 (IPv4:172.16.200.55)
[notice]Received first Sync from Master
[info]TimingService.PTP0: now available
[notice]Received first Delay Response from Master
[notice]Received new Delay Request interval 0 from Master (was: 1)
[notice]TimingService.PTP0: elected best TimingService
[info]TimingService.PTP0: acquired clock control
- Check the system date again after synchronization with the PTP server:
execute date
current date is: 2019-01-14