Defined in RFC 1305, the Network Time
Protocol (NTP) synchronizes timekeeping among distributed time servers and
clients. NTP runs over the User Datagram Protocol (UDP), using UDP port 123.
The purpose of using NTP is to keep
consistent timekeeping among all clock-dependent devices within the network, so
that the devices can provide diverse applications based on the consistent time.
For a local system running NTP, its time
can be synchronized by other reference sources and can be used as a reference
source to synchronize other clocks.

Figure 1-1 Network diagram for NTP
client/server mode configuration
l
The local clock of Device A is to be used as a
reference source, with the stratum level of 2.
l
Device B works in the client/server mode and
Device A is to be used as the NTP server of Device B.
|
Product series
|
Software version
|
Hardware version
|
|
S3610 Series Ethernet Switches
|
Release 5301
|
All versions
|
|
S5510 Series Ethernet Switches
|
Release 5301
|
All versions
|
|
S5500-SI Series Ethernet Switches
|
Release 1207
|
All versions except S5500-20TP-SI
|
|
Release 1301
|
S5500-20TP-SI
|
|
S5500-EI
Series Ethernet Switches
|
Release 2102
|
All versions
|
|
S7500E
Series Ethernet Switches
|
Release 6100
|
All versions
|
l
Configure Device A
# Specify the local clock as the reference
source, with the stratum level of 2.
<DeviceA>
system-view
[DeviceA] ntp-service
refclock-master 2
l
Configure Device B
# Specify Device A as the NTP server of Device
B.
<DeviceB>
system-view
[DeviceB]
ntp-service unicast-server 1.0.1.11
l
Configuration on Device A
#
ntp-service
refclock-master 2
l
Configuration on Device B
#
ntp-service
unicast-server 1.0.1.11
1)
The local clock of an S7500E series Ethernet
switch can be configured as a reference source.
2)
The local clock of an
S3610/S5510/S5500-SI/S5500-EI switch cannot be configured as a reference
source, unless it is synchronized by other clocks first.

Figure 1-2 Network diagram for NTP
symmetric peers mode configuration
l
The local clock of Device A is to be used as a
reference source, with the stratum level of 2.
l
Device B works in the client mode and Device A
is to be used as the NTP server of Device B.
l
Device C works in the symmetric peers mode and
Device B will act as the peer of Device C. Device C is the symmetric-active
peer while Device B is the symmetric-passive peer.
|
Product series
|
Software version
|
Hardware version
|
|
S3610 Series Ethernet Switches
|
Release 5301
|
All versions
|
|
S5510 Series Ethernet Switches
|
Release 5301
|
All versions
|
|
S5500-SI Series Ethernet Switches
|
Release 1207
|
All versions except S5500-20TP-SI
|
|
Release 1301
|
S5500-20TP-SI
|
|
S5500-EI Series Ethernet Switches
|
Release 2102
|
All versions
|
|
S7500E Series Ethernet Switches
|
Release 6100
|
All versions
|
1)
Configure Device A
# Specify
the local clock as the reference source, with the stratum level of 2.
<DeviceA>
system-view
[DeviceA] ntp-service
refclock-master 2
2)
Configure Device B
# Specify Device A as the NTP server of
Device B.
<DeviceB>
system-view
[DeviceB]
ntp-service unicast-server 3.0.1.31
3)
Configure Device C (after Device B is
synchronized to Device A)
# Configure Device B as a symmetric peer.
<DeviceC>
system-view
[DeviceC]
ntp-service unicast-peer 3.0.1.32
l
Configuration on Device A
#
ntp-service
refclock-master 2
l
Configuration on Device B
#
ntp-service
unicast-server 3.0.1.31
l
Configuration on Device C
#
ntp-service
unicast-peer 3.0.1.32
1)
The local clock of an S7500E series Ethernet
switch can be configured as a reference source.
2)
The local clock of an S3610/S5510/S5500-SI/S5500-EI
switch cannot be configured as a reference source, unless it is synchronized by
other clocks first.

