System 6ntp
System 6ntp
CH A P T E R 8
Configuring NTP
This chapter describes how to configure the Network Time Protocol (NTP) and includes the following
topics:
• Information about NTP, page 8-1
• Prerequisites for NTP, page 8-3
• Configuration Guidelines and Limitations, page 8-3
• Configuring an NTP Server and Peer, page 8-3
• Verifying the NTP Configuration, page 8-5
• NTP Example Configuration, page 8-5
• Default Settings, page 8-5
• Additional References, page 8-5
• Feature History for NTP, page 8-6
NTP Overview
The Network Time Protocol (NTP) synchronizes timekeeping among a set of distributed time servers
and clients. This synchronization allows you to correlate events when you receive system logs and other
time-specific events from multiple network devices.
NTP uses the User Datagram Protocol (UDP) as its transport protocol. All NTP communication uses the
Universal Time Coordinated (UTC) standard. An NTP server usually receives its time from an
authoritative time source, such as a radio clock or an atomic clock attached to a time server. NTP
distributes this time across the network. NTP is extremely efficient; no more than one packet per minute
is necessary to synchronize two machines to within a millisecond of each other.
Se n d d o c u m e n t c o m m e n t s t o n ex u s 1 k - d o c f e e d b a ck @ c i s c o . c o m .
NTP uses a stratum to describe how many NTP hops away that a network device is from an authoritative
time source. A stratum 1 time server has an authoritative time source (such as an atomic clock) directly
attached to the server. A stratum 2 NTP server receives its time through NTP from a stratum 1 NTP
server, which in turn connects to the authoritative time source.
NTP avoids synchronizing to a network device that may keep accurate time. NTP never synchronizes to
a system that is not in turn synchronized itself. NTP compares the time reported by several network
devices and does not synchronize to a network device that has a time that is significantly different than
the others, even if its stratum is lower.
Cisco NX-OS cannot act as a stratum 1 server. You cannot connect to a radio or atomic clock. We
recommend that the time service that you use for your network is derived from the public NTP servers
available on the Internet.
If the network is isolated from the Internet, Cisco NX-OS allows you to configure a network device so
that the device acts as though it is synchronized through NTP, when in fact it has determined the time
using other means. Other network devices can then synchronize to that network device through NTP.
NTP Peers
NTP allows you to create a peer relationship between two networking devices. A peer can provide time
on its own or connect to an NTP server. If both the local device and the remote peer point to different
NTP servers, your NTP service is more reliable. The local device maintains the right time even if its NTP
server fails by using the time from the peer.
Figure 8-1 displays a network with two NTP stratum 2 servers and two switches.
Stratum-2 Stratum-2
Peer association
Server-1 Server-2
Server Server
association association
Peer association
85532
Switch-1 Switch-2
In this configuration, switch 1 and switch 2 are NTP peers. switch 1 uses stratum-2 server 1, while switch
2 uses stratum-2 server 2. If stratum-2 server-1 fails, switch 1 maintains the correct time through its peer
association with switch 2.
High Availability
Stateless restarts are supported for NTP. After a reboot or a supervisor switchover, the running
configuration is applied.
Se n d d o c u m e n t c o m m e n t s t o n ex u s 1 k - d o c f e e d b a ck @ c i s c o . c o m .
You can configure NTP peers to provide redundancy in case an NTP server fails.
• You can configure NTP using IPv4 addresses or domain name server (DNS) names.
SUMMARY STEPS
1. config t
2. ntp server {ip-address | ipv6-address | dns-name}
3. ntp peer {ip-address | ipv6-address | dns-name}
4. show ntp peers
5. copy running-config startup-config
Se n d d o c u m e n t c o m m e n t s t o n ex u s 1 k - d o c f e e d b a ck @ c i s c o . c o m .
DETAILED STEPS
Command Purpose
Step 1 config t Places you into the CLI Global Configuration
mode.
Example:
n1000v# config t
n1000v(config)#
Step 2 ntp server {ip-address | ipv6-address | Forms an association with a server.
dns-name}
Example:
n1000v(config)# ntp server 192.0.2.10
Step 3 ntp peer {ip-address | dns-name} Forms an association with a peer. You can
specify multiple peer associations.
n1000v(config)# ntp peer 2001:0db8::4101
Step 4 show ntp peers (Optional) Displays the configured server and
peers.
Example:
n1000v(config)# show ntp peers Note A domain name is resolved only when
you have a DNS server configured.
Step 5 copy running-config startup-config (Optional) Saves this configuration change.
Example:
n1000v(config-if)# copy running-config
startup-config
Command Purpose
clear ntp statistics Clears the NTP statistics.
Command Purpose
clear ntp session Clears the NTP sessions.
Se n d d o c u m e n t c o m m e n t s t o n ex u s 1 k - d o c f e e d b a ck @ c i s c o . c o m .
Command Purpose
show ntp peer-status Displays the status for all NTP servers and peers.
show ntp peers Displays all the NTP peers.
show ntp statistics {io | local | memory | Displays the NTP statistics
peer {ip-address | dns-name}
show ntp status Displays the NTP distribution status
Default Settings
The following table lists the default settings for CDP and NTP parameters.
Parameter Default
NTP Enabled
Additional References
For additional information related to NTP, see the following sections:
• Related Documents, page 8-6
• Standards, page 8-6
Se n d d o c u m e n t c o m m e n t s t o n ex u s 1 k - d o c f e e d b a ck @ c i s c o . c o m .
Related Documents
Related Topic Document Title
Interface Cisco Nexus 1000V Interface Configuration Guide, Release
4.0(4)SV1(1)
Standards
Standards Title
No new or modified standards are supported by this —
feature, and support for existing standards has not been
modified by this feature.