15.1.2 Lab - Implement NTP
15.1.2 Lab - Implement NTP
15.1.2 Lab - Implement NTP
Topology
Addressing Table
Device Interface IPv4 Address
R1 G0/0/0 172.16.0.2/30
R1
G0/0/1 10.10.0.1/29
R2 G0/0/0 172.16.0.1/30
R2
G0/0/1 172.16.1.1/30
R3 G0/0/0 172.16.1.2/30
D1 G1/0/5 10.10.0.2/29
D2 G1/0/5 10.10.0.3/29
A1 VLAN 1 10.10.0.4/29
Objectives
Part 1: Build the Network, Configure Basic Device Settings and Routing
Part 2: Configure NTP in a P2P Network
Part 3: Configure NTP in a Multiaccess Broadcast Network
Background / Scenario
Many router and switch features require an accurate time source to operate efficiently. Synchronized
timestamps are important for troubleshooting purposes, Syslog and SNMP event reporting, and for the
correlation of security-based events across multiple devices.
2020 - 2020 Cisco and/or its affiliates. All rights reserved. Cisco Public Page 1 of 14 www.netacad.com
Lab - Implement NTP
Some devices use a software clock that is reset whenever the device is rebooted. Therefore, the date and
time would have to be manually re-entered every time the device is restarted. Other devices use a hardware
clock that can retain the time even when restarted. Regardless, each device clock would never really be
synchronized with other devices. A better, scalable solution is required.
NTP is a scalable solution to synchronize the time on multiple network devices. NTP creates a hierarchical
architecture using authoritative time sources to synchronize clients. An NTP client occasionally polls an NTP
server and multiple NTP messages increase accuracy.
Note: NTP uses UDP port 123 and is documented in RFC 1305. Current versions include NTPv3 and NTPv4.
NTP is commonly implemented in three ways depending on the network type:
o Point-to-point (P2P) - Consists of an NTP server (master) and NTP client.
o Broadcast – Consists of an NTP server broadcasting (i.e., multicasting) to listening NTP broadcast
clients. The server is configured using the ntp broadcast interface command and clients are
configured using the ntp broadcast client interface command.
o NTP Peers – Used in larger redundant topologies for backup purposes where two NTP servers are
also peers to query different external time sources. The peers establish a client server relationship
with each other and try to offer their clock settings to each other. NTP peers are configured using the
ntp peer peer-ip-address global config command.
In this lab, you will configure NTP as follows:
o R3 will be the designated authoritative time source.
o R2 and R3 will establish a P2P client-server NTP connection while R1 and R2 will establish a P2P
client-server NTP connection.
o R1 will be configured as an NTP broadcast server to the NTP broadcast clients (i.e., A1, D1, and D2).
Note: This lab is an exercise in developing, deploying, and verifying how NTP operates and does not reflect
networking best practices.
Note: The routers used with this CCNP hands-on lab are Cisco 4221and the two Layer 3 switches are
Catalyst 3650 switches. Other routers and Layer 3 switches and Cisco IOS versions can be used. Depending
on the model and Cisco IOS version, the commands available and the output produced might vary from what
is shown in the labs.
Note: Ensure that the routers and switches have been erased and have no start-up configurations. If you are
unsure contact your instructor.
Required Resources
3 Routers (Cisco 4221 with Cisco IOS XE Release 16.9.4 universal image or comparable)
2 Switches (Cisco 3650 with Cisco IOS XE release 16.9.4 universal image or comparable)
1 Switch (Cisco 2960 with Cisco IOS release 15.2(2) lanbase image or comparable)
1 PC (Choice of operating system with a terminal emulation program installed)
Console cables to configure the Cisco IOS devices via the console ports
Ethernet cables as shown in the topology
Instructions
2020 - 2020 Cisco and/or its affiliates. All rights reserved. Cisco Public Page 2 of 14 www.netacad.com
Lab - Implement NTP
Part 1: Build the Network, Configure Basic Device Settings and Routing
In Part 1, you will set up the network topology and configure basic settings and interface addressing on the
routers, Layer 3 switches, and the Layer 2 switch. You will also configure multiarea OSPFv2 on the routers
and Layer 3 switches.
Note: Routers were configured with OSPFv2 using the interface configuration method.
Router R1
hostname R1
no ip domain lookup
line con 0
logging sync
exec-time 0 0
exit
banner motd # This is R1, Implement NTP Lab #
interface g0/0/0
ip add 172.16.0.2 255.255.255.252
ip ospf 123 area 0
no shut
exit
interface GigabitEthernet0/0/1
ip address 10.10.0.1 255.255.255.248
ip ospf 123 area 0
no shut
exit
Router R2
hostname R2
no ip domain lookup
line con 0
logging sync
exec-time 0 0
exit
banner motd # This is R2, Implement NTP Lab #
interface g0/0/0
ip add 172.16.0.1 255.255.255.252
ip ospf 123 area 0
no shut
exit
2020 - 2020 Cisco and/or its affiliates. All rights reserved. Cisco Public Page 3 of 14 www.netacad.com
Lab - Implement NTP
interface GigabitEthernet0/0/1
ip address 172.16.1.1 255.255.255.252
ip ospf 123 area 0
no shut
exit
Router R3
hostname R3
no ip domain lookup
line con 0
logging sync
exec-time 0 0
exit
banner motd # This is R3, Implement NTP Lab #
interface g0/0/0
ip address 172.16.1.2 255.255.255.252
ip ospf 123 area 0
no shut
exit
b. Save the running configuration to startup-config.
Close configuration window
Note: Switches were configured with OSPFv2 using the interface method.
Switch D1
hostname D1
no ip domain lookup
line con 0
exec-timeout 0 0
logging synchronous
exit
banner motd # This is D1, Implement NTP Lab #
ip routing
interface g1/0/5
no switchport
ip address 10.10.0.2 255.255.255.248
ip ospf 123 area 0
no shut
exit
Switch D2
hostname D2
no ip domain lookup
line con 0
2020 - 2020 Cisco and/or its affiliates. All rights reserved. Cisco Public Page 4 of 14 www.netacad.com
Lab - Implement NTP
logging sync
exec-time 0 0
exit
banner motd # This is D2, Implement NTP Lab #
ip routing
interface g1/0/5
no switchport
ip address 10.10.0.3 255.255.255.248
ip ospf 123 area 0
no shut
exit
b. Save the running configuration to startup-config.
Close configuration window
Switch A1
hostname A1
no ip domain lookup
line con 0
exec-timeout 0 0
logging synchronous
exit
banner motd # This is A1, Implement NTP Lab #
interface vlan 1
ip address 10.10.0.4 255.255.255.248
no shut
exit
ip default-gateway 10.10.0.1
b. Save the running configuration to startup-config.
Close configuration window
2020 - 2020 Cisco and/or its affiliates. All rights reserved. Cisco Public Page 5 of 14 www.netacad.com
Lab - Implement NTP
a. From A1, R1, and R2 verify that they have connectivity to R3.
b. Verify their time.
Close configuration window
The time source is not accurate and must therefore be corrected before enabling NTP.
b. On R3, manually reconfigure the system clock using the clock set privileged EXEC mode command. The
time you set should be the Coordinated Universal Time (UTC) value. For example, the clock is set
assuming that the current UTC is 7:25 pm (i.e., 19:25).
R3# clock set ?
hh:mm:ss Current Time
2020 - 2020 Cisco and/or its affiliates. All rights reserved. Cisco Public Page 6 of 14 www.netacad.com
Lab - Implement NTP
An informational message is generated stating that the system clock has been altered on the console.
c. Verify that the system clock has been updated.
R3# show clock
19:25:44.437 UTC Mon Jan 20 2020
Notice how the time and time zone have changed to reflect the configured command. It also states how
the time was adjusted.
Note: Other time related commands that can be configured include the clock summer-time command to
automatically switch between standard time and daylight savings time.
2020 - 2020 Cisco and/or its affiliates. All rights reserved. Cisco Public Page 7 of 14 www.netacad.com
Lab - Implement NTP
In this lab, R3 will be configured as an authoritative time source using the ntp master stratum command. The
stratum number should be configured with a high number if a more reliable NTP source becomes available.
When multiple NTP servers are specified, an NTP-enabled client automatically chooses the server with the
lowest stratum number as its time source.
Note: The lower the stratum number the more trustworthy the accuracy of the time source.
a. Configure R3 as the authoritative time source with a stratum of 10 using the ntp master command.
R3(config)# ntp master ?
<1-15> Stratum number
<cr> <cr>
There are no other NTP clients. The address 127.127.1.1 is the loopback IP address of R3 that was
assigned by the ntp master command. The reference clock is LOCL (i.e., local) with a stratum number of
9 which is one less than the configured number of 10.
c. Verify the status of NTP using the show ntp status command.
R3# show ntp status
Clock is synchronized, stratum 10, reference is 127.127.1.1
nominal freq is 250.0000 Hz, actual freq is 250.0000 Hz, precision is 2**10
ntp uptime is 2500 (1/100 of seconds), resolution is 4000
reference time is E1D080F7.F6041B38 (14:41:43.961 EST Mon Jan 20 2020)
clock offset is 0.0000 msec, root delay is 0.00 msec
root dispersion is 3939.38 msec, peer dispersion is 3938.29 msec
loopfilter state is 'CTRL' (Normal Controlled Loop), drift is 0.000000000 s/s
system poll interval is 16, last update was 9 sec ago.
2020 - 2020 Cisco and/or its affiliates. All rights reserved. Cisco Public Page 8 of 14 www.netacad.com
Lab - Implement NTP
R2(config)#
Jan 20 19:51:14.841: %PKI-6-AUTHORITATIVE_CLOCK: The system clock has been set.
Notice that the time and time zone are accurate. The output also confirms that NTP was the time source.
e. Verify if there are any NTP clients or peers on the network using the show ntp associations command.
R2# show ntp associations
The output confirms that R2 has associated with R3 (i.e., 172.16.1.2). Notice how it also identified the
source of the R3 NTP information as 127.127.1.1 at stratum 10.
f. Verify the status of NTP using the show ntp status command.
R2# show ntp status
Clock is synchronized, stratum 11, reference is 172.16.1.2
nominal freq is 250.0000 Hz, actual freq is 250.0000 Hz, precision is 2**10
ntp uptime is 47200 (1/100 of seconds), resolution is 4000
reference time is E1D08495.D70A3FC0 (14:57:09.840 EST Mon Jan 20 2020)
clock offset is -2.5000 msec, root delay is 1.00 msec
root dispersion is 11.36 msec, peer dispersion is 2.63 msec
loopfilter state is 'CTRL' (Normal Controlled Loop), drift is -0.000000006 s/s
system poll interval is 128, last update was 114 sec ago.
The output confirms that R2 is synchronized with R3. When synchronized, R2 also becomes a stratum 11
NTP server.
Note: It may take a few minutes before the time is synchronized with the NTP server.
Close configuration window
2020 - 2020 Cisco and/or its affiliates. All rights reserved. Cisco Public Page 9 of 14 www.netacad.com
Lab - Implement NTP
Notice that the time and time zone are accurate. The output also confirms that NTP was the time source.
Note: It may take a few minutes before the time is updated with the correct time.
e. Verify if there are any NTP clients or peers on the network using the show ntp associations command.
R1# show ntp associations
The output confirms that R1 is a client with R2. It also identifies R3 (i.e., 172.16.1.2) which is 11 hops
away as the source of R2 NTP information.
f. Verify the status of NTP using the show ntp status command.
R1# show ntp status
Clock is synchronized, stratum 12, reference is 172.16.0.1
nominal freq is 250.0000 Hz, actual freq is 250.0000 Hz, precision is 2**10
ntp uptime is 3200 (1/100 of seconds), resolution is 4000
reference time is E1D08C96.116872E0 (15:31:18.068 EST Mon Jan 20 2020)
clock offset is 0.5000 msec, root delay is 1.00 msec
root dispersion is 210.16 msec, peer dispersion is 189.44 msec
loopfilter state is 'CTRL' (Normal Controlled Loop), drift is 0.000000000 s/s
system poll interval is 64, last update was 19 sec ago.
The output confirms that R1 is synchronized with R2. It now becomes a stratum 12 NTP server.
Note: It may take a few minutes before the time is synchronized with the NTP server.
Close configuration window
2020 - 2020 Cisco and/or its affiliates. All rights reserved. Cisco Public Page 10 of 14 www.netacad.com
Lab - Implement NTP
Notice that the time and time zone are accurate. The output also confirms that NTP was the source of the
time.
d. Verify if there are any NTP clients or peers on the network using the show ntp associations command.
A1# show ntp associations
2020 - 2020 Cisco and/or its affiliates. All rights reserved. Cisco Public Page 11 of 14 www.netacad.com
Lab - Implement NTP
The output confirms that A1 is synchronized with R1 and is now a stratum 13 NTP server.
Note: It may take a few minutes before the time is synchronized with the NTP server.
Close configuration window
c.
Open configuration window
On D2, enter interface g1/0/5 and enable it to be an NTP broadcast client.
D2(config)# interface g1/0/5
D2(config-if)# ntp broadcast client
D2(config-if)# exit
a. Configure the local time zone.
D2(config)# clock timezone EST -5
Jan 20 21:07:05.862: %SYS-6-CLOCKUPDATE: System clock has been updated from 21:07:05
UTC Mon Jan 20 2020 to 16:07:05 EST Mon Jan 20 2020, configured from console by
console.
D2(config)# exit
d. On D2, verify if there are any NTP clients or peers on the network by using the show ntp associations
command.
D2# show ntp associations
2020 - 2020 Cisco and/or its affiliates. All rights reserved. Cisco Public Page 12 of 14 www.netacad.com
Lab - Implement NTP
Note: It may take a few minutes before the time is synchronized with the NTP server.
Close configuration window
The show clock detail commands were entered sequentially in the devices which explains the few
seconds in between each command output. The output reasonably confirms that the clocks on these
devices are all synchronized.
Close configuration window
2020 - 2020 Cisco and/or its affiliates. All rights reserved. Cisco Public Page 13 of 14 www.netacad.com
Lab - Implement NTP
Router Model Ethernet Interface #1 Ethernet Interface #2 Serial Interface #1 Serial Interface #2
(G0/0/0) (G0/0/1)
Gigabit Ethernet 0/0/0 Gigabit Ethernet 0/0/1
4300 (G0/0/0) (G0/0/1) Serial 0/1/0 (S0/1/0) Serial 0/1/1 (S0/1/1)
Note: To find out how the router is configured, look at the interfaces to identify the type of router and how many
interfaces the router has. There is no way to effectively list all the combinations of configurations for each router
class. This table includes identifiers for the possible combinations of Ethernet and Serial interfaces in the device.
The table does not include any other type of interface, even though a specific router may contain one. An example
of this might be an ISDN BRI interface. The string in parenthesis is the legal abbreviation that can be used in
Cisco IOS commands to represent the interface.
End of Document
2020 - 2020 Cisco and/or its affiliates. All rights reserved. Cisco Public Page 14 of 14 www.netacad.com