NTP broadcast mode configuration example
Network requirements
As shown in Figure 39, Switch C functions as the NTP server for multiple devices on a network segment and synchronizes the time among multiple devices.
Configure Switch C's local clock as a reference source, with stratum level 2.
Configure Switch C to operate in broadcast server mode and send broadcast messages from VLAN-interface 2.
Configure Switch A and Switch B to operate in broadcast client mode, and listen to broadcast messages through VLAN-interface 2.
Figure 39: Network diagram
Configuration procedure
Assign an IP address to each interface, and make sure Switch A, Switch B, and Switch C can reach each other, as shown in Figure 39. (Details not shown.)
Configure Switch C:
# Enable the NTP service.
<SwitchC> system-view [SwitchC] ntp-service enable
# Specify the local clock as the reference source, with stratum level 2.
[SwitchC] ntp-service refclock-master 2
# Configure Switch C to operate in broadcast server mode and send broadcast messages through VLAN-interface 2.
[SwitchC] interface vlan-interface 2 [SwitchC-Vlan-interface2] ntp-service broadcast-server
Configure Switch A:
# Enable the NTP service.
<SwitchA> system-view [SwitchA] ntp-service enable
# Configure Switch A to operate in broadcast client mode and receive broadcast messages on VLAN-interface 2.
[SwitchA] interface vlan-interface 2 [SwitchA-Vlan-interface2] ntp-service broadcast-client
Configure Switch B:
# Enable the NTP service.
<SwitchB> system-view [SwitchB] ntp-service enable
# Configure Switch B to operate in broadcast client mode and receive broadcast messages on VLAN-interface 2.
[SwitchB] interface vlan-interface 2 [SwitchB-Vlan-interface2] ntp-service broadcast-client
Verify the configuration:
# Verify that Switch A has synchronized to Switch C, and the clock stratum level is 3 on Switch A and 2 on Switch C.
[SwitchA-Vlan-interface2] display ntp-service status Clock status: synchronized Clock stratum: 3 System peer: 3.0.1.31 Local mode: bclient Reference clock ID: 3.0.1.31 Leap indicator: 00 Clock jitter: 0.044281 s Stability: 0.000 pps Clock precision: 2^-18 Root delay: 0.00229 ms Root dispersion: 4.12572 ms Reference time: d0d289fe.ec43c720 Sat, Jan 8 2011 7:00:14.922
# Verify that an IPv4 NTP association has been established between Switch A and Switch C.
[SwitchA-Vlan-interface2] display ntp-service sessions source reference stra reach poll now offset delay disper ******************************************************************************** [1245]3.0.1.31 127.127.1.0 2 1 64 519 -0.0 0.0022 4.1257 Notes: 1 source(master),2 source(peer),3 selected,4 candidate,5 configured. Total sessions: 1