配置环型组网的时钟同步示例
组网需求
如图7-3所示,在环型时钟同步网中各设备彼此相连。为保证整个时钟同步网的可靠性,DeviceA和DeviceC分别外接BITS引入时钟信号。网络部署时,各设备优先跟踪从DeviceA传递来的时钟信号,当DeviceA外接的BITS出现问题时整网会及时切换到跟踪DeviceC外接BITS输入的时钟信号。
为保证设备能跟踪到质量最好的时钟信号,在各设备上都配置了SSM级别参与时钟选源。
操作步骤
- 使能SSM级别参与时钟选源。
# 配置DeviceA
<HUAWEI> system-view [~HUAWEI] sysname DeviceA [*HUAWEI] commit [~DeviceA] clock ssm-control on [*DeviceA] commit
# 其他设备与DeviceA配置相同,此处不再赘述。
- 配置时钟参考源。
# 配置DeviceA
[*DeviceA] clock bits-type bits0 2mhz [*DeviceA] clock source bits0 priority 1 [*DeviceA] clock source bits0 ssm ssua [*DeviceA] commit [~DeviceA] quit [~DeviceA] interface gigabitethernet 0/1/0 [~DeviceA-GigabitEthernet0/1/0] clock synchronization enable [*DeviceA-GigabitEthernet0/1/0] clock priority 2 [*DeviceA-GigabitEthernet0/1/0] commit [~DeviceA-GigabitEthernet0/1/0] quit [~DeviceA] interface gigabitethernet 0/2/0 [*DeviceA-GigabitEthernet0/2/0] clock synchronization enable [*DeviceA-GigabitEthernet0/2/0] commit
# 配置DeviceB
[~DeviceB] interface gigabitethernet 0/1/0 [~DeviceB-GigabitEthernet0/1/0] clock synchronization enable [*DeviceB-GigabitEthernet0/1/0] clock priority 1 [*DeviceB-GigabitEthernet0/1/0] commit [~DeviceB-GigabitEthernet0/1/0] quit [~DeviceB] interface gigabitethernet 0/2/0 [*DeviceB-GigabitEthernet0/2/0] clock synchronization enable [*DeviceB-GigabitEthernet0/2/0] clock priority 2 [*DeviceB-GigabitEthernet0/2/0] commit
# DeviceD与DeviceB配置相同,此处不再赘述。
# 配置DeviceC
[*DeviceC] clock bits-type bits0 2mhz [*DeviceC] clock source bits0 synchronization enable [*DeviceC] clock source bits0 priority 1 [*DeviceC] clock source bits0 ssm sec [*DeviceC] commit [~DeviceC] quit [~DeviceC] interface gigabitethernet 0/1/0 [*DeviceC-GigabitEthernet0/1/0] clock synchronization enable [*DeviceC-GigabitEthernet0/1/0] commit [~DeviceC-GigabitEthernet0/1/0] quit [~DeviceC] interface gigabitethernet 0/2/0 [*DeviceC-GigabitEthernet0/2/0] clock synchronization enable [*DeviceC-GigabitEthernet0/2/0] clock priority 3 [*DeviceC-GigabitEthernet0/2/0] commit
- 验证配置结果
在DeviceA、DeviceB、DeviceC和DeviceD上分别执行display clock source命令,查看各设备上系统跟踪的时钟源以及各时钟参考源的状态信息。
#DeviceA上的检查结果。
<HUAWEI> display clock source System trace source State: lock mode into pull-in range Current system trace source: bits0 Current 2M-1 trace source: system PLL Frequency lock success: yes Master board Source Pri(sys/2m-1) In-SSM Out-SSM State Ref-Source -------------------------------------------------------------------------- bits0 1/--- ssua -- normal yes GE0/1/0 2/--- dnu ssua normal yes GE0/2/0 ---/--- dnu ssua normal yes
#DeviceB上的检查结果。
<HUAWEI> display clock source System trace source State: lock mode into pull-in range Current system trace source: GigabitEthernet0/1/0 Current 2M-1 trace source: system PLL Frequency lock success: yes Master board Source Pri(sys/2m-1) In-SSM Out-SSM State Ref-Source -------------------------------------------------------------------------- GE0/1/0 1/--- ssua dnu normal yes GE0/2/0 2/--- ssua ssua normal yes
#DeviceC上的检查结果。
<HUAWEI> display clock source System trace source State: lock mode into pull-in range Current system trace source: GigabitEthernet0/2/0 Current 2M-1 trace source: system PLL Frequency lock success: yes Master board Source Pri(sys/2m-1) In-SSM Out-SSM State Ref-Source -------------------------------------------------------------------------- bits0 1/--- sec -- normal yes GE0/1/0 ---/--- ssua dnu normal yes GE0/2/0 3/--- ssua ssua normal yes
#DeviceD上的检查结果。
<HUAWEI> display clock source System trace source State: lock mode into pull-in range Current system trace source: GigabitEthernet0/2/0 Current 2M-1 trace source: system PLL Frequency lock success: yes Master board Source Pri(sys/2m-1) In-SSM Out-SSM State Ref-Source -------------------------------------------------------------------------- GE0/1/0 1/--- dnu ssua normal yes GE0/2/0 2/--- ssua dnu normal yes
- 修改DeviceA上BITS0的时钟信号类型,在DeviceA、DeviceB、DeviceC和DeviceD上分别执行display clock source命令,查看各设备上系统跟踪的时钟源以及各时钟参考源的状态信息。
[*DeviceA] clock bits-type bits0 2mbps [*DeviceA] commit
# 在DeviceA上执行display clock source命令,查看到DeviceA已跟踪从DeviceC传递过来的时钟信号。
<HUAWEI> display clock source System trace source State: lock mode into pull-in range Current system trace source: GigabitEthernet0/1/0 Current 2M-1 trace source: system PLL Frequency lock success: yes Master board Source Pri(sys/2m-1) In-SSM Out-SSM State Ref-Source -------------------------------------------------------------------------- bits0 1/--- ssua sec abnormal yes GE0/1/0 2/--- sec dnu normal yes GE0/2/0 ---/--- sec sec normal yes
# 在DeviceB上执行display clock source命令,查看到DeviceB已跟踪从DeviceC传递过来的时钟信号。
<HUAWEI> display clock source System trace source State: lock mode into pull-in range Current system trace source: GigabitEthernet0/2/0 Current 2M-1 trace source: system PLL Frequency lock success: yes Master board Source Pri(sys/2m-1) In-SSM Out-SSM State Ref-Source -------------------------------------------------------------------------- GE0/1/0 1/--- dnu sec normal yes GE0/2/0 2/--- sec dnu normal yes
# 在DeviceC上执行display clock source命令,查看到DeviceC已跟踪外接BITS的时钟信号。
<HUAWEI> display clock source System trace source State: lock mode into pull-in range Current system trace source: bits0 Current 2M-1 trace source: system PLL Frequency lock success: yes Master board Source Pri(sys/2m-1) In-SSM Out-SSM State Ref-Source -------------------------------------------------------------------------- bits0 1/--- sec -- normal yes GE0/1/0 ---/--- dnu sec normal yes GE0/2/0 3/--- dnu sec normal yes
# 在DeviceD上执行display clock source命令,查看到DeviceD已跟踪从DeviceC传递过来的时钟信号。
<HUAWEI> display clock source System trace source State: lock mode into pull-in range Current system trace source: GigabitEthernet0/1/0 Current 2M-1 trace source: system PLL Frequency lock success: yes Master board Source Pri(sys/2m-1) In-SSM Out-SSM State Ref-Source -------------------------------------------------------------------------- GE0/1/0 1/--- sec dnu normal yes GE0/2/0 2/--- sec sec normal yes
配置文件
DeviceA的配置文件
# sysname DeviceA # clock ssm-control on clock bits-type bits0 2mhz clock source bits0 synchronization enable clock source bits0 priority 1 clock source bits0 ssm ssua # interface GigabitEthernet0/1/0 clock synchronization enable clock priority 2 # interface GigabitEthernet0/2/0 clock synchronization enable # return
DeviceB的配置文件
# sysname DeviceB # clock ssm-control on # interface GigabitEthernet0/1/0 clock synchronization enable clock priority 1 # interface GigabitEthernet0/2/0 clock synchronization enable clock priority 2 # return
DeviceC的配置文件
# sysname DeviceC # clock ssm-control on clock bits-type bits0 2mhz clock source bits0 synchronization enable clock source bits0 priority 1 clock source bits0 ssm sec # interface GigabitEthernet0/1/0 clock synchronization enable # interface GigabitEthernet0/2/0 clock synchronization enable clock priority 3 # return
DeviceD的配置文件
# sysname DeviceD # clock ssm-control on # interface GigabitEthernet0/1/0 clock synchronization enable clock priority 1 # interface GigabitEthernet0/2/0 clock synchronization enable clock priority 2 # return