Setting Up NTP


Because most Cisco networks of any size span the globe, it is important to synchronize the times on the devices so that all messages and events are logged based on a common time source, especially if they are managed from a central or regional location.

In order to accomplish this feat, NTP (Network Time Protocol) should be configured on the devices. The Network Time Protocol (NTP) is a protocol designed to time-synchronize a network of machines. NTP runs over UDP and is documented in RFC 1305.

Configuring NTP makes management of your network easier with respect to the consistent timestamps on syslog messages. In conjunction with timestamping the log messages on the router, you can use NTP to synchronize the times for easier event correlation. For example, if a LAN interface goes down on a router and users start complaining about poor performance or lack of connectivity, you can correlate the syslog system timestamp in the log to the first trouble ticket reported by the user to a central network operations center or NOC. If there are local support personnel, they can correlate the local timestamps in the router log to that of the user complaint or the syslog server.

An NTP network usually gets its time from an authoritative time source, such as a radio clock or an atomic clock attached to a timeserver, typically located somewhere on the Internet. NTP then distributes this time across the network.

NTP uses the concept of a stratum to describe how many NTP "hops" away a machine is from an authoritative time source. A stratum 1 timeserver has a radio or atomic clock directly attached, a stratum 2 timeserver receives its time via NTP from a stratum 1 timeserver, and so on. A machine running NTP will automatically choose as its time source the machine with the lowest stratum number that it is configured to communicate with via NTP.

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 by exchanging NTP messages between each pair of machines with an association.

Cisco's implementation of NTP does not support stratum 1 service; in other words, it is not possible to connect to a radio or atomic clock via a Cisco device. It is recommended that time service for your network be derived from public NTP servers available in the IP Internet.

If the network is isolated from the Internet, Cisco's implementation of NTP allows a machine to be configured so that it acts as if it is synchronized via NTP, when in fact it has determined the time using other means. Other machines then synchronize to that machine via NTP.

The following are recommended steps to configure NTP in a network that is isolated from the Internet (Use either step 1 or 2, but not both):

  1. Identify the source of the higher stratum clock time-server that the master NTP clock router points to, such as a workstation running NTP server software either internal to the network or an external time-server source.

  2. Identify a centralized or core router(s) that can act as the NTP master clock server. Ideally, this router(s) should have connectivity to the access portions of your network within two router hops.

Configuring NTP on a Router

Here are the steps to configure NTP on the router if option 2 is used:

  1. Set the clock on the identified NTP master router(s) using the following CLI commands:

     clock set hh:mm:ss dd mmm yyyy clock update-calendar 
  2. Set up NTP on the NTP master router(s) using the following configuration commands:

     clock calendar-valid ntp master 1 ntp source Loopback0 
  3. Point the other routers in the network to the NTP master clock router by executing the following CLI configuration command: ntp update-calendar

     ntp peer ip-address ntp source Loopback0 
  4. Point all Catalyst Series switches to the master NTP server (router) by using the following CLI set commands:

     set ntp broadcastclient disable set ntp broadcastdelay 3000 set ntp client enable set ntp server ip_address clear timezone set summertime disable 

For more information regarding NTP configurations, please refer to the following CCO Web pages (see the references at the end of this chapter for the appropriate URLs):

"Performing the Basic System Management" (Router)

"Configuring NTP" (Catalyst Switches)

For details regarding the different time-serving methodologies that may be implemented in a network refer to the following Web page, Time WWW server: http://www.eecis.udel.edu/~ntp/.



Performance and Fault Management
Performance and Fault Management: A Practical Guide to Effectively Managing Cisco Network Devices (Cisco Press Core Series)
ISBN: 1578701805
EAN: 2147483647
Year: 2005
Pages: 200

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net