Configure NTP on Cisco Routers

As you probably already know NTP state for Network Time Protocol and it is used for clock synchronizing on devices.

You can configure Cisco router as NTP server and as NTP client. Further, if you configure router as NTP client, router can use other router as server or some other source. You can configure more then one NTP source.

In order to start with configuring NTP I have created simple topology (Slide 1.) and configured interfaces with 192.168.100.0/24.

Configure NTP on Cisco Routers

Slide 1.

I verified connectivity with ICMP check:

NTP_Client#ping 192.168.100.1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.100.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 8/15/20 ms

Then I configured time on NTP Server. Your server also can be configured to use some other source, probably some server outside your network

NTP_Server#clock set 23:00:00 25 Januar 2016

Notice log which informs you about  time update:

.Jan 25 23:00:00.003: %SYS-6-CLOCKUPDATE: System clock has been updated from 22:45:40 UTC Mon Jan 25 2016 to 23:00:00 UTC Mon Jan 25 2016, configured from console by console.

Now configure NTP_Server router as master:

NTP_Server(config)#ntp master

Verify service status with following syntax which will generate output shown:

NTP_Server#show ntp status
Clock is synchronized, stratum 8, reference is 127.127.1.1
nominal freq is 250.0000 Hz, actual freq is 250.0000 Hz, precision is 2**18
ntp uptime is 371500 (1/100 of seconds), resolution is 4000
reference time is DA5128E0.4AC3B164 (23:06:08.292 UTC Mon Jan 25 2016)
clock offset is 0.0000 msec, root delay is 0.00 msec
root dispersion is 0.23 msec, peer dispersion is 0.23 msec
loopfilter state is ‘CTRL’ (Normal Controlled Loop), drift is 0.000000000 s/s
system poll interval is 16, last update was 0 sec ago.

Now we will proceed with client configuration. Type following syntax in order to confirm IP address of NTP server:

NTP_Client(config)#ntp server 192.168.100.1 prefer

Command prefer is option command in case you are want to prefer that peer when possible. Add then following command to confirm on what interface is time server:

NTP_Client(config)#ntp source fastEthernet 0/0

Verify service status with following command and review output shown:

NTP_Server#show ntp status
Clock is synchronized, stratum 8, reference is  192.168.100.1
nominal freq is 250.0000 Hz, actual freq is 250.0000 Hz, precision is 2**18
ntp uptime is 371500 (1/100 of seconds), resolution is 4000
reference time is DA5128E0.4AC3B164 (23:06:08.292 UTC Mon Jan 25 2016)
clock offset is 0.0000 msec, root delay is 0.00 msec
root dispersion is 0.23 msec, peer dispersion is 0.23 msec
loopfilter state is ‘CTRL’ (Normal Controlled Loop), drift is 0.000000000 s/s
system poll interval is 16, last update was 0 sec ago.

Now, clock between two routers should be synchronized. Verify with following syntax:

NTP_Server#show clock
23:13:53.095 UTC Mon Jan 25 2016

I hope that this tutorial was informative to you and thank you for visiting this website.

 

Dejan Dzodan

Dejan Dzodan

IT professional for more then 15 years, mostly in financial institutions but with experience in ISP and retail. Proven in networking and overall infrastructure projects. Cisco instructor.

Leave a Reply

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


3 + 4 =