Figure 1-3 Network diagram for NTP
broadcast mode configuration
l
Device C is a switch that supports to use its
local clock as a reference source (for example, an S7500E switch). Its local
clock is to be used as a reference source, with the stratum level of 2.
l
Device A and Device D are Ethernet switches of
any model listed in Applicable
Product Matrix. Set Switch A and Switch D to work
in the broadcast client mode and receive broadcast messages through their
respective VLAN-interface 2.
|
Product series
|
Software version
|
Hardware version
|
|
S3610 Series Ethernet Switches
|
Release 5301
|
All versions
|
|
S5510 Series Ethernet Switches
|
Release 5301
|
All versions
|
|
S5500-SI Series Ethernet Switches
|
Release 1207
|
All versions except S5500-20TP-SI
|
|
Release 1301
|
S5500-20TP-SI
|
|
S5500-EI Series Ethernet Switches
|
Release 2102
|
All versions
|
|
S7500E Series Ethernet Switches
|
Release 6100
|
All versions
|
1)
Configure Device C
# Configure
Device C to work in the broadcast server mode and send out broadcast messages
through VLAN-interface 2.
<DeviceC>
system-view
[DeviceC]
interface Vlan-interface 2
[DeviceC-Vlan-interface2]
ntp-service broadcast-server
l
Configure Device A (perform the same
configuration on Device D)
# Configure Device A to work in the
broadcast client mode and receive broadcast messages through VLAN-interface 2.
<DeviceA>
system-view
[DeviceA]
interface Vlan-interface 2
[DeviceA-Vlan-interface2]
ntp-service broadcast-client
l
Configuration on Device C
#
interface
Vlan-interface2
ip address
3.0.1.13 255.255.255.0
ntp-service
broadcast-server
l
Configuration on Device A
#
interface
Vlan-interface2
ip
address 3.0.1.11 255.255.255.0
ntp-service
broadcast-client
l
Configuration on Device D
#
interface
Vlan-interface2
ip
address 3.0.1.14 255.255.255.0
ntp-service
broadcast-client
1)
The local clock of an S7500E series Ethernet
switch can be configured as a reference source.
2)
The local clock of an
S3610/S5510/S5500-SI/S5500-EI switch cannot be configured as a reference source,
unless it is synchronized by other clocks first.

Figure 1-4 Network diagram for NTP
multicast mode configuration
l
The local clock of Switch C is to be used as a
reference source, with the stratum level of 2.
l
Switch C works in the multicast server mode, and
sends out multicast messages from VLAN-interface 2.
l
Switch A and Switch D work in the multicast
client mode and receive multicast messages through VLAN-interface 3 and VLAN-interface
2 respectively.
|
Product series
|
Software version
|
Hardware version
|
|
S3610 Series Ethernet Switches
|
Release 5301
|
All versions
|
|
S5510 Series Ethernet Switches
|
Release 5301
|
All versions
|
|
S5500-SI Series Ethernet Switches
|
Release 1207
|
All versions except S5500-20TP-SI
|
|
Release 1301
|
S5500-20TP-SI
|
|
S5500-EI Series Ethernet Switches
|
Release 2102
|
All versions
|
|
S7500E Series Ethernet Switches
|
Release 6100
|
All versions
|
1)
Configure Switch C.
# Specify
the local clock as the reference source, with the stratum level of 2.
<SwitchC> system-view
[SwitchC] ntp-service refclock-master 2
# Configure
Switch C to work in the multicast server mode and send out multicast messages
through VLAN-interface 2.
[SwitchC]
interface vlan-interface 2
[SwitchC-Vlan-interface2]
ntp-service multicast-server
2)
Configure Switch D.
# Configure Switch D to work in the
multicast client mode and receive multicast messages through VLAN-interface 2.
<SwitchD>
system-view
[SwitchD] interface
vlan-interface 2
[SwitchD-Vlan-interface2]
ntp-service multicast-client
3)
Configure Switch B.
Because Switch A and Switch C are not on
the same subnet, the multicast function needs to be configured on Switch B;
otherwise, Switch A cannot receive the multicast messages from Switch C.
# Configure the multicast function.
<SwitchB>
system-view
[SwitchB]
multicast routing-enable
[SwitchB] interface
vlan-interface 2
[SwitchB-Vlan-interface2]
pim dm
[SwitchB-Vlan-interface2]
quit
[SwitchB]
vlan 3
[SwitchB-vlan3]
port GigabitEthernet 1/0/1
[SwitchB-vlan3]
quit
[SwitchB] interface
vlan-interface 3
[SwitchB-Vlan-interface3]
igmp enable
[SwitchB-Vlan-interface3]
quit
[SwitchB] interface
GigabitEthernet 1/0/1
[SwitchB-GigabitEthernet1/0/1]
igmp-snooping static-group 224.0.1.1 vlan 3
4)
Configure Switch A.
<SwitchA>
system-view
[SwitchA] interface
vlan-interface 3
# Configure Switch A to work in the
multicast client mode and receive multicast messages through VLAN-interface 3.
[SwitchA-Vlan-interface3]
ntp-service multicast-client
l
Configuration on Switch A
#
interface Vlan-interface3
ntp-service
multicast-client
l
Configuration on Switch B
#
multicast
routing-enable
#
interface
Vlan-interface2
pim dm
#
interface
Vlan-interface3
igmp
enable
#
interface
GigabitEthernet1/0/1
port
access vlan 3
igmp-snooping
static-group 224.0.1.1 vlan 3
l
Configuration on Switch C
#
ntp-service
refclock-master 2
#
interface Vlan-interface2
ntp-service
multicast-server
l
Configuration on Switch D
#
interface Vlan-interface2
ntp-service
multicast-client
1)
The local clock of an S7500E series Ethernet
switch can be configured as a reference source.
2)
The local clock of an
S3610/S5510/S5500-SI/S5500-EI switch cannot be configured as a reference
source, unless it is synchronized by other clocks first.
3)
Switch B in this configuration example cannot be
an S5500-SI series Ethernet switch, for the switch does not support the Layer 3
multicast function.

Figure 1-5 Network diagram for
configuration of NTP broadcast mode with authentication
l
The local clock of Switch C is to be used as a
reference source, with the stratum level of 3.
l
Switch C works in the broadcast server mode, and
sends out broadcast messages from VLAN-interface 2.
l
Switch D works in the broadcast client mode and
receives broadcast messages through VLAN-interface 2.
l
NTP authentication is enabled on both Switch C
and Switch D.
|
Product series
|
Software version
|
Hardware version
|
|
S3610 Series Ethernet Switches
|
Release 5301
|
All versions
|
|
S5510 Series Ethernet Switches
|
Release 5301
|
All versions
|
|
S5500-SI Series Ethernet Switches
|
Release 1207
|
All versions except S5500-20TP-SI
|
|
Release 1301
|
S5500-20TP-SI
|
|
S5500-EI Series Ethernet Switches
|
Release 2102
|
All versions
|
|
S7500E Series Ethernet Switches
|
Release 6100
|
All versions
|
1)
Configure Switch C.
# Specify the local clock as the reference
source, with the stratum level of 3.
<SwitchC>
system-view
[SwitchC]
ntp-service refclock-master 3
# Configure NTP authentication.
[SwitchC]
ntp-service authentication enable
[SwitchC] ntp-service
authentication-keyid 88 authentication-mode md5 123456
[SwitchC]
ntp-service reliable authentication-keyid 88
# Specify Switch C as an NTP broadcast
server, and specify an authentication key.
[SwitchC]
interface vlan-interface 2
[SwitchC-Vlan-interface2]
ntp-service broadcast-server authentication-keyid 88
2)
Configure Switch D.
# Configure NTP authentication.
<SwitchD>
system-view
[SwitchD]
ntp-service authentication enable
[SwitchD] ntp-service
authentication-keyid 88 authentication-mode md5 123456
[SwitchD]
ntp-service reliable authentication-keyid 88
# Configure Switch D to work in the NTP
broadcast client mode.
[SwitchD]
interface vlan-interface 2
[SwitchD-Vlan-interface2]
ntp-service broadcast-client
l
Configuration on Switch C
#
interface
Vlan-interface2
ntp-service
broadcast-server authentication-keyid 88
#
ntp-service
authentication enable
ntp-service
authentication-keyid 88 authentication-mode md5 OUM!K%F<+$[Q=^Q`MAF4<1!!
ntp-service
reliable authentication-keyid 88
ntp-service
refclock-master 3
#
l
Configuration on Switch D
#
interface
Vlan-interface2
ntp-service
broadcast-client
#
ntp-service
authentication enable
ntp-service
authentication-keyid 88 authentication-mode md5 OUM!K%F<+$[Q=^Q`MAF4<1!!
ntp-service
reliable authentication-keyid 88
#
1)
The local clock of an S7500E series Ethernet switch
can be configured as a reference source.
2)
The local clock of an
S3610/S5510/S5500-SI/S5500-EI switch cannot be configured as a reference
source, unless it is synchronized by other clocks first.