LinuxPTP 从属设备未使用主设备且同步超时 tx 宣布超时

LinuxPTP 从属设备未使用主设备且同步超时 tx 宣布超时

和:

我正在使用 G8316 作为带有ptp transparent enableMellanox 354 适配器的交换机。

使用 LACP 绑定和中继的端口。

第一:服务器Aptp4l -m -l 7 -i xxxx -i xxxx -S

我可以在 ServerB 上捕获 ServerA 的广播包,并且 G8316 交换机上的 ptp 计数器显示非零。这意味着 ptp 包已发送,这很好。

然后:服务器 Bptp4l -m -l 7 -i xxxx -i xxxx -S -s

服务器 B 无法找到服务器 A,并使用本地时钟作为最佳主时钟

问题:

  • 为什么服务器A说master sync timeout
  • 为什么服务器 B 固执地认为本地时钟是最好的主时钟

我也尝试使用配置文件设置优先级,主服务器为 0,从服务器为 255。没有作用。

伐木工

tcpdump:

PTPv2, v1 compat : no, msg type : sync msg, length : 44, domain : 0, reserved1 : 0, Flags [two step], NS correction : 0, sub NS correction : 0, reserved2 : 0, clock identity : 0xb88303fffe690731, port id : 2, seq id : 212, control : 0 (sync msg), log message interval : 0, originTimeStamp : 0 seconds, 0 nanoseconds
PTPv2, v1 compat : no, msg type : follow up msg, length : 44, domain : 0, reserved1 : 0, Flags [none], NS correction : 4, sub NS correction : 647495680, reserved2 : 0, clock identity : 0xb88303fffe690731, port id : 2, seq id : 212, control : 2 (peer delay req msg), log message interval : 0, preciseOriginTimeStamp : 1662194584 seconds, 748804210 nanoseconds
PTPv2, v1 compat : no, msg type : announce msg, length : 64, domain : 0, reserved1 : 0, Flags [none], NS correction : 0, sub NS correction : 0, reserved2 : 0, clock identity : 0xb88303fffe690731, port id : 1, seq id : 106, control : 5 (Other), log message interval : 1, originTimeStamp : 0 seconds 0 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 : 0xb88303fffe690731, steps removed : 0, time source : 0xa0
PTPv2, v1 compat : no, msg type : sync msg, length : 44, domain : 0, reserved1 : 0, Flags [two step], NS correction : 0, sub NS correction : 0, reserved2 : 0, clock identity : 0xb88303fffe690731, port id : 1, seq id : 211, control : 0 (sync msg), log message interval : 0, originTimeStamp : 0 seconds, 0 nanoseconds
PTPv2, v1 compat : no, msg type : follow up msg, length : 44, domain : 0, reserved1 : 0, Flags [none], NS correction : 3, sub NS correction : 2354118656, reserved2 : 0, clock identity : 0xb88303fffe690731, port id : 1, seq id : 211, control : 2 (peer delay req msg), log message interval : 0, preciseOriginTimeStamp : 1662194584 seconds, 890605980 nanoseconds
PTPv2, v1 compat : no, msg type : announce msg, length : 64, domain : 0, reserved1 : 0, Flags [none], NS correction : 0, sub NS correction : 0, reserved2 : 0, clock identity : 0xb88303fffe690731, port id : 2, seq id : 107, control : 5 (Other), log message interval : 1, originTimeStamp : 0 seconds 0 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 : 0xb88303fffe690731, steps removed : 0, time source : 0xa0
PTPv2, v1 compat : no, msg type : sync msg, length : 44, domain : 0, reserved1 : 0, Flags [two step], NS correction : 0, sub NS correction : 0, reserved2 : 0, clock identity : 0xb88303fffe690731, port id : 2, seq id : 213, control : 0 (sync msg), log message interval : 0, originTimeStamp : 0 seconds, 0 nanoseconds
PTPv2, v1 compat : no, msg type : follow up msg, length : 44, domain : 0, reserved1 : 0, Flags [none], NS correction : 4, sub NS correction : 233832448, reserved2 : 0, clock identity : 0xb88303fffe690731, port id : 2, seq id : 213, control : 2 (peer delay req msg), log message interval : 0, preciseOriginTimeStamp : 1662194585 seconds, 748843772 nanoseconds
PTPv2, v1 compat : no, msg type : sync msg, length : 44, domain : 0, reserved1 : 0, Flags [two step], NS correction : 0, sub NS correction : 0, reserved2 : 0, clock identity : 0xb88303fffe690731, port id : 1, seq id : 212, control : 0 (sync msg), log message interval : 0, originTimeStamp : 0 seconds, 0 nanoseconds
PTPv2, v1 compat : no, msg type : follow up msg, length : 44, domain : 0, reserved1 : 0, Flags [none], NS correction : 5, sub NS correction : 461307904, reserved2 : 0, clock identity : 0xb88303fffe690731, port id : 1, seq id : 212, control : 2 (peer delay req msg), log message interval : 0, preciseOriginTimeStamp : 1662194585 seconds, 890651748 nanoseconds
PTPv2, v1 compat : no, msg type : sync msg, length : 44, domain : 0, reserved1 : 0, Flags [two step], NS correction : 0, sub NS correction : 0, reserved2 : 0, clock identity : 0xb88303fffe690731, port id : 2, seq id : 214, control : 0 (sync msg), log message interval : 0, originTimeStamp : 0 seconds, 0 nanoseconds
PTPv2, v1 compat : no, msg type : follow up msg, length : 44, domain : 0, reserved1 : 0, Flags [none], NS correction : 4, sub NS correction : 1033895936, reserved2 : 0, clock identity : 0xb88303fffe690731, port id : 2, seq id : 214, control : 2 (peer delay req msg), log message interval : 0, preciseOriginTimeStamp : 1662194586 seconds, 748892099 nanoseconds
PTPv2, v1 compat : no, msg type : announce msg, length : 64, domain : 0, reserved1 : 0, Flags [none], NS correction : 0, sub NS correction : 0, reserved2 : 0, clock identity : 0xb88303fffe690731, port id : 1, seq id : 107, control : 5 (Other), log message interval : 1, originTimeStamp : 0 seconds 0 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 : 0xb88303fffe690731, steps removed : 0, time source : 0xa0
PTPv2, v1 compat : no, msg type : sync msg, length : 44, domain : 0, reserved1 : 0, Flags [two step], NS correction : 0, sub NS correction : 0, reserved2 : 0, clock identity : 0xb88303fffe690731, port id : 1, seq id : 213, control : 0 (sync msg), log message interval : 0, originTimeStamp : 0 seconds, 0 nanoseconds
PTPv2, v1 compat : no, msg type : follow up msg, length : 44, domain : 0, reserved1 : 0, Flags [none], NS correction : 4, sub NS correction : 2366570496, reserved2 : 0, clock identity : 0xb88303fffe690731, port id : 1, seq id : 213, control : 2 (peer delay req msg), log message interval : 0, preciseOriginTimeStamp : 1662194586 seconds, 890690747 nanoseconds

