How to configure time (NTP) on Cisco

In this article, I’ll give an example of setting time and setting NTP to automatically synchronize time on Cisco switches.

Connect to the device, go into elevated privilege mode and see the current time and date:

enable
show clock
show clock detail
show calendar

We will go into the configuration mode and indicate your time zone:

configure terminal
clock timezone UTC 2 0

Specify the NTP server for time synchronization:

ntp server 192.168.1.1 version 2

You can specify through which network interface to connect to the NTP server (for example, VLAN 208):

ntp server 192.168.1.1 version 2 source vlan 208

We exit the configuration mode and see the synchronization status:

exit
show ntp status
show ntp associations
show ntp associations detail

You can also specify the time and date manually:

clock set 20:15:15 01 march 2019
clock update-calendar

See also my articles:
Configuring NTP Client and NTP Server in Linux
Configuring Cisco devices

Leave a comment

Leave a Reply