ntp
To configure the Network Time Protocol (NTP) peers and servers for the switch, use the ntp command. To remove configured peers and servers, use the no form of this command.
ntp { peer hostname | server hostname } [prefer] [ use-vrf vrf-name ]
no ntp { peer hostname | server hostname }
Syntax Description
peer hostname |
Specifies the hostname or IP address of an NTP peer. |
server hostname |
Specifies the hostname or IP address of the NTP server. |
prefer |
(Optional) Specifies this peer/server as the preferred peer/server. |
use-vrf vrf-name |
(Optional) Specifies the virtual routing and forwarding (VRF) used to reach this peer/server. |
Command Default
None
Command Modes
Global configuration mode
Command History
Release |
Modification |
---|---|
6.0(2)N1(1) |
This command was introduced. |
Usage Guidelines
You can specify multiple peer associations.
Examples
This example shows how to form a server association with a server:
switch(config)# ntp server ntp.cisco.com
This example shows how to form a peer association with a peer:
switch(config)# ntp peer 192.168.10.0
This example shows how to delete an association with a peer:
switch(config)# no ntp peer 192.168.10.0