ntp

Enables and configures Network Time Protocol (NTP).

Syntax

ntp enable
ntp server [ ip address | domain name ]
ntp peer [ ip address | domain name ]
no ntp enable
no ntp server [ ip address | domain name ]
no ntp peer [ ip address | domain name ]

Command Default

NTP is disabled by default.

Parameters

enable
Enables the NTP feature.
domain name
Specifies the domain name.
ip address
Specifies the IPv4 or IPv6 address.
peer
Specifies the NTP peer.
server
Specifies the NTP server. The maximum number of NTP servers is eight.

Modes

Config mode

Usage Guidelines

Both IPv4 and IPv6 addresses are supported.

This command is available only to users with the admin role.

NTP is disabled by default. You must enable it explicitly when configuring NTP servers and peers.

The no ntp enable command disables the NTP feature.

The no ntp server command deletes the NTP server.

The no ntp peer command disables the NTP peer.

Examples

The following example disables NTP.

device# configure terminal
device(config)# no ntp enable

The following example deletes the NTP server from the system.

device# configure terminal
device(config)# no ntp server 1.1.1.1

The following example deletes the NTP peer from the system.

device# configure terminal
device(config)# no ntp peer 1.1.1.1