Configure NTP

After you set the date and time on a device, you can synchronize the local time on a device 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 the NTP peer.
    ntp peer [ ip address | domain name ]
  4. Remove the NTP peer.
    no ntp peer [ address | domain name ]
  5. Configure the NTP server.
    ntp server [ address | domain name ]
  6. Remove the NTP server.
    no ntp server [ address | domain name ]