Configure NTP

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.

About this task

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.

Procedure

  1. Enable NTP.
    ntp enable
  2. Disable NTP.
    no ntp enable
  3. Configure NTP peer.
    ntp peer ip address
  4. Remove NTP peer.
    no ntp peer ip address
  5. Configure NTP server.
    ntp server ip address
  6. Remove NTP server.
    no ntp server ip address