In a manycast domain, the device with the most precise clock is specified as the NTP server. Clocks on other devices synchronize with the clock on the NTP server.
Before the configuration, ensure that the time zone of the client is the same as that of the server. If they are inconsistent, run the clock timezone time-zone-name { add | minus } offset command to adjust the time zone.
As shown in Figure 1,
FW_C and FW_D are in the same network segment; FW_A is in another network segment; FW_F connects with the two network segments.
FW_C functions as an NTP manycast server and its local clock is a primary clock with the stratum 2. Manycast packets are sent out from GigabitEthernet 0/0/2.
FW_D and FW_A are manycast clients and send packets on their respective GigabitEthernet 0/0/2.
The configuration roadmap is as follows:
Configure FW_C as an NTP manycast server.
Configure FW_A and FW_D as NTP manycast clients.
# Set the local clock on FW_C as an NTP primary clock with stratum 2.
<FW_C> system-view [FW_C] ntp-service refclock-master 2
# Enable the NTP server function.
[FW_C] undo ntp-service server disable
# Configure FW_C to be an NTP manycast server. NTP manycast server sends NTP manycast packets after receiving manycast client packets.
[FW_C] interface GigabitEthernet 0/0/2 [FW_C-GigabitEthernet 0/0/2] ntp-service manycast-server
# Configure FW_D to be an NTP manycast client. FW_D sends NTP manycast packets to manycast server on GigabitEthernet 0/0/2.
<FW_D> system-view [FW_D] interface GigabitEthernet 0/0/2 [FW_D-GigabitEthernet 0/0/2] ntp-service manycast-client
# Configure FW_A to be an NTP manycast client. FW_A sends NTP manycast packets to manycast server on GigabitEthernet 0/0/2.
<FW_A> system-view [FW_A] interface GigabitEthernet 0/0/2 [FW_A-GigabitEthernet 0/0/2] ntp-service manycast-client
After the configuration is complete, the clock on FW_ A and FW_D can be synchronized with the clock on FW_C.
Check the NTP status on FW_D and you can find that the clock status is "synchronized". That is, clock synchronization completes. The stratum of the clock on FW_D is 3, one stratum lower than that on FW_C.
[FW_D] display ntp-service status
clock status: synchronized
clock stratum: 3
reference clock ID: 10.1.1.2
nominal frequency: 60.0002 Hz
actual frequency: 60.0002 Hz
clock precision: 2^18
clock offset: 0.66 ms
root delay: 24.47 ms
root dispersion: 208.39 ms
peer dispersion: 9.63 ms
reference time: 17:03:32.022 UTC Apr 25 2005(C61734FD.800303C0)
synchronization state: spike (clock will be set in 1010 secs)
Configuration script of FW_A
# sysname FW_A # interface GigabitEthernet 0/0/2 undo shutdown ip address 10.0.1.1 255.255.255.0 ntp-service manycast-client # return
Configuration script of FW_C
# sysname FW_C # ntp-service refclock-master 2 undo ntp-service server disable # interface GigabitEthernet 0/0/2 undo shutdown ip address 10.1.1.2 255.255.255.0 ntp-service manycast-server # return
Configuration script of FW_D
# sysname FW_D # interface GigabitEthernet 0/0/2 undo shutdown ip address 10.1.1.3 255.255.255.0 ntp-service manycast-client # return