华为设备配置NTP对等体模式_华为

1.配置基本的IP地址和连通性

[LSW1]vlan batch 10

[LSW1-Vlanif10]ip add 10.1.1.1 24

[LSW1-GigabitEthernet0/0/1]port link-type hybrid

[LSW1-GigabitEthernet0/0/1]port hybrid untagged vlan 10

[LSW1-GigabitEthernet0/0/1]port hybrid pvid vlan 10

[LSW2]vlan batch 10

[LSW2-Vlanif10]ip add 10.1.1.2 24

[LSW2-GigabitEthernet0/0/1]port link-type hybrid

[LSW2-GigabitEthernet0/0/1]port hybrid untagged vlan 10

[LSW2-GigabitEthernet0/0/1]port hybrid pvid vlan 10

[LSW3]vlan batch 10

[LSW3-Vlanif10]ip address 10.1.1.3 24

[LSW3-GigabitEthernet0/0/1]port link-type hybrid

[LSW3-GigabitEthernet0/0/1]port hybrid untagged vlan 10

[LSW3-GigabitEthernet0/0/1]port hybrid pvid vlan 10

[LSW4]vlan batch 10

[LSW4-Ethernet0/0/1]port link-type hybrid

[LSW4-Ethernet0/0/1]port hybrid untagged vlan 10

[LSW4-Ethernet0/0/1]port hybrid pvid vlan 10

[LSW4-Ethernet0/0/2]port link-type hybrid

[LSW4-Ethernet0/0/2]port hybrid pvid vlan 10

[LSW4-Ethernet0/0/2]port hybrid untagged vlan 10

[LSW4-Ethernet0/0/3]port link-type hybrid

[LSW4-Ethernet0/0/3]port hybrid untagged vlan 10

[LSW4-Ethernet0/0/3]port hybrid pvid vlan 10

2. 配置NTP客户端/服务器模式

[LSW1]ntp-service refclock-master 2 //将LSW1的本地时钟设为NTP主时钟,层数为2

[LSW2]ntp-service unicast-server 10.1.1.1 //在LSW2上指定LSW1作为LSW2的NTP服务器

3. 配置NTP对等体模式

[LSW3]ntp-service unicast-peer 10.1.1.2 //在LSW3上指定LSW2作为自己的被动对等体

4.验证配置:LSW2和LSW3已经完成同步​

华为设备配置NTP对等体模式_华为_02

华为设备配置NTP对等体模式_对等体模式_03