After setting the date and time on a device, the local time on a device can be synchronized with a Network Time Protocol (NTP) server.
The date and time are set in Exec mode and only have to be configured once per device because the value is written to nonvolatile memory. After the basic time information is set up, an NTP server is configured to allow the local time to be synchronized across the network.
ntp enable
no ntp enable
ntp peer ipv4 address
no ntp peer ipv4 address
ntp server ipv4 address
no ntp server ipv4 address