ntp server

This command is used to configure the NTP servers.

Syntax


[no] ntp server

ntp server <IP-ADDR|IPv6-ADDR> [key <key-id>] [oobm] [max-poll <max-poll-val>][min-poll <min-poll-val>][burst | iburst] [version <1-4>]

Parameters/Options

[no]

Removes the unicast NTP configurations on the device.

Subcommands

IP-ADDR

Sets the IPv4 address of the NTP server.

IPV6-ADDR

Sets the IPv6 address of the NTP server.

key <key-id>

Specifies the authentication key.

max-poll <max-poll-val>

Configures the maximum time intervals in power of 2 seconds. Range is 4–17 (e.g., 5 would translate to 2 raised to 5 or 32).

min-poll <min-poll-val>

Configures the minimum time intervals in seconds. Range is 4–17.

burst

Enables burst mode.

iburst

Enables initial burst mode.

version

Sets version 1–4.

Usage

A maximum of 8 NTP servers can be configured.

Example

switch(config)# ntp
server          Allow the software clock to be synchronized by an NTP
time server.
broadcast       Operate in broadcast mode.
unicast         Operate in unicast mode.


switch(config)# ntp server
IP-ADDR         IPv4 address of the NTP server. 
IPV6-ADDR       IPv6 address of the NTP server.

switch(config)# ntp server <IP-ADDR>
Key             Specify the authentication key.


switch(config)# ntp server <IP-ADDR> key key-id
Max-poll        Configure the maximum time intervals in seconds.

switch(config)# ntp server <IP-ADDR> key key-id max-poll
<4-17>          Enter an integer number.


Switch(config)# ntp server <IP-ADDR> key key-id
Min-poll        Configure the minimum time intervals in seconds.


switch(config)# ntp server <IP-ADDR> key key-id min-poll
<4-17>          Enter an integer number.


switch(config)# ntp server <IP-ADDR> key key-id prefer max-poll 
<max-poll-val> min-poll <min-poll-val>
iburst          Enable initial burst (iburst) mode.
burst           Enable burst mode.


Switch(config)# ntp server IP-ADDR key key-id prefer maxpoll <number>
minpoll <number> iburst

Restrictions

Validation

Error/Warning/Prompt

If authentication key-id not configured

Authentication key-id has not been configured.

If Key-id is not marked as trusted

Key-id is not trusted.

When min poll value is more than max poll value

NTP max poll value should be more than min poll value.