NTP - BSM Time Calendar Set
NTP - BSM Time Calendar Set
Network Time Protocol (NTP) is a protocol designed to time-synchronize a network of machines. NTP runs
on User Datagram Protocol (UDP), which in turn runs on IP. NTP Version 3 is documented in RFC 1305.
This module describes how to configure Network Time Protocol on Cisco devices.
the disk space by writing messages to log files, and consume the network bandwidth. All of these could cause
a DoS condition on the affected hosts.
For more information, see the Network Time Protocol Package Remote Message Loop Denial of Service
Vulnerability web page.
Cisco software releases that support NTPv4 are not affected. All other versions of Cisco software are affected.
To display whether a device is configured with NTP, use the show running-config | include ntp command.
If the output returns any of the following commands, then that device is vulnerable to the attack:
• ntp broadcast client
• ntp master
• ntp multicast client
• ntp peer
• ntp server
For more information on understanding Cisco software releases, see the White Paper: Cisco IOS and NX-OS
Software Reference Guide.
There are no workarounds for this vulnerability other than disabling NTP on the device. Only packets destined
for any configured IP address on the device can exploit this vulnerability. Transit traffic will not exploit this
vulnerability.
Depending on your release, your feature will process NTP mode 7 packets and will display the message “NTP:
Receive: dropping message: Received NTP private mode 7 packet ” if debugs for NTP are enabled. Configure
the ntp allow mode private command to process NTP mode 7 packets. This command is disabled by default.
clock, or a Global Positioning System (GPS) time source) directly attached, a stratum 2 time server receives
its time via NTP from a stratum 1 time server, and so on.
NTP has two ways to avoid synchronizing to a machine whose time may not be accurate. NTP will never
synchronize to a machine that is not in turn synchronized. NTP will compare the time reported by several
machines, and will not synchronize to a machine whose time is significantly different from others, even if its
stratum is lower. This strategy effectively builds a self-organizing tree of NTP servers.
The Cisco implementation of NTP does not support stratum 1 service; that is, you cannot connect to a radio
or atomic clock (for some specific platforms, however, you can connect to a GPS time-source device). Cisco
recommends that the time service for your network be derived from the public NTP servers available in the
IP Internet.
If the network is isolated from the Internet, the Cisco implementation of NTP allows a machine to be configured
so that it acts as though it is synchronized via NTP, when in fact it has determined the time using other means.
Other machines can then synchronize to that machine via NTP.
A number of manufacturers include NTP software for their host systems and a publicly available version for
systems running UNIX. This software also allows UNIX-derivative servers to acquire the time directly from
an atomic clock, which would subsequently propagate time information along to Cisco routers.
The communications between machines running NTP (known as associations) are usually statically configured;
each machine is given the IP address of all machines with which it should form associations. Accurate
timekeeping is made possible through exchange of NTP messages between each pair of machines with an
association.
However, in a LAN environment, NTP can be configured to use IP broadcast messages instead. This alternative
reduces configuration complexity because each machine can be configured to send or receive broadcast
messages. However, the accuracy of timekeeping is marginally reduced because the information flow is
one-way only.
The time kept on a machine is a critical resource, so Cisco strongly recommends that you use the security
features of NTP to avoid the accidental or malicious setting of incorrect time. Two mechanisms are available:
an access list-based restriction scheme and an encrypted authentication mechanism.
When multiple sources of time (Virtual Integrated Network System (VINES), hardware clock, manual
configuration) are available, NTP is always considered to be more authoritative. NTP time overrides the time
set by any other method.
NTP services are disabled on all interfaces by default.
For more information about NTP, see the following sections:
The client and the symmetric active modes should be used when NTP is required to provide a high level of
time accuracy and reliability.
When a networking device is operating in the client mode, it polls its assigned time-serving hosts for the
current time. The networking device will then pick a host from among all the polled time servers to synchronize
with. Because the relationship that is established in this case is a client-host relationship, the host will not
capture or use any time information sent by the local client device. This mode is most suited for file-server
and workstation clients that are not required to provide any form of time synchronization to other local clients.
Use the ntp server command to individually specify the time server that you want your networking device
to consider synchronizing with and to set your networking device to operate in the client mode.
When a networking device is operating in the symmetric active mode, it polls its assigned time-serving hosts
for the current time and it responds to polls by its hosts. Because this is a peer-to-peer relationship, the host
will also retain time-related information of the local networking device that it is communicating with. This
mode should be used when a number of mutually redundant servers are interconnected via diverse network
paths. Most stratum 1 and stratum 2 servers on the Internet adopt this form of network setup. Use the ntp
peer command to individually specify the time serving hosts that you want your networking device to consider
synchronizing with and to set your networking device to operate in the symmetric active mode.
The specific mode that you should set for each of your networking devices depends primarily on the role that
you want them to assume as a timekeeping device (server or client) and the device’s proximity to a stratum 1
timekeeping server.
A networking device engages in polling when it is operating as a client or a host in the client mode or when
it is acting as a peer in the symmetric active mode. Although polling does not usually place a burden on
memory and CPU resources such as bandwidth, an exceedingly large number of ongoing and simultaneous
polls on a system can seriously impact the performance of a system or slow the performance of a given network.
To avoid having an excessive number of ongoing polls on a network, you should limit the number of direct,
peer-to-peer or client-to-server associations. Instead, you should consider using NTP broadcasts to propagate
time information within a localized network.
If the source IP address matches the access lists for more than one access type, the first type is granted access.
If no access groups are specified, all access types are granted access to all systems. If any access groups are
specified, only the specified access types will be granted access.
For details on NTP control queries, see RFC 1305 (NTP Version 3).
The encrypted NTP authentication scheme should be used when a reliable form of access control is required.
Unlike the access list-based restriction scheme that is based on IP addresses, the encrypted authentication
scheme uses authentication keys and an authentication process to determine if NTP synchronization packets
sent by designated peers or servers on a local network are deemed as trusted before the time information that
they carry along with them is accepted.
The authentication process begins from the moment an NTP packet is created. Cryptographic checksum keys
are generated using the message digest algorithm 5 (MD5) and are embedded into the NTP synchronization
packet that is sent to a receiving client. Once a packet is received by a client, its cryptographic checksum key
is decrypted and checked against a list of trusted keys. If the packet contains a matching authentication key,
the time-stamp information that is contained within the packet is accepted by the receiving client. NTP
synchronization packets that do not contain a matching authenticator key are ignored.
Note In large networks, where many trusted keys must be configured, the Range of Trusted Key Configuration
feature enables configuring multiple keys simultaneously.
It is important to note that the encryption and decryption processes used in NTP authentication can be very
CPU-intensive and can seriously degrade the accuracy of the time that is propagated within a network. If your
network setup permits a more comprehensive model of access control, you should consider the use of the
access list-based form of control.
After NTP authentication is properly configured, your networking device will synchronize with and provide
synchronization only to trusted time sources.
Note Use the ntp master command with caution. It is very easy to override valid time sources using this
command, especially if a low stratum number is configured. Configuring multiple machines in the same
network with the ntp master command can cause instability in timekeeping if the machines do not agree
on the time.
Configuring NTP
SUMMARY STEPS
1. enable
2. configure terminal
3. ntp peer ip-address [normal-sync] [version number] [key key-id] [prefer]
4. ntp server ip-address [version number] [key key-id] [prefer]
5. end
DETAILED STEPS
Example:
Device# configure terminal
Step 3 ntp peer ip-address [normal-sync] [version number] [key Forms a peer association with another system.
key-id] [prefer]
Example:
Device(config)# ntp peer 192.168.10.1 normal-sync
version 2 prefer
Step 4 ntp server ip-address [version number] [key key-id] Forms a server association with another system.
[prefer]
Example:
Device(config)# ntp server 192.168.10.1 version 2
prefer
SUMMARY STEPS
1. enable
2. configure terminal
3. interface type number
4. ntp broadcast version number
5. ntp broadcast client
6. ntp broadcastdelay microseconds
7. end
DETAILED STEPS
Example:
Device# configure terminal
Step 3 interface type number Configures an interface and enters interface configuration
mode.
Example:
Device(config)# interface GigabitEthernet 0/0
Step 4 ntp broadcast version number Configures the specified interface to send NTP broadcast
packets.
Example:
Device(config-if)# ntp broadcast version 2
Step 5 ntp broadcast client Configures the specified interface to receive NTP
broadcast packets.
Example:
Device(config-if)# ntp broadcast client
Step 6 ntp broadcastdelay microseconds Adjusts the estimated round-trip delay for NTP
broadcasts.
Example:
Device(config-if)# ntp broadcastdelay 100
SUMMARY STEPS
1. enable
2. configure terminal
3. line aux line-number
4. end
5. show ntp associations
6. show ntp status
7. debug ntp refclock
DETAILED STEPS
Example:
Device# configure terminal
Step 3 line aux line-number Enters line configuration mode for the auxiliary port 0.
Example:
Device(config)# line aux 0
Step 5 show ntp associations Displays the status of NTP associations, including the status
of the GPS reference clock.
Example:
Device# show ntp associations
Example:
Device# show ntp status
Step 7 debug ntp refclock Allows advanced monitoring of reference clock activities
for the purposes of debugging.
Example:
Device# debug ntp refclock
SUMMARY STEPS
1. enable
2. configure terminal
3. ntp authenticate
4. ntp authentication-key number md5 key
5. ntp authentication-key number md5 key
6. ntp authentication-key number md5 key
7. ntp trusted-key key-number [- end-key]
8. ntp server ip-address key key-id
9. end
DETAILED STEPS
Example:
Device# configure terminal
Example:
Device(config)# ntp authenticate
Example:
Device(config)# ntp authentication-key 2 md5 key2
Example:
Device(config)# ntp authentication-key 3 md5 key3
Step 8 ntp server ip-address key key-id Allows the software clock to be synchronized by an
NTP time server.
Example:
Device(config)# ntp server 172.16.22.44 key 2
DETAILED STEPS
Example:
Device# show clock detail
Example:
Device# show ntp associations detail
Example:
Device# show ntp status
Cisco IOS and NX-OS software releases 'White Paper: Cisco IOS and NX-OS Software
Reference Guide
Standard/RFCs Title
RFC 1305 Network Time Protocol (Version 3) Specification,
Implementation and Analysis
Technical Assistance
Description Link
The Cisco Support and Documentation website http://www.cisco.com/cisco/web/support/index.html
provides online resources to download documentation,
software, and tools. Use these resources to install and
configure the software and to troubleshoot and resolve
technical issues with Cisco products and technologies.
Access to most tools on the Cisco Support and
Documentation website requires a Cisco.com user ID
and password.