ntp

Configures NTP services for IPv4.

Syntax

ntp enable
ntp server ipv4 address
ntp peer ipv4 address
no ntp enable
no ntp server ipv4 address
no ntp peer ipv4 address

Command Default

NTP is disabled by default.

Parameters

enable
Enables NTP feature.
server
Configures NTP server ipv4 address.
peer
Configures NTP peer ipv4 address.

Modes

Config mode

Usage Guidelines

Only IPv4 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 ipv4 address command deletes NTP server ipv4 address.

The no ntp peer ipv4 address command disables NTP peer ipv4 address.

Table 1. Error messages
Error message Reason
Invalid address Throws an error if address is poorly formed, outside valid range, has been removed, or is not configured.

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