本页内容
PTP 无源端口性能监控
PTP 无源端口监控是指在不主动参与 timeTransmitter-timeReceiver 交换的情况下,使用精确时间协议 (PTP) 设备中的无源端口来监控同步性能的机制。PTP 设备上的无源端口在 仅测量模式下 运行,以观察时序性能,而无需主动参与同步。它接收计时消息,将偏移量与活动 timeReceiver 端口进行比较,并帮助验证计时路径和检测异常情况。此方法通常在ITU-T G.8275.1附录G中定义,用于在切换到备用路径之前调配新定时源、持续性能监控和安全检查。
精确时间协议 (PTP) 无源端口性能监控功能可在受支持设备上的状态端口上启用(根据 G.8275.1 附录 G)。PTP 无源端口性能监控功能:
- 用于监控无源端口上的 PTP 性能。无源端口状态在 ITU-T-G.8275.1 规范中定义。
-
状态
not-master端口支持和measure-only按 PTP 端口属性。 -
最多可配置四个端口(包括一个活动成员端口)。
-
支持无源端口的可配置延迟请求速率。
-
当性能指标超过配置的阈值时,支持 PTP 无源端口次要报警。
-
在 PTP 选定活动接口上的 LAG 接口上受支持。主链路或辅助链路的源端口相同,因为端口号属于聚合以太网 (AE) 接口。
PTP 性能监控支持以下告警:
| 警报 | 原因 | 类型 | 提高条件 | 清除条件 |
|---|---|---|---|---|
| ALARM_REASON_PTP_PHASE_ DIFFERENCE_THRESHOLD_ EXCEEDED_PTP |
PTP 相位差测量超过为受监控端口配置的阈值 | 次要接口报警 | 当受监控接口的测量相位差在 15 分钟内 |
当受监控接口上测得的相位差在 15 分钟内低于配置的阈值,并且配置 |
限制:
• PTP FPGA 模式下不支持主模式下的两步时钟。
• 某些平台不支持采用 MACSec 加密的 PTP。
配置 PTP 无源端口性能监控
要快速配置此示例,请复制以下命令,将其粘贴到文本文件中,移除所有换行符,更改任何必要的详细信息以匹配您的网络配置,然后将命令复制粘贴到 [edit] 层级的 CLI 中。
-
set protocols ptp performance-monitor passive-port配置以启用 PTP 无源端口性能监控功能。user@root> set protocols ptp performance-monitor passive-port
-
set protocols ptp performance-monitor passive-port delay-request-rate <delay-request-value>配置为设置端口监控的延迟请求速率。此配置用于在 15 分钟间隔内测得的相位误差超过阈值时发出 PTP 性能告警。
默认值为 -4,值范围从-40到 。例如,user@root> set protocols ptp performance-monitor passive-port delay-request-rate -4
要为有状态接口配置 PTP 无源端口性能监控,请使用
例如,set protocols ptp stateful interface <interface-name> passive-port-monitor命令。它将接口端口设置为监控模式。现在,当端口进入被动状态时,会对其进行监控。此命令仅支持组播模式。user@root> set protocols ptp stateful interface 1 passive-port-monitor
-
例如,set protocols ptp stateful interface interface-name passive-port-monitor maximum-phase-offset-threshold <offset-threshold-value>用于设置接口 PTP 无源端口性能监控最大相位偏移阈值。此配置用于在 15 分钟间隔内测得的相位误差超过阈值时发出 PTP 性能告警。该值以纳秒为单位定义,范围为 0 到 100000000。默认值为 100 毫秒。user@root> set protocols stateful interface et-0/0/34 passive-port-monitor maximum-phase-offset-threshold 10000
-
用于
set protocols ptp stateful interface interface–-name not–master为有状态端口配置not-master每个 PTP 端口属性。这确保端口永远不会处于 timeTransmitter 状态,而是可以放置在无源或成员状态。此配置独立于无源端口监控功能,仅支持组播模式。例如:user@root> set protocols stateful interface et-0/0/34 not-master
用于
set protocols ptp stateful interface interface–name passive-port-monitor measure-only将状态端口配置为measure-only。这可以确保端口永远不会置于 timeTransmitter 或成员状态,而是可以置于无源状态。此配置独立于not-master配置,仅支持组播模式。user@root> set protocols stateful interface et-0/0/34 passive-port-monitor measure-only
结果
使用 and show ptp global-information show ptp port 命令检查配置结果。例如:
-
show ptp global-information启用 PTP 无源端口性能监控时的输出:user@root> show ptp global-information PTP Global Configuration: Domain number : 24 Clock mode : Boundary Profile type : G.8275.1 Priority Level1 : 128 Priority Level2 : 128 Local Priority : 128 Path Trace : Disabled Unicast Negotiation : Disabled ESMC QL From Clock Class: Disabled Clock Class/ESMC QL : - SNMP Trap Status : Disabled PHY Time Stamping : Enabled UTC Leap Seconds : 37 Transparent-clock-config : DISABLED Transparent-clock-status : N/A PPM Status : ENABLED PPM Delay Request Interval : -4 (16 packets per second) Slave Parameters: Sync Interval : <not applicable> Delay Request Interval: -4 (16 packets per second) Announce Interval : <not applicable> Announce Timeout : 3 Grant Duration : <not applicable> Master Parameters: Sync Interval : -4 (16 packets per second) Announce Interval : -3 (8 packets per second) Delay Request Timeout : <not applicable> Clock Step : one-step Arbitrary Mode : FALSE Number of Slaves : 0 Number of Masters : 1 Number of Stateful : 1
-
show ptp port命令输出,measure-onlynot-master并在启用了 PTP 无源端口性能监控的状态端口上进行配置。user@root> show ptp port PTP port-data: Local Interface : et-0/0/16:1.0 Local Address : e4:5d:37:4e:c8:19 Remote Address : 01:1b:19:00:00:00 Clock Stream : 5 Clock Identity : e4:5d:37:ff:fe:4e:d7:76 Port State : Passive Delay Req Interval: -4 Announce Interval : -3 Announce Timeout : 3 Sync Interval : -4 Delay Mechanism : End-to-end Port Number : 2 Operating Mode : Stateful, Not-master, Measure-only Local Priority : 128
监控
使用以下命令监控无源端口性能。
-
show ptp passive-port-monitor-status注意:启用监控后,在端口转换为无源状态以接收准确读数后,至少允许 两个测量周期 使数据稳定。
启用 PTP 无源端口性能监控并配置为非主端口的示例输出如下所示:
user@root> show ptp passive-port-monitor-status PPM Status : ENABLED PPM Delay Request Interval : -4 (16 packets per second) Actively Monitored-PTP ports data: Local Interface : ae0.4094 (et-4/0/0, primary) Clock Stream : 5 Source-Port-ID : 00:cc:34:ff:fe:77:c4:57 Port : 5 Destination-Port-ID : 00:cc:34:ff:fe:77:c8:de Port : 1 Port State : Passive Operating Mode : Stateful PhaseOffsetThreshold(ns) : 100000 Configured role : Not-master Measurement-status : Valid Latest measurement data : Timestamp : Aug 20 22:26:16 PhaseOffsetFromMaster(ns): 15 / 17 / 791 (min/mean/max) Master->slave delay(ns) : 0 / 1575 / 1584 (min/mean/max) Slave->master delay(ns) : 0 / 1540 / 1582 (min/mean/max) Mean-path-delay(ns) : 1557 (mean)