cc/td/doc/product/l3sw/4840g/ios_12/120_10
hometocprevnextglossaryfeedbacksearchhelp
PDF

Table of Contents

Configuring NTP

Configuring NTP

This chapter describes how to configure the Network Time Protocol (NTP) on the Server Load Balancing (SLB) switch. For further information about the commands used in this chapter, refer to the command reference publications in the Cisco IOS documentation set and to "Command Reference."

This chapter includes the following sections:

About Network Time Protocol

NTP is a utility for synchronizing system clocks over the network, providing a precise time base for networked workstations and servers. In the NTP model, a hierarchy of primary and secondary servers pass timekeeping information by way of the Internet to cross-check clocks and correct errors arising from equipment or propagation failures.

An NTP server must be accessible by the client switch and is documented in RFC 1305. All NTP communication uses Coordinated Universal Time (UTC), which is the same as Greenwich Mean Time. An NTP network usually gets 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 one another.

NTP uses a stratum to describe how many NTP hops away a machine is from an authoritative time source. A stratum 1 time server has a radio or atomic clock directly attached, a stratum 2 time server receives its time from a stratum 1 time server, and so on. A machine running NTP automatically chooses as its time source the machine with the lowest stratum number that it is configured to communicate with through NTP. This strategy effectively builds a self-organizing tree of NTP speakers.

NTP has two ways to avoid synchronizing to a machine whose time might be ambiguous:

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 possible by exchanging NTP messages between each pair of machines with an association. However, in a LAN environment, you can configure NTP to use IP broadcast messages. With this alternative, you can configure the machine to send or receive broadcast messages, but the accuracy of timekeeping is marginally reduced because the information flow is one-way only.

The Cisco implementation of NTP does not support stratum 1 service; it is not possible to connect to a radio or atomic clock. We recommend that you obtain the time service for your network from the public NTP servers available in the IP Internet. If the network is isolated from the Internet, the Cisco NTP implementation allows a machine to be configured so that it acts as though it is synchronized using NTP, when in fact it has determined the time using other means. Other machines then synchronize to that machine using NTP.

A number of manufacturers include NTP software for their host systems, and a version for systems running UNIX and its various derivatives is also publicly available. This software allows host systems to be time-synchronized as well.

Configuring NTP

NTP services are enabled on all interfaces by default. You can configure your SLB switch in either of the following NTP associations:

From global configuration mode, use the following procedure to configure NTP in a server association that transmits broadcast packets and periodically updates the calendar:

Command Purpose

Step 1 

SLB-Switch(config)# ntp 
update-calendar

Updates hardware calendar with NTP time.

Step 2 

SLB-Switch(config)# ntp server 
ip-address				

Forms a server association with another system. You can specify multiple associations.

Step 3 

SLB-Switch(config)# end

SLB-Switch#

Returns to privileged EXEC mode.

Step 4 

SLB-Switch# copy 
system:running-config 
nvram:startup-config

Saves your configuration changes to NVRAM.

The following example configures NTP to set the hardware calendar and sets the NTP server IP addresses:

SLB-Switch(config)# ntp update-calendar

SLB-Switch(config)# ntp server 171.71.150.52

SLB-Switch(config)# ntp server 171.69.4.143

SLB-Switch(config)# ntp server 171.69.5.10

SLB-Switch(config)# end

SLB-Switch# copy system:running-config nvram:startup-config

Destination filename [startup-config]?
Building configuration...
[OK]
SLB-Switch# 
 

For information on other optional NTP configurations, see the Cisco IOS Configuration Fundamentals Configuration Guide. For a complete configuration example that includes NTP, see the "Example of an SLB and Layer 3 Switch with ISL, VLAN, and BVI with GEC" section.

To view the current NTP configuration and status, use the show ntp status or the show ntp associations commands.


hometocprevnextglossaryfeedbacksearchhelp
Posted: Thu Sep 28 15:25:08 PDT 2000
Copyright 1989-2000©Cisco Systems Inc.