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 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.

Modes

Config mode

Usage Guidelines

Both IPv4 and IPv6 addresses are supported.

This command is available only to users with admin role.

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

The no ntp enable command disables NTP feature.

The no ntp server [ ip address | domain name ] command deletes the NTP server.

The no ntp peer [ ip address | domain name ] 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 IP from the system.

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

device(config)# ntp server 1.1.1.1.1 
Error: Invalid address 

The following example deletes the NTP peer IP from the system.

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

device(config)# ntp peer 1.1.1.1.1 
Error: Invalid address