Global Time PTPv2
FMADIO capture systems support PTPv2 using the linux PTP open source project. ( http://linuxptp.sourceforge.net/ ) running only on the 10G management interface. 1G links are supported using 1G RJ45 SFP transceiver.
Step 1) Configure timming to use PTPv2
Enabling PTPv2 via GUI is as follows
.png?sv=2022-11-02&spr=https&st=2026-03-27T02%3A50%3A46Z&se=2026-03-27T03%3A19%3A46Z&sr=c&sp=r&sig=wnkuJ7zaxQNf5uYX9HRsVzXvH2E9rva7%2Fj2%2B4NCpIpI%3D)
Step 2) Use baremetal NIC on the PTPv2 interface
In addition the 10G Bridged networking config must be disabled. As LinuxPTP must run directly on the bare metal NIC to accurately hardware timestamp the incoming packets.
Please edit the file
/opt/fmadio/etc/60-persistent-ethernet.rules
Change the "phy10" values as shown below to "man10"
.png?sv=2022-11-02&spr=https&st=2026-03-27T02%3A50%3A46Z&se=2026-03-27T03%3A19%3A46Z&sr=c&sp=r&sig=wnkuJ7zaxQNf5uYX9HRsVzXvH2E9rva7%2Fj2%2B4NCpIpI%3D)
Before Bare Metal NIC
Changed to "man10" as follows
.png?sv=2022-11-02&spr=https&st=2026-03-27T02%3A50%3A46Z&se=2026-03-27T03%3A19%3A46Z&sr=c&sp=r&sig=wnkuJ7zaxQNf5uYX9HRsVzXvH2E9rva7%2Fj2%2B4NCpIpI%3D)
Enable Bare metal 10G interface
Step 3) Reboot
System must be rebooted for the above to take effect.
PTPv2 VLAN Interface
In some environments PTPv2 is run on its own dedicated VLAN interface.
Step 1) Set the VLAN
To enable this update the configuration file
/opt/fmadio/etc/time.lua
Specifically setting the VLANID as follows, in the below example its set to VLANID "123"
["PTP"] =
{
["Master0"] = "",
["Master1"] = "",
["Master2"] = "",
["Master3"] = "",
["UpdateRate"] = "",
["VLANID"] = "123",
["Interface"] = "man10",
},After editing save and confirm the file syntax is correct, ensure there are no syntax or parse errors. The correct output is shown below.
fmadio@fmadio20n40v3-364:~$ fmadiolua /opt/fmadio/etc/time.lua
fmad fmadlua Aug 10 2021
failed to open self? [fmadiolua]
loading filename [/opt/fmadio/etc/time.lua]
done 0.000051Sec 0.000001Min
fmadio@fmadio20n40v3-364:~$Step 2) Reboot or restart linuxptp daemon
Either reboot the system, or kill all ptp processes (e.g. sudo killall ptp4l; sudo killall phc2sys)
Step 3) Confirm network interface is created
On reboot a man10.123 VLAN interface that matches the set VLANID should be populated as follows
fmadio@fmadio20n40v3-364:~$ ifconfig man10.123
man10.123 Link encap:Ethernet HWaddr 18:C0:4D:17:7A:4E
BROADCAST MULTICAST MTU:9200 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
fmadio@fmadio20n40v3-364:~$
Step 4) Confirm linux4ptp daemons are binded
And the linux ptp daemon should have binded to the newly created instance as follows
fmadio@fmadio20n40v3-364:~$ ps aux |grep ptp4l
64727 root /opt/fmadio/bin/ptp4l -4 -H -i man10.123 -m -s
fmadio@fmadio20n40v3-364:~$And the PHC interface also
fmadio@fmadio20n40v3-364:~$ ps aux |grep phc2sys
64729 root /opt/fmadio/bin/phc2sys -s man10.123 -c CLOCK_REALTIME -w -m -P 0.7 -I 0.3
fmadio@fmadio20n40v3-364:~$
PTPv2 on Second 10G Port
The above config assumes PTPv2 is running on the primary 10G management port. There is not requirement for using the primary port, instead the 2nd 10G management port can also be used. Below are the differences required
Step 1) n the udev rules phy10 -> phy11 -> man11
Use phy11 interface
.png?sv=2022-11-02&spr=https&st=2026-03-27T02%3A50%3A46Z&se=2026-03-27T03%3A19%3A46Z&sr=c&sp=r&sig=wnkuJ7zaxQNf5uYX9HRsVzXvH2E9rva7%2Fj2%2B4NCpIpI%3D)
Default setting
Rename to man11
.png?sv=2022-11-02&spr=https&st=2026-03-27T02%3A50%3A46Z&se=2026-03-27T03%3A19%3A46Z&sr=c&sp=r&sig=wnkuJ7zaxQNf5uYX9HRsVzXvH2E9rva7%2Fj2%2B4NCpIpI%3D)
Use baremetal 10G interface
Step 2) Set the IP address of man11
man11 needs to be configured with an IP address, either editing network config file directly
/opt/fmadio/etc/network.lua
or using the fmadiocli command line utility
Step 3) Specify man11 in the ptp config per below
["PTP"] =
{
["Master0"] = "",
["Master1"] = "",
["Master2"] = "",
["Master3"] = "",
["UpdateRate"] = "",
["VLANID"] = nil,
["Interface"] = "man11",
},Step 4) Finished
PTP on the Second 1G RJ45 Port
PTPv2 can be run on the 2nd 1G management interface, as it supports both a PHC clock and IEE1588 hardware timestamping.
NOTE: PTPv2 can not be run on the primary/first 1G interface as this is a software bridged interface and does not support hardware timestamping.
Step 1) Configure the udev rules as follows
/opt/fmadio/etc/60-persistent-ethernet.rules
Set the phy1 interface renamed to man1 as shown below
.png?sv=2022-11-02&spr=https&st=2026-03-27T02%3A50%3A46Z&se=2026-03-27T03%3A19%3A46Z&sr=c&sp=r&sig=wnkuJ7zaxQNf5uYX9HRsVzXvH2E9rva7%2Fj2%2B4NCpIpI%3D)
After update looks like below
.png?sv=2022-11-02&spr=https&st=2026-03-27T02%3A50%3A46Z&se=2026-03-27T03%3A19%3A46Z&sr=c&sp=r&sig=wnkuJ7zaxQNf5uYX9HRsVzXvH2E9rva7%2Fj2%2B4NCpIpI%3D)
Step 2) Set the IP address of man1
man1 needs to be configured with an IP address that the PTP master can reach. Set the network information either editing network config file directly
/opt/fmadio/etc/network.lua
or using the fmadiocli command line utility
Step 3) Specify man1 in the ptp config per below
["PTP"] =
{
["Master0"] = "",
["Master1"] = "",
["Master2"] = "",
["Master3"] = "",
["UpdateRate"] = "",
["VLANID"] = nil,
["Interface"] = "man1",
},Step 4) Reboot
A reboot is required to change the UDEV rules making man1 a physical bare metal interface. Upon reboot PTP GrandMaster should be visible on the dashboard Clock table.
Custom LinuxPTP Config
FMADIO system use the standard LinuxPTP project for time synchronization
https://linuxptp.sourceforge.net/
As such the PTP configuration is highly customizable. For example Broadcast environments use a non standard domain and update rate. FMADIO support this by using a custom LinuxPTP configuration file.
Custom config file can be located below
/opt/fmadio/etc/ptp4l.conf
If this file is present the system will use it when starting the application ptp4l.
NOTE: if changing the PTPv2 ethernet interface in the ptp4l.conf its also required to change it in the general /opt/fmadio/etc/time.lua configuration file (for the PHC setting)
After creating or editing the file, need to stop ptp4l as follows
After creating or editing the file, need to stop ptp4l as follows
// Some code
sudo killall ptp4l
sudo killall phc2sysThe system will then automatically start it on a 60sec timer.
Logfiles for debugging can be found in
/mnt/store0/log/ptp_ptp4l.log
/mnt/store0/log/ptp_phc2sys.logLayer2 PTPv2 Configuration
By default Linux4ptp will run in a layer 3 IP multicast / Unicast mode, per the man page
network_transport
Select the network transport. Possible values are UDPv4, UDPv6 and L2. The default is UDPv4.
In some configurations that is not ideal, instead a pure layer 2 mode is the preferred transport.
To enable Layer2 create the file
/opt/fmadio/etc/ptp4l.conf
The configuration (using man10 as the interface) is shown below
[global]
# Automatically select the delay mechanism (E2E or P2P)
delay_mechanism auto
# Use IEEE 802.3 (Ethernet) as the network transport
network_transport L2
# use the man10 interface (assuming the 60-udev rules have been updated)
[man10]
Save the file and restart ptp4linux using
sudo killall ptp4lDebug
If the system is not synchronizing correctly the following log files may help debug the problem
/mnt/store0/log/ptp_ptp4l.log
/mnt/store0/log/ptp_phc2sys.logIn addition there are log files showing the startup process which can be helpful.
/mnt/store0/log/time_ptp.stdouterr_YYYYMMMDDGeneral System FPGA clock synchronization log file is located below, this is more for FPGA timestamp issues than configuration of PTPv2
/mnt/store0/log/fnic_clock.curDebug PTP Layer3
PTP can be run in Layer 3 mode using UDP multicast as the transport mode, below is a guide on debuging ptp4l UDP Layer3 setup
Confirm the interface does not have VLAN tags
sudo tcpdump -i phy11 -nn -T ptp not vlanExpected output similar to below
.png?sv=2022-11-02&spr=https&st=2026-03-27T02%3A50%3A46Z&se=2026-03-27T03%3A19%3A46Z&sr=c&sp=r&sig=wnkuJ7zaxQNf5uYX9HRsVzXvH2E9rva7%2Fj2%2B4NCpIpI%3D)
Confirm Announce Message
Confirm Announce message are being sent, at roughly what frequency, every 1sec or every 30sec
sudo tcpdump -i phy11 -nn -T ptp not vlan | grep announceExpected output is list of announce only messages
.png?sv=2022-11-02&spr=https&st=2026-03-27T02%3A50%3A46Z&se=2026-03-27T03%3A19%3A46Z&sr=c&sp=r&sig=wnkuJ7zaxQNf5uYX9HRsVzXvH2E9rva7%2Fj2%2B4NCpIpI%3D)
Confirm the announce frequency matches the ptp4l.conf (default is 30sec) per below
announceReceiptTimeout 30
logAnnounceInterval 0 Confirm Sync Message
Confirm the Sync message is being received on the management interface, at the approximate rate of the configuration file
sudo tcpdump -i man11 -nn -T ptp not vlan | grep syncExample output, note the timestamp of each message is about 1 sec apart
fmadio@fmadio200v4-636:~$ sudo tcpdump -i man11 -nn -T ptp not vlan | grep sync
12:02:35.408340922 IP 192.168.2.5.319 > 224.0.1.129.319: PTPv2, v1 compat : no, msg type : sync msg, length : 44, domain : 4, reserved1 : 0, Flags [none], NS correction : 1807, sub NS correction : 1, reserved2 : 0, clock identity : 0x84c807fffe2813c3, port id : 1, seq id : 34803, control : 0 (Sync), log message interval : 0, originTimeStamp : 1767591896 seconds, 220502350 nanoseconds
12:02:36.408338517 IP 192.168.2.5.319 > 224.0.1.129.319: PTPv2, v1 compat : no, msg type : sync msg, length : 44, domain : 4, reserved1 : 0, Flags [none], NS correction : 1815, sub NS correction : 1, reserved2 : 0, clock identity : 0x84c807fffe2813c3, port id : 1, seq id : 34804, control : 0 (Sync), log message interval : 0, originTimeStamp : 1767591897 seconds, 220502349 nanoseconds
12:02:37.408335343 IP 192.168.2.5.319 > 224.0.1.129.319: PTPv2, v1 compat : no, msg type : sync msg, length : 44, domain : 4, reserved1 : 0, Flags [none], NS correction : 1759, sub NS correction : 0, reserved2 : 0, clock identity : 0x84c807fffe2813c3, port id : 1, seq id : 34805, control : 0 (Sync), log message interval : 0, originTimeStamp : 1767591898 seconds, 220502349 nanoseconds
12:02:38.408335018 IP 192.168.2.5.319 > 224.0.1.129.319: PTPv2, v1 compat : no, msg type : sync msg, length : 44, domain : 4, reserved1 : 0, Flags [none], NS correction : 1763, sub NS correction : 0, reserved2 : 0, clock identity : 0x84c807fffe2813c3, port id : 1, seq id : 34806, control : 0 (Sync), log message interval : 0, originTimeStamp : 1767591899 seconds, 220502349 nanoseconds
12:02:39.408333363 IP 192.168.2.5.319 > 224.0.1.129.319: PTPv2, v1 compat : no, msg type : sync msg, length : 44, domain : 4, reserved1 : 0, Flags [none], NS correction : 1767, sub NS correction : 1, reserved2 : 0, clock identity : 0x84c807fffe2813c3, port id : 1, seq id : 34807, control : 0 (Sync), log message interval : 0, originTimeStamp : 1767591900 seconds, 220502350 nanoseconds
12:02:40.408332929 IP 192.168.2.5.319 > 224.0.1.129.319: PTPv2, v1 compat : no, msg type : sync msg, length : 44, domain : 4, reserved1 : 0, Flags [none], NS correction : 1839, sub NS correction : 1, reserved2 : 0, clock identity : 0x84c807fffe2813c3, port id : 1, seq id : 34808, control : 0 (Sync), log message interval : 0, originTimeStamp : 1767591901 seconds, 220502334 nanoseconds
12:02:41.408331564 IP 192.168.2.5.319 > 224.0.1.129.319: PTPv2, v1 compat : no, msg type : sync msg, length : 44, domain : 4, reserved1 : 0, Flags [none], NS correction : 1843, sub NS correction : 1, reserved2 : 0, clock identity : 0x84c807fffe2813c3, port id : 1, seq id : 34809, control : 0 (Sync), log message interval : 0, originTimeStamp : 1767591902 seconds, 220502333 nanoseconds
12:02:42.408332500 IP 192.168.2.5.319 > 224.0.1.129.319: PTPv2, v1 compat : no, msg type : sync msg, length : 44, domain : 4, reserved1 : 0, Flags [none], NS correction : 1787, sub NS correction : 0, reserved2 : 0, clock identity : 0x84c807fffe2813c3, port id : 1, seq id : 34810, control : 0 (Sync), log message interval : 0, originTimeStamp : 1767591903 seconds, 220502349 nanoseconds
12:02:43.408333446 IP 192.168.2.5.319 > 224.0.1.129.319: PTPv2, v1 compat : no, msg type : sync msg, length : 44, domain : 4, reserved1 : 0, Flags [none], NS correction : 1787, sub NS correction : 0, reserved2 : 0, clock identity : 0x84c807fffe2813c3, port id : 1, seq id : 34811, control : 0 (Sync), log message interval : 0, originTimeStamp : 1767591904 seconds, 220502349 nanosecondsConfirm the frequency matches the ptp4l.conf
NOTE: logSyncInterval 0 = 1 sec, 1 = 2sec etc.
syncReceiptTimeout 30
logSyncInterval 0Confirm Domain Number
confirm the domain number matches the config (in this case its using domain 4)
.png?sv=2022-11-02&spr=https&st=2026-03-27T02%3A50%3A46Z&se=2026-03-27T03%3A19%3A46Z&sr=c&sp=r&sig=wnkuJ7zaxQNf5uYX9HRsVzXvH2E9rva7%2Fj2%2B4NCpIpI%3D)
in ptp4l.conf the setting is
domainNumber 4 Confirm Transport
Due to the IP/UDP encapsulation type
The p4p4l.conf setting is
network_transport UDPv4Example tshark filter confirming the traffic received on the FMADIO management interface is correct
fmadio@fmadio200v4-636:~$ sudo tshark -i phy11 -Y ptp -T fields -e eth.dst -e frame.protocols
Capturing on 'phy11'
01:00:5e:00:01:81 eth:ethertype:ip:udp:ptp
01:00:5e:00:01:81 eth:ethertype:ip:udp:ptp
01:00:5e:00:01:81 eth:ethertype:ip:udp:ptp
01:00:5e:00:01:81 eth:ethertype:ip:udp:ptp
01:00:5e:00:01:81 eth:ethertype:ip:udp:ptp
01:00:5e:00:01:81 eth:ethertype:ip:udp:ptp
01:00:5e:00:01:81 eth:ethertype:ip:udp:ptp
01:00:5e:00:01:81 eth:ethertype:ip:udp:ptp
01:00:5e:00:01:81 eth:ethertype:ip:udp:ptp
01:00:5e:00:01:81 eth:ethertype:ip:udp:ptp
01:00:5e:00:01:81 eth:ethertype:ip:udp:ptpConfirm FMADIO egress
PTP requires a two way communication channel to calibrate the transport latency and jitter of the connection. Confirm the local system is egressing traffic to the PTP Master on the correct interface as follows
Confirm the PTP interface egressing using port 319, replace 192.168.2.215 with the IP address of management interface
sudo tcpdump -i man11 -nn port 319 and src host 192.168.2.215 | grep "delay req"Example output is
fmadio@fmadio200v4-636:~$ sudo tcpdump -i man11 -nn port 319 and src host 192.168.2.215 | grep "delay req" | head
tcpdump: verbose output suppressed, use -v[v]... for full protocol decode
listening on man11, link-type EN10MB (Ethernet), snapshot length 262144 bytes
11:30:00.112719899 IP 192.168.2.215.319 > 224.0.1.129.319: PTPv2, v1 compat : no, msg type : delay req msg, length : 44, domain : 4, reserved1 : 0, Flags [none], NS correction : 0, sub NS correction : 0, reserved2 : 0, clock identity : 0x40a6b7fffeda03c1, port id : 1, seq id : 28920, control : 1 (Delay_Req), log message interval : 127, originTimeStamp : 0 seconds, 0 nanoseconds
11:30:00.128033792 IP 192.168.2.215.319 > 224.0.1.129.319: PTPv2, v1 compat : no, msg type : delay req msg, length : 44, domain : 4, reserved1 : 0, Flags [none], NS correction : 0, sub NS correction : 0, reserved2 : 0, clock identity : 0x40a6b7fffeda03c1, port id : 1, seq id : 28921, control : 1 (Delay_Req), log message interval : 127, originTimeStamp : 0 seconds, 0 nanoseconds
11:30:00.141220632 IP 192.168.2.215.319 > 224.0.1.129.319: PTPv2, v1 compat : no, msg type : delay req msg, length : 44, domain : 4, reserved1 : 0, Flags [none], NS correction : 0, sub NS correction : 0, reserved2 : 0, clock identity : 0x40a6b7fffeda03c1, port id : 1, seq id : 28922, control : 1 (Delay_Req), log message interval : 127, originTimeStamp : 0 seconds, 0 nanoseconds
11:30:00.146497296 IP 192.168.2.215.319 > 224.0.1.129.319: PTPv2, v1 compat : no, msg type : delay req msg, length : 44, domain : 4, reserved1 : 0, Flags [none], NS correction : 0, sub NS correction : 0, reserved2 : 0, clock identity : 0x40a6b7fffeda03c1, port id : 1, seq id : 28923, control : 1 (Delay_Req), log message interval : 127, originTimeStamp : 0 seconds, 0 nanoseconds
Confirm PTP Master Response
This confirms PTP requests are going from the peer (the FMADIO) back to the PTP Master
Confirm the PTP Master is sending the delay request response back to the the peer (FMADIO)
Need to get the last 6 digits of the MAC address
fmadio@fmadio200v4-636:~$ ifconfig man11
man11 Link encap:Ethernet HWaddr 40:A6:B7:DA:03:C1
inet addr:192.168.2.215 Bcast:192.168.2.255 Mask:255.255.255.0
inet6 addr: fe80::42a6:b7ff:feda:3c1/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:104277 errors:0 dropped:0 overruns:0 frame:0
TX packets:119691 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:9903097 (9.4 MiB) TX bytes:22465915 (21.4 MiB)In this case the MAC Address is 40:A6:B7:DA:03:C1 the last 6 Digits is then DA03C1 This used to identify the PTP Delay Response
sudo tcpdump -i man11 -nn port 320 | grep "delay resp" | grep -i DA03C1 | headExample output per below
fmadio@fmadio200v4-636:~$ sudo tcpdump -i man11 -nn port 320 | grep "delay resp" | grep -i DA03C1 | head
11:40:38.601755152 IP 192.168.2.5.320 > 224.0.1.129.320: PTPv2, v1 compat : no, msg type : delay resp msg, length : 54, domain : 4, reserved1 : 0, Flags [none], NS correction : 875, sub NS correction : 1, reserved2 : 0, clock identity : 0x84c807fffe2813c3, port id : 1, seq id : 44865, control : 3 (Delay_Resp), log message interval : 249, receiveTimeStamp : 1767590579 seconds, 412217267 nanoseconds, port identity : 0x40a6b7fffeda03c1, port id : 1
11:40:38.614403692 IP 192.168.2.5.320 > 224.0.1.129.320: PTPv2, v1 compat : no, msg type : delay resp msg, length : 54, domain : 4, reserved1 : 0, Flags [none], NS correction : 931, sub NS correction : 1, reserved2 : 0, clock identity : 0x84c807fffe2813c3, port id : 1, seq id : 44866, control : 3 (Delay_Resp), log message interval : 249, receiveTimeStamp : 1767590579 seconds, 424867467 nanoseconds, port identity : 0x40a6b7fffeda03c1, port id : 1
11:40:38.620255727 IP 192.168.2.5.320 > 224.0.1.129.320: PTPv2, v1 compat : no, msg type : delay resp msg, length : 54, domain : 4, reserved1 : 0, Flags [none], NS correction : 927, sub NS correction : 1, reserved2 : 0, clock identity : 0x84c807fffe2813c3, port id : 1, seq id : 44867, control : 3 (Delay_Resp), log message interval : 249, receiveTimeStamp : 1767590579 seconds, 430721046 nanoseconds, port identity : 0x40a6b7fffeda03c1, port id : 1
11:40:38.621544738 IP 192.168.2.5.320 > 224.0.1.129.320: PTPv2, v1 compat : no, msg type : delay resp msg, length : 54, domain : 4, reserved1 : 0, Flags [none], NS correction : 883, sub NS correction : 1, reserved2 : 0, clock identity : 0x84c807fffe2813c3, port id : 1, seq id : 44868, control : 3 (Delay_Resp), log message interval : 249, receiveTimeStamp : 1767590579 seconds, 432011224 nanoseconds, port identity : 0x40a6b7fffeda03c1, port id : 1
11:40:38.629227224 IP 192.168.2.5.320 > 224.0.1.129.320: PTPv2, v1 compat : no, msg type : delay resp msg, length : 54, domain : 4, reserved1 : 0, Flags [none], NS correction : 927, sub NS correction : 1, reserved2 : 0, clock identity : 0x84c807fffe2813c3, port id : 1, seq id : 44869, control : 3 (Delay_Resp), log message interval : 249, receiveTimeStamp : 1767590579 seconds, 439693285 nanoseconds, port identity : 0x40a6b7fffeda03c1, port id : 1
11:40:38.634837089 IP 192.168.2.5.320 > 224.0.1.129.320: PTPv2, v1 compat : no, msg type : delay resp msg, length : 54, domain : 4, reserved1 : 0, Flags [none], NS correction : 951, sub NS correction : 1, reserved2 : 0, clock identity : 0x84c807fffe2813c3, port id : 1, seq id : 44870, control : 3 (Delay_Resp), log message interval : 249, receiveTimeStamp : 1767590579 seconds, 445303920 nanoseconds, port identity : 0x40a6b7fffeda03c1, port id : 1
11:40:38.648480859 IP 192.168.2.5.320 > 224.0.1.129.320: PTPv2, v1 compat : no, msg type : delay resp msg, length : 54, domain : 4, reserved1 : 0, Flags [none], NS correction : 891, sub NS correction : 1, reserved2 : 0, clock identity : 0x84c807fffe2813c3, port id : 1, seq id : 44871, control : 3 (Delay_Resp), log message interval : 249, receiveTimeStamp : 1767590579 seconds, 458947593 nanoseconds, port identity : 0x40a6b7fffeda03c1, port id : 1
11:40:38.649711410 IP 192.168.2.5.320 > 224.0.1.129.320: PTPv2, v1 compat : no, msg type : delay resp msg, length : 54, domain : 4, reserved1 : 0, Flags [none], NS correction : 951, sub NS correction : 1, reserved2 : 0, clock identity : 0x84c807fffe2813c3, port id : 1, seq id : 44872, control : 3 (Delay_Resp), log message interval : 249, receiveTimeStamp : 1767590579 seconds, 460178635 nanoseconds, port identity : 0x40a6b7fffeda03c1, port id : 1
11:40:38.654342353 IP 192.168.2.5.320 > 224.0.1.129.320: PTPv2, v1 compat : no, msg type : delay resp msg, length : 54, domain : 4, reserved1 : 0, Flags [none], NS correction : 935, sub NS correction : 1, reserved2 : 0, clock identity : 0x84c807fffe2813c3, port id : 1, seq id : 44873, control : 3 (Delay_Resp), log message interval : 249, receiveTimeStamp : 1767590579 seconds, 464808596 nanoseconds, port identity : 0x40a6b7fffeda03c1, port id : 1
11:40:38.664690522 IP 192.168.2.5.320 > 224.0.1.129.320: PTPv2, v1 compat : no, msg type : delay resp msg, length : 54, domain : 4, reserved1 : 0, Flags [none], NS correction : 899, sub NS correction : 1, reserved2 : 0, clock identity : 0x84c807fffe2813c3, port id : 1, seq id : 44874, control : 3 (Delay_Resp), log message interval : 249, receiveTimeStamp : 1767590579 seconds, 475153445 nanoseconds, port identity : 0x40a6b7fffeda03c1, port id : 1
This confirms the PTP Master is responding to the peer(FMADIO) request
Confirm PTP4Linux is Synced
PTP should be synchronized, this is checked in the log file
/opt/fmadio/log/ptp_ptp4l.curExample output shown below
ptp4l[20260321_115502]: port 0: INITIALIZING to LISTENING on INIT_COMPLETE
ptp4l[20260321_115503]: port 1: new foreign master 84c807.fffe.2813c3-1
ptp4l[20260321_115505]: selected best master clock 84c807.fffe.2813c3
ptp4l[20260321_115505]: port 1: LISTENING to UNCALIBRATED on RS_SLAVE
ptp4l[20260321_115506]: port 1: minimum delay request interval 2^-7
ptp4l[20260321_115507]: master offset -61 s0 freq -3552 path delay 1768 grandmaster 84c807.fffe.2813c3
ptp4l[20260321_115508]: master offset -93 s2 freq -3584 path delay 1762 grandmaster 84c807.fffe.2813c3
ptp4l[20260321_115508]: port 1: UNCALIBRATED to SLAVE on MASTER_CLOCK_SELECTED
ptp4l[20260321_115509]: master offset -13 s2 freq -3597 path delay 1735 grandmaster 84c807.fffe.2813c3
ptp4l[20260321_115510]: master offset 3 s2 freq -3585 path delay 1744 grandmaster 84c807.fffe.2813c3
ptp4l[20260321_115511]: master offset -35 s2 freq -3622 path delay 1750 grandmaster 84c807.fffe.2813c3
ptp4l[20260321_115512]: master offset 60 s2 freq -3538 path delay 1699 grandmaster 84c807.fffe.2813c3
ptp4l[20260321_115513]: master offset 30 s2 freq -3550 path delay 1734 grandmaster 84c807.fffe.2813c3
ptp4l[20260321_115514]: master offset 56 s2 freq -3515 path delay 1743 grandmaster 84c807.fffe.2813c3
ptp4l[20260321_115515]: master offset -49 s2 freq -3603 path delay 1787 grandmaster 84c807.fffe.2813c3
ptp4l[20260321_115516]: master offset 24 s2 freq -3544 path delay 1740 grandmaster 84c807.fffe.2813c3
ptp4l[20260321_115517]: master offset 19 s2 freq -3542 path delay 1758 grandmaster 84c807.fffe.2813c3
ptp4l[20260321_115518]: master offset -2 s2 freq -3558 path delay 1773 grandmaster 84c807.fffe.2813c3
ptp4l[20260321_115519]: master offset -22 s2 freq -3578 path delay 1772 grandmaster 84c807.fffe.2813c3
Debug PTP Layer 2
PTP can run on Layer2 using 2 different modes, Peer-to-Peer or End-to-End, which mode can be determined by what MAC address is being used.
PTPv2 Transport Mode
Using tshark confirm the transport protocol PTP is running over layer2 without any IP or UDP encapsulation
sudo tshark -i phy11 -Y ptp -T fields -e eth.dst -e frame.protocolsExample output shown below
fmadio@fmadio200v4-636:~$ sudo tshark -i phy11 -Y ptp -T fields -e eth.dst -e frame.protocols
Capturing on 'phy11'
01:80:c2:00:00:0e eth:ethertype:ethertype:ptp
01:80:c2:00:00:0e eth:ethertype:ethertype:ptp
01:80:c2:00:00:0e eth:ethertype:ethertype:ptp
01:80:c2:00:00:0e eth:ethertype:ethertype:ptpPTP is running L2 Peer-to-Peer Mode.
NOTE: the MAC Destination address is 01:80:c2:00:00:0e
The ptp4l.conf setting is
network_transport L2
delay_mechanism P2PExample output
fmadio@fmadio200v4-636:~$ sudo tshark -i phy11 -Y ptp -T fields -e eth.dst -e frame.protocols
Capturing on 'phy11'
01:80:c2:00:00:0e eth:ethertype:ethertype:ptp
01:80:c2:00:00:0e eth:ethertype:ethertype:ptp
01:80:c2:00:00:0e eth:ethertype:ethertype:ptp
01:80:c2:00:00:0e eth:ethertype:ethertype:ptp
Alternative using TCPDUMP
sudo tcpdump -i phy11 -nn -XX ether proto 0x88f7 and ether dst 01:80:c2:00:00:0eExample output
fmadio@jump0:~$ sudo tcpdump -i qsfp0.port0 -nn -XX ether proto 0x88f7 and ether dst 01:80:c2:00:00:0e
18:58:19.267630 PTPv2, v1 compat : no, msg type : sync msg, length : 44, domain : 24, reserved1 : 0, Flags [none], NS correction : 0, sub NS correction : 104792065, reserved2 : 0, clock identity : 0x84c807fffe2813c3, port id : 2, seq id : 30946, control : 0 (sync msg), log message interval : 0, originTimeStamp : 1767588039 seconds, 228136429 nanoseconds
0x0000: 0180 c200 000e 84c8 0728 13c3 88f7 0002 .........(......
0x0010: 002c 1800 0000 0000 0000 063f 0001 0000 .,.........?....
0x0020: 0000 84c8 07ff fe28 13c3 0002 78e2 0000 .......(....x...
0x0030: 0000 695b 40c7 0d99 15ed 0000 ..i[@.......
18:58:19.267684 PTPv2, v1 compat : no, msg type : announce msg, length : 64, domain : 24, reserved1 : 0, Flags [none], NS correction : 0, sub NS correction : 0, reserved2 : 0, clock identity : 0x84c807fffe2813c3, port id : 2, seq id : 30946, control : 5 (Other), log message interval : 0, originTimeStamp : 1767588039 seconds 228136429 nanoseconds, origin cur utc :37, rsvd : 0, gm priority_1 : 128, gm clock class : 248, gm clock accuracy : 254, gm clock variance : 65535, gm priority_2 : 128, gm clock id : 0x84c807fffe2813c3, steps removed : 0, time source : 0x60
0x0000: 0180 c200 000e 84c8 0728 13c3 88f7 0b02 .........(......
0x0010: 0040 1800 0000 0000 0000 0000 0000 0000 .@..............
0x0020: 0000 84c8 07ff fe28 13c3 0002 78e2 0500 .......(....x...
0x0030: 0000 695b 40c7 0d99 15ed 0025 0080 f8fe ..i[@......%....
0x0040: ffff 8084 c807 fffe 2813 c300 0060 ........(....`
PTP is running L2 End-to-End Mode
NOTE: the MAC Destination address is 01:1B:19:00:00:00
The ptp4l.conf setting is
network_transport L2
delay_mechanism E2ETODO: Not verified
fmadio@fmadio200v4-636:~$ sudo tshark -i phy11 -Y ptp -T fields -e eth.dst -e frame.protocols
Capturing on 'phy11'
.
todoAlternative using TCPDUMP
sudo tcpdump -i phy11 -nn -XX ether proto 0x88f7 and ether dst 01:1b:19:00:00:00Example output
todoConfirm FMADIO Egressing
todo
Confirm PTP Master Response
todo
Confirm PTP4Linux is Synced
todo