Configure NTP

About this task

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.

Procedure

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