此产品的文档集力求使用非歧视性语言。在本文档集中,非歧视性语言是指不隐含针对年龄、残障、性别、种族身份、族群身份、性取向、社会经济地位和交叉性的歧视的语言。由于产品软件的用户界面中使用的硬编码语言、基于 RFP 文档使用的语言或引用的第三方产品使用的语言,文档中可能无法确保完全使用非歧视性语言。 深入了解思科如何使用包容性语言。
思科采用人工翻译与机器翻译相结合的方式将此文档翻译成不同语言,希望全球的用户都能通过各自的语言得到支持性的内容。 请注意:即使是最好的机器翻译,其准确度也不及专业翻译人员的水平。 Cisco Systems, Inc. 对于翻译的准确性不承担任何责任,并建议您总是参考英文原始文档(已提供链接)。
本文档 d说明 如何排除Nexus 9000交换机上的精确时间协议(PTP)故障。
思科建议您了解以下主题:
本文不介绍PTP(Precision Time Protocol)协议的设计和配置。有关此类信息,建议您参考配置指南。
Cisco Nexus控制面板见解的Precision时间协议(PTP)
本文档不限于特定的软件和硬件版本。
本文档中的信息基于以下软件和硬件版本:
本文档中的信息都是基于特定实验室环境中的设备编写的。本文档中使用的所有设备最初均采用原始(默认)配置。如果您的网络处于活动状态,请确保您了解所有命令的潜在影响。
要使PTP正常工作,必须使用最新的SUP和线卡FPGA版本。有关升级FPGA的信息,请访问版本说明登录页,转到FPGA/EPLD升级版本说明(NX-OS模式交换机)部分并找到适用于您的软件版本的FPGA/EPLD升级版本说明。请参阅安装指南主题。
Cisco Nexus 92348GC-X平台交换机不支持PTP。
QoS TCAM区域Ingress SUP [ingress-sup]必须设置为768或更高,PTP IPv6传输才能正常工作。
在对PTP问题进行故障排除之前,建议查看给定平台和版本的Nexus 9000系统管理配置的PTP部分。
PTP过程包括两个阶段:建立主要和辅助层次结构以及同步时钟。
BMCA用于选择每条链路上的时间源时钟,并最终为整个PTP域选择祖时钟时。它在普通时钟和边界时钟的每个端口上本地运行,将本地数据集与从通告消息接收的数据进行比较,以选择链路上的最佳时钟。
通告消息用于建立同步层次结构。
Sync、Delay_Req、Follow_Up和Delay_Resp消息用于计算时间。
PTP消息可以是组播或单播,组播是默认模式。根据IEEE 1588标准,PTP使用组播目标IP地址224.0.1.129 UDP319/320。
PTP配置文件 — PTP支持默认(1588)、AES67和SMPTE 2059-2配置文件。每个配置文件具有不同的同步和延迟请求间隔范围。有关这些配置文件的详细信息,请参阅配置指南。
feature ptp
ptp source 192.168.1.3>>>>Define PTP packet source IP
ptp priority1 127 >>>>Define PTP priority 1
ptp priority2 127 >>>>Define PTP priority 2
interface Ethernet1/31
ptp >>>>Enable PTP in all interconnected ports.
interface Ethernet1/33
ptp
interface Ethernet1/34
ptp
确保每台设备都有唯一的源IP,并且所有设备上的PTP域ID相同。
N9K_Spine01# show ptp clock
PTP Device Type : boundary-clock
PTP Source IPv4 Address : 192.168.1.3>>>>PTP source IP
PTP Source IPv6 Address : 0::
Clock Identity : 00:ee:ab:ff:fe:67:3e:9d
Clock Domain: 0 >>>>PTP domain id. Must same in one PTP domain.
Slave Clock Operation : Two-step
Master Clock Operation : Two-step >>>>N9K EX/FX/FX2/FX3 only support two-step mode.
Slave-Only Clock Mode : Disabled
Number of PTP ports: 3
Priority1 : 127
Priority2 : 127
Clock Quality:
Class : 248
Accuracy : 254
Offset (log variance) : 65535
Steps removed : 1 >>>>Hops from GM
从端口连接到上游时钟设备。master端口连接到下游设备。
N9K_Spine01# show ptp brief
PTP port status
--------------------------------------------
Port State
-------------------------------------------
Eth1/31 Slave >>>>Connected to GM
Eth1/33 Master >>>>Connected to N9K Spine 2
Eth1/34 Master >>>>Connected to N9K leaf
N9K_Spine02# show ptp brief
PTP port status
--------------------------------------------
Port State
------------------------------- ------------
Eth1/48 Passive >>>>Connected to N9K leaf. The Port should be in the passive state to avoid loop
Eth1/50 Master >>>>Connected to GM02
Eth1/53 Slave >>>>Connected to N9K Spine 1
N9K_Leaf01# show ptp brief
PTP port status
--------------------------------------------
Port State
------------------------------- ------------
Eth1/48 Master >>>>Connected to Spine02
Eth1/50 Master >>>>Connected to host
Eth1/51 Slave >>>>Connected to Spine01
GM01# show system internal ptp info announce-pkts
2024-01-02T13:36:23.242624000+08:00 [M 1] [ptp] E_DEBUG [ptp_ev_hist_ann_pkt:5469] [TX] If Eth1/35 (0x1a004400): MSG: Announce TS:0 V:2 LEN:64 D:0 UC:0 2S:0 UTCVAL:0 PTPTS:1 TT:0 FT:0 SRC:00:ee:ab:ff:fe:67:37:e9-0x89 CORR:0 (0x0) SEQ:bda4 (48548) Int:1; TS
:0 s 0 ns; UTC_OFF:37 TM_SRC:a0 STEP:0 PRIO1:1 PRIO2:1 CLASS:248 ACC:fe LOG_VAR:ffff GM:00:ee:ab:ff:fe:67:37:e9;
2024-01-02T13:36:15.238816000+08:00 [M 1] [ptp] E_DEBUG [ptp_ev_hist_ann_pkt:5469] [TX] If Eth1/35 (0x1a004400): MSG: Announce TS:0 V:2 LEN:64 D:0 UC:0 2S:0 UTCVAL:0 PTPTS:1 TT:0 FT:0 SRC:00:ee:ab:ff:fe:67:37:e9-0x89 CORR:0 (0x0) SEQ:bda0 (48544) Int:1; TS
:0 s 0 ns; UTC_OFF:37 TM_SRC:a0 STEP:0 PRIO1:1 PRIO2:1 CLASS:248 ACC:fe LOG_VAR:ffff GM:00:ee:ab:ff:fe:67:37:e9;
N9K_Spine01# show system internal ptp info announce-pkts
2024-01-02T13:36:20.826735000+08:00 [M 1] [ptp] E_DEBUG [ptp_ev_hist_ann_pkt:5469] [TX] If Eth1/33 (0x1a004000): MSG: Announce TS:0 V:2 LEN:64 D:0 UC:0 2S:0 UTCVAL:0 PTPTS:1 TT:0 FT:0 SRC:00:ee:ab:ff:fe:67:3e:9d-0x81 CORR:0 (0x0) SEQ:bbfc (48124) Int:1; TS
:0 s 0 ns; UTC_OFF:37 TM_SRC:a0 STEP:1 PRIO1:1 PRIO2:1 CLASS:248 ACC:fe LOG_VAR:ffff GM:00:ee:ab:ff:fe:67:37:e9;
2024-01-02T13:36:17.231080000+08:00 [M 1] [ptp] E_DEBUG [ptp_ev_hist_ann_pkt:5469] [TX] If Eth1/34 (0x1a004200): MSG: Announce TS:0 V:2 LEN:64 D:0 UC:0 2S:0 UTCVAL:0 PTPTS:1 TT:0 FT:0 SRC:00:ee:ab:ff:fe:67:3e:9d-0x85 CORR:0 (0x0) SEQ:bdac (48556) Int:1; TS
:0 s 0 ns; UTC_OFF:37 TM_SRC:a0 STEP:1 PRIO1:1 PRIO2:1 CLASS:248 ACC:fe LOG_VAR:ffff GM:00:ee:ab:ff:fe:67:37:e9;
2024-01-02T13:36:16.239728000+08:00 [M 1] [ptp] E_DEBUG [ptp_ev_hist_ann_pkt:5469] [RX] If Eth1/31 (0x1a003c00): MSG: Announce TS:0 V:2 LEN:64 D:0 UC:0 2S:0 UTCVAL:0 PTPTS:1 TT:0 FT:0 SRC:00:ee:ab:ff:fe:67:37:e9-0x89 CORR:0 (0x0) SEQ:bda1 (48545) Int:1; TS
:0 s 0 ns; UTC_OFF:37 TM_SRC:a0 STEP:0 PRIO1:1 PRIO2:1 CLASS:248 ACC:fe LOG_VAR:ffff GM:00:ee:ab:ff:fe:67:37:e9;
N9K_Spine02# show system internal ptp info announce-pkts
2024-01-02T13:36:21.368978000+08:00 [M 1] [ptp] E_DEBUG [ptp_ev_hist_ann_pkt:5469] [RX] If Eth1/48 (0x1a005e00): MSG: Announce TS:0 V:2 LEN:64 D:0 UC:0 2S:0 UTCVAL:0 PTPTS:1 TT:0 FT:0 SRC:4c:77:6d:ff:fe:d5:35:35-0xbd CORR:0 (0x0) SEQ:bcd7 (48343) Int:1; TS
:0 s 0 ns; UTC_OFF:37 TM_SRC:a0 STEP:2 PRIO1:1 PRIO2:1 CLASS:248 ACC:fe LOG_VAR:ffff GM:00:ee:ab:ff:fe:67:37:e9;
2024-01-02T13:36:19.363095000+08:00 [M 1] [ptp] E_DEBUG [ptp_ev_hist_ann_pkt:5469] [TX] If Eth1/50 (0x1a006200): MSG: Announce TS:0 V:2 LEN:64 D:0 UC:0 2S:0 UTCVAL:0 PTPTS:1 TT:0 FT:0 SRC:c0:14:fe:ff:fe:89:9b:77-0xc5 CORR:0 (0x0) SEQ:00e8 (232) Int:1; TS:0
s 0 ns; UTC_OFF:37 TM_SRC:a0 STEP:2 PRIO1:1 PRIO2:1 CLASS:248 ACC:fe LOG_VAR:ffff GM:00:ee:ab:ff:fe:67:37:e9;
2024-01-02T13:36:16.828573000+08:00 [M 1] [ptp] E_DEBUG [ptp_ev_hist_ann_pkt:5469] [RX] If Eth1/53 (0x1a006800): MSG: Announce TS:0 V:2 LEN:64 D:0 UC:0 2S:0 UTCVAL:0 PTPTS:1 TT:0 FT:0 SRC:00:ee:ab:ff:fe:67:3e:9d-0x81 CORR:0 (0x0) SEQ:bbfa (48122) Int:1; TS
:0 s 0 ns; UTC_OFF:37 TM_SRC:a0 STEP:1 PRIO1:1 PRIO2:1 CLASS:248 ACC:fe LOG_VAR:ffff GM:00:ee:ab:ff:fe:67:37:e9;
N9K_Leaf01# show system internal ptp info announce-pkts
2024 Jan 02 13:36:23.893622: E_PTP_ANN_PKT_EV[TX] I/f Eth1/50 (0x1a006200): MSG:Announce TS:0 V:2 LEN:64 D:0 UC:0 2S:0 UTCVAL:0 PTPTS:1 TT:0 FT:0 SRC:4c:77:6d:ff:fe:d5:35:35-0xc5 CORR:0 (0x0) SEQ:1354 (4948) Int:1; TS:0 s 0 ns; UTC_OFF:37 TM_SRC:a0 STEP:2
PRIO1:1 PRIO2:1
CLASS:248 ACC:fe LOG_VAR:ffff GM:00:ee:ab:ff:fe:67:37:e9
2024 Jan 02 13:36:23.369089: E_PTP_ANN_PKT_EV[TX] I/f Eth1/48 (0x1a005e00): MSG:Announce TS:0 V:2 LEN:64 D:0 UC:0 2S:0 UTCVAL:0 PTPTS:1 TT:0 FT:0 SRC:4c:77:6d:ff:fe:d5:35:35-0xbd CORR:0 (0x0) SEQ:bcd8 (48344) Int:1; TS:0 s 0 ns; UTC_OFF:37 TM_SRC:a0 STEP:2
PRIO1:1 PRIO2:1
CLASS:248 ACC:fe LOG_VAR:ffff GM:00:ee:ab:ff:fe:67:37:e9
2024 Jan 02 13:36:23.233889: E_PTP_ANN_PKT_EV[RX] I/f Eth1/51 (0x1a006400): MSG:Announce TS:0 V:2 LEN:64 D:0 UC:0 2S:0 UTCVAL:0 PTPTS:1 TT:0 FT:0 SRC:00:ee:ab:ff:fe:67:3e:9d-0x85 CORR:0 (0x0) SEQ:bdaf (48559) Int:1; TS:0 s 0 ns; UTC_OFF:37 TM_SRC:a0 STEP:1
PRIO1:1 PRIO2:1
CLASS:248 ACC:fe LOG_VAR:ffff GM:00:ee:ab:ff:fe:67:37:e9
Host# show system internal ptp info announce-pkts
2024 Jan 02 13:36:23.898218: E_PTP_ANN_PKT_EV[RX] I/f Eth1/50 (0x1a006200): MSG:Announce TS:0 V:2 LEN:64 D:0 UC:0 2S:0 UTCVAL:0 PTPTS:1 TT:0 FT:0 SRC:4c:77:6d:ff:fe:d5:35:35-0xc5 CORR:0 (0x0) SEQ:1354 (4948) Int:1; TS:0 s 0 ns; UTC_OFF:37 TM_SRC:a0 STEP:2
PRIO1:1 PRIO2:1
CLASS:248 ACC:fe LOG_VAR:ffff GM:00:ee:ab:ff:fe:67:37:e9
V:2 |
PTP版本2 |
LEN:64 |
PTP消息长度64 |
D:0 |
PTP域0 |
UC:0 |
0:PTP组播数据包,1:PTP单播数据包 |
2S:0 |
也许leap 59/61 |
UTCVAL:0 |
UTC偏移量有效标志。0表示false。GM设定的。 |
PTPTS:1 |
PTP TimeScale标志。1表示真 |
TT:0 |
PTP TimeTrace标志。 0表示false |
FT:0 |
PTP FreqTrace标志。0表示错误 |
源: |
PTP数据包源MAC |
CORR:0 |
更正 |
序列号: |
PTP序列ID |
INT:1 |
日志消息周期。1平均2秒 |
TS: |
时间戳 |
UTC_OFF |
UTC偏移值。 GM设置此值。 |
TM_SRC |
0x20 GPS、0x40 PTP、0x50 NTP、0x60手持设备0xa内置振荡器。 GM设置此值。 |
步骤:2 |
两步模式下的时钟操作(N9K仅在主端口上支持两步模式) |
PRIO1:1 PRIO2:1类:248 ACC:fe LOG_VAR:ffff |
GM优先级、GM时钟等级、GM时钟精度 |
GM |
GM时钟标识。来自mac地址。 |
确保父时钟设备和根时钟设备是稳定的。
N9K_Spine01# show ptp parent Parent Clock: Parent Clock Identity: 00:ee:ab:ff:fe:67:37:e9 >>>>upstream clock identity. 37:e9 is GM in lab topology Parent Port Number: 137 Observed Parent Offset (log variance): N/A Observed Parent Clock Phase Change Rate: N/A Parent IP: 192.168.1.1 >>>>upstream clock source IP Grandmaster Clock: Grandmaster Clock Identity: 00:ee:ab:ff:fe:67:37:e9 >>>>GM clock identity Grandmaster Clock Quality: >>>>GM clock attributes Class: 248 Accuracy: 254 Offset (log variance): 65535 Priority1: 1 >>>>GM priority1 Priority2: 1
N9K_Spine02# show ptp parent Parent Clock: Parent Clock Identity: 00:ee:ab:ff:fe:67:3e:9d>>>upstream clock identity. 37:9d is N9K Spine01 in lab topology Parent Port Number: 129 Observed Parent Offset (log variance): N/A Observed Parent Clock Phase Change Rate: N/A Parent IP: 192.168.1.3 >>>>upstream clock source IP. 192.168.1.3 is N9K Spine01 Grandmaster Clock: Grandmaster Clock Identity: 00:ee:ab:ff:fe:67:37:e9 Grandmaster Clock Quality: Class: 248 Accuracy: 254 Offset (log variance): 65535 Priority1: 1 Priority2: 1
N9K_Leaf01# show ptp parent PTP PARENT PROPERTIES Parent Clock: Parent Clock Identity: 00:ee:ab:ff:fe:67:3e:9d Parent Port Number: 133 Observed Parent Offset (log variance): N/A Observed Parent Clock Phase Change Rate: N/A Parent IP: 192.168.1.3 Grandmaster Clock: Grandmaster Clock Identity: 00:ee:ab:ff:fe:67:37:e9
Grandmaster Clock Quality: Class: 248 Accuracy: 254 Offset (log variance): 65535 Priority1: 1 Priority2: 1
Sync-SeqID必须随每个条目增加。校正必须小于10000纳秒(ns)。
N9K_Spine02# show system internal ptp corrections PTP past corrections ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Slave Port SUP Time Correction(ns) MeanPath Delay(ns) MasterTimestamp (sec, nsec) Slave Timestamp (sec, nsec) Sync-SeqID PTPLC ts_corr(ns)
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Eth1/53 Wed Jan 3 15:29:05 2024 15928 -8 204 1704266945 14551936 1704266945 14552148 31871 0 Eth1/53 Wed Jan 3 15:29:04 2024 765051 24 204 1704266944 764413040 1704266944 764413220 31870 0 Eth1/53 Wed Jan 3 15:29:04 2024 509436 24 204 1704266944 513679576 1704266944 513679756 31869 0 Eth1/53 Wed Jan 3 15:29:04 2024 264139 0 204 1704266944 263204688 1704266944 263204892 31868 0 Eth1/53 Wed Jan 3 15:29:04 2024 13239 -8 204 1704266944 12722952 1704266944 12723164 31867 0 Eth1/53 Wed Jan 3 15:29:03 2024 762756 24 212 1704266943 761756520 1704266943 761756708 31866 0
错误更正记录
默认情况下,校正阈值为100000纳秒(100us)。不在此范围内的更正会记录为错误更正。
N9K_Spine02(config)# show system internal ptp bad-corrections PTP past corrections ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Slave Port SUP Time Correction(ns) MeanPath Delay(ns) MasterTimestamp (sec, nsec) Slave Timestamp (sec, nsec) Sync-SeqID PTPLC ts_corr(ns)
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Eth1/48 Tue Jan 2 13:28:30 2024 692911 17111776 172 1704173310 705666212 1704173310 688554608 52942 0 Eth1/48 Tue Jan 2 13:28:30 2024 443146 17111808 172 1704173310 454735796 1704173310 437624160 52941 0 Eth1/48 Tue Jan 2 13:28:30 2024 188850 17111784 172 1704173310 203243428 1704173310 186131816 52940 0 Eth1/48 Tue Jan 2 13:28:29 2024 949432 51292504 172 1704173309 952419348 1704173309 901127016 52939 0
show running-config ptp
show ptp brief
show ptp counters all
show ptp clock
show system internal ptp info all
show system internal ptp info global
show ptp clock foreign-masters record
show system internal ptp corrections entries 2000
show system internal ptp bad-corrections entries 2000
show system internal ptp trouble-shooting all
show tech ptp
在大多数情况下,这些是配置问题。
show ptp clock
TP Device Type : boundary-clock
PTP Device Encapsulation : NA
PTP Source IP Address : 192.168.1.4
Clock Identity : c0:14:fe:ff:fe:89:9b:77
Clock Domain: 0
Slave Clock Operation : Two-step
Master Clock Operation : Two-step
<snip>
Local clock time : Thu Jan 4 19:34:26 2024
PTP Clock state : Locked
N9K_Spine02# show ptp brief
--------------------------------------------
Port State
------------------------------- ------------
Eth1/48 Passive >>>>Connected to N9K leaf. Port in the passive state to prevent loop
Eth1/50 Master >>>>Connected to GM02
Eth1/53 Slave >>>>Connected to N9K Spine 1
N9K_Spine02# show ptp port interface e1/48
PTP Port Dataset: Eth1/48
Port identity: clock identity: c0:14:fe:ff:fe:89:9b:77
Port identity: port number: 188
PTP version: 2
Port state: Master
VLAN info: 1
Delay request interval(log mean): 0
Announce receipt time out: 3
Peer mean path delay: 0
Announce interval(log mean): 1
Sync interval(log mean): -2
Delay Mechanism: End to End
Cost: 255
Domain: 0
2024 Jan 4 19:27:05 N9K_Spine02 %PTP-2-PTP_GM_CHANGE: Grandmaster clock has changed from 00:ee:ab:ff:fe:67:37:e9 to c0:14:fe:ff:fe:a3:c4:67 for the PTP protocol
show system internal ptp info announce-pkts
2024 Jan 04 19:27:07.408293: E_PTP_ANN_PKT_EV[RX] I/f Eth1/48 (0x1a005e00): MSG:Announce TS:0 V:2 LEN:64 D:0 UC:0 2S:0 UTCVAL:0 PTPTS:1 TT:0 FT:0 SRC:4c:77:6d:ff:fe:d5:35:35-0xbd CORR:0 (0x0) SEQ:3673 (13939) Int:1; TS:0 s 0 ns; UTC_OFF:37 TM_SRC:a0 STEP:2 PRIO1:1 PRIO2:1 CLASS:248 ACC:fe LOG_VAR:ffff GM:00:ee:ab:ff:fe:67:37:e9 2024 Jan 04 19:27:06.321569: E_PTP_ANN_PKT_EV[RX] I/f Eth1/50 (0x1a006200): MSG:Announce TS:0 V:2 LEN:64 D:0 UC:0 2S:0 UTCVAL:0 PTPTS:1 TT:0 FT:0 SRC:c0:14:fe:ff:fe:a3:c4:67-0xc9 CORR:0 (0x0) SEQ:0005 (5) Int:1; TS:0 s 0 ns; UTC_OFF:37 TM_SRC:a0 STEP:0 PRIO1:0 PRIO2:1 CLASS:248 ACC:fe LOG_VAR:ffff GM:c0:14:fe:ff:fe:a3:c4:67 2024 Jan 04 19:27:05.427431: E_PTP_ANN_PKT_EV[RX] I/f Eth1/53 (0x1a006800): MSG:Announce TS:0 V:2 LEN:64 D:0 UC:0 2S:0 UTCVAL:0 PTPTS:1 TT:0 FT:0 SRC:00:ee:ab:ff:fe:67:3e:9d-0x81 CORR:0 (0x0) SEQ:3593 (13715) Int:1; TS:0 s 0 ns; UTC_OFF:37 TM_SRC:a0 STEP:1 PRIO1:1 PRIO2:1 CLASS:248 ACC:fe LOG_VAR:ffff GM:00:ee:ab:ff:fe:67:37:e9 2024 Jan 04 19:27:05.407196: E_PTP_ANN_PKT_EV[RX] I/f Eth1/48 (0x1a005e00): MSG:Announce TS:0 V:2 LEN:64 D:0 UC:0 2S:0 UTCVAL:0 PTPTS:1 TT:0 FT:0 SRC:4c:77:6d:ff:fe:d5:35:35-0xbd CORR:0 (0x0) SEQ:3672 (13938) Int:1; TS:0 s 0 ns; UTC_OFF:37 TM_SRC:a0 STEP:2 PRIO1:1 PRIO2:1 CLASS:248 ACC:fe LOG_VAR:ffff GM:00:ee:ab:ff:fe:67:37:e9 2024 Jan 04 19:27:04.822821: E_PTP_ANN_PKT_EV[TX] I/f Eth1/50 (0x1a006200): MSG:Announce TS:0 V:2 LEN:64 D:0 UC:0 2S:0 UTCVAL:0 PTPTS:1 TT:0 FT:0 SRC:c0:14:fe:ff:fe:89:9b:77-0xc4 CORR:0 (0x0) SEQ:0506 (1286) Int:1; TS:0 s 0 ns; UTC_OFF:37 TM_SRC:a0 STEP:2 PRIO1:1 PRIO2:1 CLASS:248 ACC:fe LOG_VAR:ffff GM:00:ee:ab:ff:fe:67:37:e9
由于缺乏数据,随机错误更正可能很难进行分析。Nexus 9000提供自动日志功能,可在后端捕获PTP日志,而不会影响性能。
1.识别错误更正。
N9K_Spine02# show system internal ptp bad-corrections entries 2000 ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Slave Port SUP Time Correction(ns) MeanPath Delay(ns) MasterTimestamp (sec, nsec) Slave Timestamp (sec, nsec) Sync-SeqID PTPLC ts_corr(ns)
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Eth1/48 Thu Jan 4 18:41:07 2024 140073 19167640 172 1704364867 151916416 1704364867 132748948 28473 0 Eth1/48 Thu Jan 4 18:41:06 2024 889689 19167624 172 1704364866 901509720 1704364866 882342268 28472 0 Eth1/48 Thu Jan 4 18:41:06 2024 634900 19167604 172 1704364866 651177596 1704364866 632010164 28471 0 Eth1/48 Thu Jan 4 18:41:06 2024 386534 19167636 172 1704364866 399944588 1704364866 380777124 28470 0 Eth1/48 Thu Jan 4 18:41:05 2024 732409 425695900 172 1704364866 148959160 1704364865 723263432 28469 0 Eth1/48 Thu Jan 4 18:41:05 2024 480431 425695932 172 1704364865 898386456 1704364865 472690696 28468 0 Eth1/48 Thu Jan 4 18:41:05 2024 225514 425695908 172 1704364865 647736096 1704364865 222040360 28467 0 Eth1/48 Thu Jan 4 18:41:04 2024 977564 425695924 172 1704364865 396727464 1704364864 971031712 28466 0
2.启用PTP自动日志
test system internal ptp auto-log correction-limit 10000 >> Set a threshold of correction to trigger if the switch starts log collection. In this case, it’s 10000ns
test system internal ptp auto-log file-max-count 5 >> Maximum Auto-log files quantity
no test system internal ptp auto-log file-rollover >> Disable auto-log rollover
test system internal ptp auto-log >> Start auto-log in backend
3.如果发生PTP错误更正,将在bootflash中创建PTP日志。
N9K_Spine02# dir bootflash:
4096 Jan 04 19:57:44 2024 ptp_autolog/
N9K_Spine02# dir ptp_autolog
1115095 Jan 04 19:27:06 2024 auto_ptp_dbg_log_1.log
1099741 Jan 04 19:57:43 2024 auto_ptp_dbg_log_2.log
53631 Jan 04 19:57:43 2024 auto_ptp_dbg_log_3.log
87478 Jan 04 19:57:44 2024 auto_ptp_dbg_log_4.log
在此文件中,可以找到T1-T4以执行计算。
19:26:56 056993 ptp_calc_mean_path_delay t1/m sec 1704367616 ns 54142980 t2/s sec 1704367616 ns 54143180 t3/ds sec 1704367616 ns 54888476 t4/dm sec 1704367616 ns 54888676 diff corr 0 ns
19:26:57 060081 ptp_calc_mean_path_delay t1/m sec 1704367617 ns 56716444 t2/s sec 1704367617 ns 56716636 t3/ds sec 1704367617 ns 57466060 t4/dm sec 1704367617 ns 57466284 diff corr 0 ns
19:26:58 062591 ptp_calc_mean_path_delay t1/m sec 1704367618 ns 59552956 t2/s sec 1704367618 ns 59553164 t3/ds sec 1704367618 ns 60248804 t4/dm sec 1704367618 ns 60249012 diff corr 0 ns
19:26:59 061974 ptp_calc_mean_path_delay t1/m sec 1704367619 ns 61891376 t2/s sec 1704367619 ns 61891632 t3/ds sec 1704367619 ns 62503968 t4/dm sec 1704367619 ns 62504128 diff corr 0 ns
如果PTP端口在RX(接收)路径端遇到消息交换问题,则该端口会变为主状态。
master
加。N9K_Spine01# show ptp counters all PTP Packet Counters of Interface Eth1/31: ---------------------------------------------------------------- Packet Type TX RX ---------------- -------------------- -------------------- Announce 0 3 Sync 0 21 FollowUp 0 21 Delay Request 5 0 Delay Response 0 5
N9K_Spine01# show system internal access-list sup-redirect-stats | in PTP|Slice Instance: 0 [Unit: 0 Slice: 0] 3118 PTP EVENT REDIRECT 3358695 3119 ETH PTP EVENT TX TIMESTAMP 0 3120 PTP EVENT TX TIMESTAMP 5046146 3167 PTP MSG REDIRECT 3088156 3183 PTP UNICAST MSG REDIRECT 0 3184 PTP UNICAST EVENT REDIRECT 0 Instance: 1 [Unit: 0 Slice: 1] 3118 PTP EVENT REDIRECT 0 3119 ETH PTP EVENT TX TIMESTAMP 0 3120 PTP EVENT TX TIMESTAMP 0 3167 PTP MSG REDIRECT 0 3183 PTP UNICAST MSG REDIRECT 0 3184 PTP UNICAST EVENT REDIRECT 0
N9K_Spine01# show policy-map interface control-plane class copp-system-p-class-redirect Service-policy input: copp-system-p-policy-strict class-map copp-system-p-class-redirect (match-any) match access-group name copp-system-p-acl-ptp match access-group name copp-system-p-acl-ptp-l2 match access-group name copp-system-p-acl-ptp-uc set cos 1 police cir 280 kbps , bc 32000 bytes module 1 : transmitted 875343860 bytes; 5-minute offered rate 1650 bytes/sec conformed 1932 peak-rate bytes/sec at Thu Jan 04 22:08:20 2024 dropped 0 bytes; >>>> Check if any counter increasing 5-min violate rate 0 byte/sec violated 0 peak-rate byte/sec
master
,即使收件人配置错误或祖母意外连接到此端口下也是如此:interface Ethernet1/1 ptp multicast master-only
master
。版本 | 发布日期 | 备注 |
---|---|---|
1.0 |
07-Feb-2024 |
初始版本 |