服务器 A

ptp4l[111571.790]: config item (null).uds_address is '/var/run/ptp4l'
ptp4l[111571.790]: port 0: INITIALIZING to LISTENING on INIT_COMPLETE
ptp4l[111571.790]: port 1: received link status notification
ptp4l[111571.790]: interface index 6 is up
ptp4l[111571.790]: port 2: received link status notification
ptp4l[111571.790]: interface index 7 is up
ptp4l[111578.386]: port 2: announce timeout
ptp4l[111578.386]: port 2: LISTENING to MASTER on ANNOUNCE_RECEIPT_TIMEOUT_EXPIRES
ptp4l[111578.386]: selected local clock b88303.fffe.690731 as best master
ptp4l[111578.386]: port 2: assuming the grand master role
ptp4l[111578.387]: port 2: master tx announce timeout
ptp4l[111578.387]: port 2: setting asCapable
ptp4l[111579.386]: port 2: master sync timeout
ptp4l[111579.528]: port 1: announce timeout
ptp4l[111579.528]: port 1: LISTENING to MASTER on ANNOUNCE_RECEIPT_TIMEOUT_EXPIRES
ptp4l[111579.528]: selected local clock b88303.fffe.690731 as best master
ptp4l[111579.528]: port 1: assuming the grand master role
ptp4l[111579.529]: port 2: assuming the grand master role
ptp4l[111579.529]: port 1: master tx announce timeout
ptp4l[111579.529]: port 1: setting asCapable
ptp4l[111580.386]: port 2: master sync timeout
ptp4l[111580.387]: port 2: master tx announce timeout
ptp4l[111580.529]: port 1: master sync timeout
ptp4l[111581.386]: port 2: master sync timeout
ptp4l[111581.529]: port 1: master sync timeout
ptp4l[111581.530]: port 1: master tx announce timeout
ptp4l[111582.386]: port 2: master sync timeout
ptp4l[111582.387]: port 2: master tx announce timeout
ptp4l[111582.529]: port 1: master sync timeout
ptp4l[111583.386]: port 2: master sync timeout
ptp4l[111583.529]: port 1: master sync timeout
ptp4l[111583.530]: port 1: master tx announce timeout
ptp4l[111584.387]: port 2: master sync timeout
ptp4l[111584.387]: port 2: master tx announce timeout
ptp4l[111584.529]: port 1: master sync timeout
ptp4l[111585.387]: port 2: master sync timeout
ptp4l[111585.529]: port 1: master sync timeout
ptp4l[111585.530]: port 1: master tx announce timeout
ptp4l[111586.387]: port 2: master sync timeout

