PTP setup¶
PTP is required for sub-frame synchronization across cameras. Two setups are supported:
- Host-only, using
linuxptpto sync NIC ports on a single host (cameras attached directly to a NIC). - Switched, using a PTP-capable switch (Arista and Mellanox/Onyx examples below).
Host-only PTP¶
1. Install linuxptp¶
2. Set boundary clock¶
If you don't have a ptp4l.conf file, create /etc/ptp4l.conf:
3. Synchronize NICs¶
If you only have one NIC card:
This syncs the ports of the NIC. enp66s0f0np0 and enp66s0f1np1 are example port names — change them to your port names.
For multiple NICs, sync all ports across all NICs:
In another terminal, run:
This syncs the computer time and treats it as a time source.
Switched PTP¶
If you're using a network switch, enable PTP on all the ports connected to either cameras or host NICs. Examples below for Arista and Mellanox (Onyx) switches.
Arista¶
Once logged in:
If PTP is disabled:
Configure each port:
Example: enable PTP on port 5
Multiple ports:
If a port is in errdisabled, restart it:
To disable spanning tree:
Mellanox (Onyx)¶
Reference: MLNX-OS Ethernet Command Reference Guide.
Useful commands:
enable
configure terminal
interface ethernet 1/11
shutdown
mtu 9216
speed 25000
fec rs-fec
no shutdown
To configure multiple ports: