示例客户端配置
根据您和您的客户使用的Equinix Precision Time服务类型,需要各种 PTP 和 NTP 客户端配置设置。
Equinix PTP 服务配置
| Configuration Parameter | Equinix Provided Configurations | Tool Tip |
|---|---|---|
| Domain | 30 | PTP domain is a network, or portion of a network, within which PTP operates. Within this network, all the clocks are in sync. |
| Log Announce Interval | 1 | Logarithmic value that controls the rate of PTP Announce packets from the PTP time server. Default is 1 (1 packet every 2 seconds). |
| Log Delayreq Interval | -4 | Logarithmic value that controls the rate of PTP DelayReq packets. Default is -4 (16 packets per second). |
| Log Sync Interval | -4 | Logarithmic value that controls the rate of PTP Sync packets. Default is -4 (16 packets per second). |
| Priority1 | 128 | Lower value indicates higher priority. |
| Priority2 | 128 | Lower value indicates higher priority. |
| Clock Class | 13 | Value that indicates the timescale which delivers UTC timestamps (set by default). |
| Clock Accuracy | 23 | Value that indicates how accurate the source is to UTC time. Equinix Time sources are accurate up to 1µs from UTC (set by default). |
配置样本
这些部分包含 NTP 和 PTP 客户端的示例配置代码。这些值适用于默认的Precision TIme服务设置。
配置样本 - chronyd
server 192.168.1.21 iburst prefer
server 192.168.1.22 iburst prefer
driftfile /path/to/chrony/drift
makestep 1 3
rtcsync
logdir /path/to/log/directory
pidfile /path/to/chrony.pid
log measurements statistics tracking
配置样本 - ntpd
网络时间协议守护进程(ntpd)是用于NTP客户端设备的样本配置。
driftfile /var/lib/ntp/drift
restrict default nomodify notrap nopeer noquery
restrict 127.0.0.1
restrict ::1
server 192.168.1.21 iburst true
server 192.168.1.22 iburst true
includefile /etc/ntp/crypto/pw
keys /etc/ntp/keys
disable monitor
配置样本 - ptpd
同样,精确时间协议守护进程(tpd)维护系统时间,以便与使用PTP的时间服务器同步。
ptpengine:preset=slaveonly
ptpengine:domain=30
ptpengine:sync_outlier_filter_enable=y
ptpengine:delay_outlier_filter_enable=y
ptpengine:sync_stat_filter_enable=y
ptpengine:delay_stat_filter_enable=y
ptpengine:log_announce_interval=1
ptpengine:log_sync_interval=-4
ptpengine:log_delayreq_interval=-4
ptpengine:calibration_delay=20
ptpengine:hardware_timestamping=y
clock:allow_step_backwards=y
clock:allow_step_backwards_hw=y
global:log_status=y
global:status_file=/path/to/ptp.status
global:log_file=/path/to/ptp.log
global:log_statistics=y
global:statistics_log_interval=0
global:statistics_timestamp_format=both
global:statistics_update_interval=1
global:statistics_file=/path/to/ptp.statistics
global:lock_file=/path/to/ptp.pid
配置样本 - ptp4l
ptp4l工具是Linux的PTP的实现。
[global]
twoStepFlag 1
slaveOnly 0
priority1 128
priority2 128
domainNumber 30
logAnnounceInterval 1
logSyncInterval -4
logMinDelayReqInterval -4
tx_timestamp_timeout 100
logging_level 6
样品配置 - Arista 7050 边界时钟模式配置
这个Arista 7050工具是边界时钟的IEEE 1588 PTP的实现。如果你在客户端网络内使用Arista 7050的边界时钟模式,可以使用这个样本配置代码。
<< Enabling Global PTP configurations on the switch >>
ptp mode boundary
ptp domain 30
ptp source ip 172.16.100.9
<< Slave Port Specific Configuration>>
interface Ethernet47
description ECX::EQIX-EPT-SV5-CX-PRI-03
switchport mode trunk
ptp enable
ptp sync-message interval -4
ptp announce interval 0
ptp delay-req interval -4
ptp vlan 111
示例配置 – Arista 7150 边界时钟模式
这是一个类似的工具,用于Arista 7150。如果你在客户端网络内使用Arista 7150的边界时钟模式,可以使用这个样本配置代码。
<< Slave Port Specific Configuration>>
interface Port-Channel13
switchport trunk allowed vlan 13
switchport mode trunk
ptp enable
ptp sync-message interval -4
ptp announce interval 1
ptp delay-req interval -4
ptp vlan 13
interface Ethernet44
description reserved_PTP
switchport trunk allowed vlan 13
switchport mode trunk
channel-group 13 mode active
ptp enable
ptp vlan 13
<< Enabling Global PTP configurations on the switch >>
ptp domain 30
ptp source ip 10.100.1.209
ptp priority1 129
ptp mode boundary
配置样本 - 使用网络边缘的NTP over Anycast解决方案
有关通过任播配置网络边缘设备(包括路由器、防火墙和 NTP)的详细信息,请参阅任播用例。