服务器 B

ptp4l[97574.640]: config item /var/run/ptp4l.inhibit_delay_req is 0
ptp4l[97574.640]: config item (null).uds_address is '/var/run/ptp4l'
ptp4l[97574.640]: port 0: INITIALIZING to LISTENING on INIT_COMPLETE
ptp4l[97574.640]: port 1: received link status notification
ptp4l[97574.640]: interface index 10 is up
ptp4l[97574.640]: port 2: received link status notification
ptp4l[97574.641]: interface index 11 is up
ptp4l[97582.257]: port 1: announce timeout
ptp4l[97582.257]: config item enp130s0.udp_ttl is 1
ptp4l[97582.258]: config item (null).dscp_event is 0
ptp4l[97582.258]: config item (null).dscp_general is 0
ptp4l[97582.258]: selected local clock b88303.fffe.6c8291 as best master
ptp4l[97582.307]: port 2: announce timeout
ptp4l[97582.307]: config item enp130s0d1.udp_ttl is 1
ptp4l[97582.307]: config item (null).dscp_event is 0
ptp4l[97582.307]: config item (null).dscp_general is 0
ptp4l[97582.307]: selected local clock b88303.fffe.6c8291 as best master
ptp4l[97589.361]: port 2: announce timeout
ptp4l[97589.361]: config item enp130s0d1.udp_ttl is 1
ptp4l[97589.361]: config item (null).dscp_event is 0
ptp4l[97589.361]: config item (null).dscp_general is 0
ptp4l[97589.361]: selected local clock b88303.fffe.6c8291 as best master
ptp4l[97589.840]: port 1: announce timeout
ptp4l[97589.840]: config item enp130s0.udp_ttl is 1
ptp4l[97589.841]: config item (null).dscp_event is 0
ptp4l[97589.841]: config item (null).dscp_general is 0
ptp4l[97589.841]: selected local clock b88303.fffe.6c8291 as best master
ptp4l[97595.473]: port 2: announce timeout
ptp4l[97595.473]: config item enp130s0d1.udp_ttl is 1
ptp4l[97595.474]: config item (null).dscp_event is 0
ptp4l[97595.474]: config item (null).dscp_general is 0
ptp4l[97595.474]: selected local clock b88303.fffe.6c8291 as best master
ptp4l[97597.292]: port 1: announce timeout
ptp4l[97597.292]: config item enp130s0.udp_ttl is 1
ptp4l[97597.292]: config item (null).dscp_event is 0
ptp4l[97597.293]: config item (null).dscp_general is 0
ptp4l[97597.293]: selected local clock b88303.fffe.6c8291 as best master
ptp4l[97601.559]: port 2: announce timeout
ptp4l[97601.559]: config item enp130s0d1.udp_ttl is 1
ptp4l[97601.559]: config item (null).dscp_event is 0
ptp4l[97601.559]: config item (null).dscp_general is 0
ptp4l[97601.559]: selected local clock b88303.fffe.6c8291 as best master
ptp4l[97604.833]: port 1: announce timeout
ptp4l[97604.833]: config item enp130s0.udp_ttl is 1
ptp4l[97604.833]: config item (null).dscp_event is 0
ptp4l[97604.834]: config item (null).dscp_general is 0
ptp4l[97604.834]: selected local clock b88303.fffe.6c8291 as best master
ptp4l[97609.385]: port 2: announce timeout
ptp4l[97609.385]: config item enp130s0d1.udp_ttl is 1
ptp4l[97609.385]: config item (null).dscp_event is 0
ptp4l[97609.385]: config item (null).dscp_general is 0
ptp4l[97609.386]: selected local clock b88303.fffe.6c8291 as best master
ptp4l[97611.210]: port 1: announce timeout
ptp4l[97611.210]: config item enp130s0.udp_ttl is 1
ptp4l[97611.211]: config item (null).dscp_event is 0
ptp4l[97611.211]: config item (null).dscp_general is 0
ptp4l[97611.211]: selected local clock b88303.fffe.6c8291 as best master
ptp4l[97616.329]: port 2: announce timeout
ptp4l[97616.329]: config item enp130s0d1.udp_ttl is 1
ptp4l[97616.329]: config item (null).dscp_event is 0
ptp4l[97616.329]: config item (null).dscp_general is 0
ptp4l[97616.329]: selected local clock b88303.fffe.6c8291 as best master

相关内容