Professional Documents
Culture Documents
NTP Overview
The Network Time Protocol (NTP) was first described in RFC 958 and has developed into the standard
Internet time synchronization protocol. It is extremely efficient and needs no more than about one packet a
minute to synchronize systems on a LAN to within 1 millisecond, and systems across WANs to within about
10 milliseconds.
Without proper time synchronization between your routers, you may not only have trouble with correlating
log files, but inaccurate time may also affect your ability to perform accounting, fault analysis, network
management, and even time-based AAA authentication and authorization. So good time management is a
necessary part of keeping your network healthy and secure.
NTP can operate in four different modes--client, server, peer, and broadcast. These modes provide
NTP with a great amount of flexibility in how you configure synchronization on your network.
NTP modes differ based on how NTP allows communication between systems. NTP communication
consists of time requests and control queries. Time requests provide the standard client/server relationship in
which a client requests time synchronization from an NTP server. Control queries provide ways for remote
systems to get configuration information and reconfigure NTP servers. Here is a short explanation of the NTP
modes:
Client:
An NTP client is configured to let its clock be set and synchronized by an external NTP
timeserver. NTP clients can be configured to use multiple servers to set their local time and are
able to give preference to the most accurate time sources. They will not, however, provide
synchronization services to any other devices.
Server:
An NTP server is configured to synchronize NTP clients. Servers can be configured to
synchronize any client or only specific clients. NTP servers, however, will accept no
synchronization information from their clients and therefore will not let clients update or affect
the server's time settings.
Broadcast/multicast
Broadcast/multicast mode is a special server mode with which the NTP server broadcasts its
synchronization information to all clients. Broadcast mode requires that clients be on the same
subnet as the server, and multicast mode requires that clients and servers have multicast access
available and configured.
On server:-
1. Verify that you have a suitable NTP server. Enter:
NOTE: Sys peer should show a valid server or 127.127.1.0. If the server is "insane", you will need to correct
it by adding a server line to /etc/ntp.conf and restarting xntpd. This can be done by following these steps:
# vi /etc/ntp.conf
Add:
server 127.127.1.0
# stopsrc -s xntpd
# startsrc -s xntpd
NOTE: If the server runs databases, use the -x flag to prevent the clock from changing in a negative direction.
Enter the following:
2. Repeat Step 1 to verify that the server is synched. This process can take up to 12 minutes.
# ntpdate -d <ip.address.of.server>
The offset must be less than 1000 seconds for xntpd to synch. If the offset is greater than 1000
seconds, change the time manually on the client and run the
ntpdate -d again.
If you get the message, "no server suitable for synchronization found", verify xntpd is running on the
server (see above) and that no firewalls are blocking port 123.
# vi /etc/ntp.conf
(Comment out the "broadcastclient" line and add server ip.address.of.server prefer)
# startsrc -s xntpd
# vi /etc/rc.tcpip
If using the -x flag, add "-x" to the end of the line. You must include the quotes around the -x.
NOTE: Sys peer should display the IP address or name of your xntp server. This process may take up to 12
minutes.