SW2:
sys
System View: return to User View with Ctrl+Z.
[H3C]sysname SW2
[SW2]vlan 10
[SW2-vlan10]quit
[SW2]int vlan 10
[SW2-Vlan-interface10]ip address 10.0.0.1 24
[SW2-Vlan-interface10]quit
[SW2]ip route-static 0.0.0.0 0.0.0.0 10.0.0.2
[SW2]int gi 1/0/1
[SW2-GigabitEthernet1/0/1]port link-type access
[SW2-GigabitEthernet1/0/1]port access vlan 10
[SW2-GigabitEthernet1/0/1]quit
SW2 NTP关键配置点:
[SW2]clock protocol ntp
[SW2]ntp-service enable
[SW2]int vlan 10
[SW2-Vlan-interface10]ntp-service multicast-client
[SW2-Vlan-interface10]quit
SW1:
sys
[H3C]sysname SW1
[SW1]vlan 10
[SW1-vlan10]quit
[SW1]int vlan 10
[SW1-Vlan-interface10]ip address 10.0.0.2 24
[SW1-Vlan-interface10]quit
[SW1]ip route-static 0.0.0.0 0.0.0.0 10.0.0.1
[SW1]int gi 1/0/1
[SW1-GigabitEthernet1/0/1]port link-type access
[SW1-GigabitEthernet1/0/1]port access vlan 10
[SW1-GigabitEthernet1/0/1]quit
SW1 NTP关键配置点:
[SW1]clock protocol ntp
[SW1]ntp-service enable
[SW1]ntp-service unicast-peer 10.0.0.1 source Vlan-interface 10
[SW1]ntp-service refclock-master 2
[SW1]int vlan 10
[SW1-Vlan-interface10]ntp-service multicast-server
[SW1-Vlan-interface10]quit
分别查看SW2和SW1的NTP显示信息: