Configure NTP IPv4 Server/Client Mode
Network Requirements
- Device1 is the NTP server and Device2 is the NTP client.
- Device1 and Device2 are interconnected via their interfaces VLAN2 and the route is reachable.
- The NTP server is the clock source and the client gets the clock from the server.
Network Topology
Figure 4-1 Networking of configuring NTP server and client
Configuration Steps
Step 1: Configure the IP address of the interface. (Omitted)
Step 2: Configure the NTP server Device1.
#Enable NTP IPv4 of device1, configure the time zone as Beijing time zone, local clock as reference clock, and the number of clock layers as 3.
Device1#configure terminal
Device1(config)#ntp enable
Device1(config)#clock timezone BINJING 8
Device1(config)#ntp master 3
Device1(config)#exit
|
Step 3: Configure the NTP client Device2.
#Enable NTP IPv4 of device2, and configure the time zone as Beijing time zone.
Device2#configure terminal
Device2(config)#ntp enable
Device2(config)#clock timezone BINJING 8
|
#Specify the NTP server Device1 and the IP address is 1.0.0.1.
Device2(config)#ntp server 1.0.0.1
Device2(config)#exit
|
Step 4: Check the result.
#Execute the show ntp status command on the client Device2, and view the clock synchronization status, indicating that the client and NTP server Device1 are synchronized and the clock layers is 4, larger than Device1.
Device2#show ntp status
Current NTP status information
NTP ipv4 is enabled
NTP ipv6 is disabled
Clock is synchronized, stratum 4, reference is 1.0.0.1
reference time is D442EB0E.432F29BD (01:49:02.262 Tue Nov 06 2012)
#Execute the show clock command to view the device clock on the client Device2.
Device2#show clock
BEIJING(UTC+08:00) TUE NOV 06 09:49:30 2012