本產品的文件集力求使用無偏見用語。針對本文件集的目的,無偏見係定義為未根據年齡、身心障礙、性別、種族身分、民族身分、性別傾向、社會經濟地位及交織性表示歧視的用語。由於本產品軟體使用者介面中硬式編碼的語言、根據 RFP 文件使用的語言,或引用第三方產品的語言,因此本文件中可能會出現例外狀況。深入瞭解思科如何使用包容性用語。
思科已使用電腦和人工技術翻譯本文件,讓全世界的使用者能夠以自己的語言理解支援內容。請注意,即使是最佳機器翻譯,也不如專業譯者翻譯的內容準確。Cisco Systems, Inc. 對這些翻譯的準確度概不負責,並建議一律查看原始英文文件(提供連結)。
本檔案 d說明 如何對Nexus 9000交換機上的Precision時間協定(PTP)進行故障排除。
思科建議您瞭解以下主題:
本文不涉及PTP(Precision Time Protocol)協定的設計和配置。如需此類資訊,建議您參閱組態設定指南。
適用於Cisco Nexus儀表板見解的Precision時間協定(PTP)
本文件所述內容不限於特定軟體和硬體版本。
本文中的資訊係根據以下軟體和硬體版本:
本文中的資訊是根據特定實驗室環境內的裝置所建立。文中使用到的所有裝置皆從已清除(預設)的組態來啟動。如果您的網路運作中,請確保您瞭解任何指令可能造成的影響。
要使PTP正常工作,必須使用最新的SUP和線卡FPGA版本。有關升級FPGA的資訊,請訪問版本說明(Release Notes)登入頁轉到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域選擇主時鐘。它在普通時鐘和邊界時鐘的每個埠本地運行,將本地資料集與從通告消息接收的資料進行比較,以選擇鏈路上的最佳時鐘。
Announce消息用於建立同步層次結構。
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表示true |
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 |
初始版本 |