Example for Configuring the Manycast Mode
Networking Requirements
As shown in Figure 5-5:
DeviceC and DeviceD are in the same network segment; DeviceA is in another network segment; DeviceF connects with the two network segments.
DeviceC functions as an NTP manycast server and its local clock is a master clock with the stratum 2. Manycast packets are sent out from GE1/0/0.
DeviceD and DeviceA are manycast clients and send packets on their respective GE1/0/0.
Interfaces 1 and Interface 2 in this example are GE 1/0/0 and GE 2/0/0 respectively.
Precautions
Ensure manycast client is reachable to the manycast server before synchronization. This can be checked using ping command on the console interface.
Configuration Roadmap
The configuration roadmap is as follows:
Configure DeviceC as an NTP manycast server.
Configure DeviceA and DeviceD as NTP manycast clients.
Enable multicast for Device F.
Data Preparation
To complete the configuration, you need the following data:
IP addresses of DeviceA, DeviceC, DeviceD, and DeviceF and unicast routing protocol
Stratum of the NTP master clock
Procedure
- Configure an IP address for each router.
Configure IP addresses based on Figure 5-5. The detailed procedures are not mentioned here.
- Configure an NTP manycast server.
# Set the local clock on DeviceC as an NTP master clock with stratum 2.
<DeviceC> system-view
[~DeviceC] undo ntp-service server disable [~DeviceC] ntp-service refclock-master 2
# Configure DeviceC to be an NTP manycast server. NTP manycast server sends NTP manycast packets after receiving manycast client packets.
[*DeviceC] interface gigabitethernet 1/0/0
[*DeviceC-GigabitEthernet1/0/0] ntp-service manycast-server
[*DeviceC-GigabitEthernet1/0/0] commit
- Configure DeviceD.
# Configure DeviceD to be an NTP manycast client. DeviceD sends NTP manycast packets to manycast server on GE1/0/0.
<DeviceD> system-view
[~DeviceD] undo ntp-service server disable [~DeviceD] interface gigabitethernet 1/0/0
[~DeviceD-GigabitEthernet1/0/0] ntp-service manycast-client
[*DeviceD-GigabitEthernet1/0/0] commit
- Configure DeviceA.
# Configure DeviceA to be an NTP manycast client. DeviceA sends NTP manycast packets to manycast server on GE1/0/0.
<DeviceA> system-view
[~DeviceA] undo ntp-service server disable [~DeviceA] interface gigabitethernet 1/0/0
[~DeviceA-GigabitEthernet1/0/0] ntp-service manycast-client
[*DeviceA-GigabitEthernet1/0/0] commit
- Enable multicast for Device F.
<DeviceF> system-view
[~DeviceF] undo ntp-service server disable [~DeviceF] multicast routing-enable
[*DeviceF] commit
[~DeviceF] interface gigabitethernet 2/0/0
[~DeviceF-GigabitEthernet2/0/0] pim sim
[~DeviceF-GigabitEthernet2/0/0] igmp enable
[~DeviceF-GigabitEthernet2/0/0] igmp static-group 224.0.1.1
[*DeviceF-GigabitEthernet2/0/0] commit
[~DeviceF-GigabitEthernet2/0/0] quit
[~DeviceF] interface gigabitethernet 1/0/0
[~DeviceF-GigabitEthernet1/0/0] pim sim
[~DeviceF-GigabitEthernet1/0/0] quit
- Verify the configuration.
After the configurations are complete, the clock on Device A and DeviceD can be synchronized to the clock on DeviceC.
Check the NTP status on DeviceD and you can find that the clock status is "synchronized". That is, clock synchronization completes. The stratum of the clock on DeviceD is 3, one stratum lower than that on DeviceC.
[~DeviceD] display ntp-service status
clock status: synchronized
clock stratum: 3
reference clock ID: 3.0.1.32
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)
autokey crypto flags: 0x80021
Configuration Files
Device A configuration file
#
sysname DeviceA
# undo ntp-service server disable
interface GigabitEthernet1/0/0
undo shutdown
ip address 1.0.1.11 255.255.255.0
ntp-service manycast-client
#
return
Device C configuration file
#
sysname DeviceC
#
undo ntp-service server disable interface GigabitEthernet1/0/0
undo shutdown
ip address 3.0.1.31 255.255.255.0
ntp-service manycast-server
#
return
Device D configuration file
#
sysname DeviceD
#
undo ntp-service server disable interface GigabitEthernet1/0/0
undo shutdown
ip address 3.0.1.32 255.255.255.0
ntp-service manycast-client
#
return
Device F configuration file
#
sysname DeviceF
#
undo ntp-service server disable multicast routing-enable
#
interface GigabitEthernet2/0/0
undo shutdown
ip address 3.0.1.2 255.255.255.0
pim sm
#
interface GigabitEthernet1/0/0
undo shutdown
ip address 1.0.1.2 255.255.255.0
pim sm
igmp static-group 224.0.1.1
#
Return