Network time protocol (NTP)

Network Time Protocol synchronizes the time on all your network devices. Uses UDP port 123.

Stratum: Defines the distance between the network device and the authoritative time source such as an atomic clock.

Stratum 0 clocks, also known as reference clocks are the ones with very high precision, usually atomic clocks
Stratum 1 time source derives its time from Stratum 0 clocks.

Cisco devices are usually configured to derive time (via NTP) from Stratum 1 or 2 sources, usually found on the Internet.

How important is NTP?
Very important. NTP not only synchronizes the time on all your devices, but also helps to verify logs with accuracy. NTP is very common in most organizations.

Hardware Clock vs Software Clock

Cisco routers have two types of clocks

1. Hardware Clock: A battery-powered clock, found in some routers, referred to as calendar

show calendar command can be used to view the hardware clock

Router> show calendar
00:01:00 UTC Fri Mar 1 2002

2. Software Clock: Referred to as clock, this is derived from the hardware clock when the device is rebooted.
show clock command can be used to view the software clock.

network time protocol

The asterisk (*) indicates that this is not authoritative, meaning it is not reliable. The next line shows the reason – its not been derived from any source, this is from the router clock initialized upon reboot.

Setting the clock manually would make this time authoritative.

network time protocol

The hardware clock is still the same as before and can be synchronized as below:

Router# show calendar
00:01:01 UTC Fri Mar 1 2002
Router# clock update-calendar
Router# show calendar
16:09:29 UTC Wed May 14 2014

Configuring NTP

Here’s a good list of public NTP servers to choose from: NIST Internet Time Servers

network time protocol

network time protocol

Set your timezone

network time protocol

Router as authoritative NTP server

network time protocol

The command ntp master configures the router as an authoritative NTP server.

NTP Authentication

network time protocol

1. Turn on NTP authentication using the command ntp authenticate
2. Configure an authentication key using the ntp authentication-key command.
3. Designate the key as trusted with the ntp trusted-key command. This causes the router to synchronize with a system using this key in its NTP packets.

Add a Comment

Your email address will not be published. Required fields are marked *