Chapter 7 Administering the Switch

Managing the System Time and Date

Beginning in privileged EXEC mode, follow these steps to form an NTP association with another device:

 

Command

Purpose

Step 1

 

 

configure terminal

Enter global configuration mode.

Step 2

 

 

ntp peer ip-address[version number]

Configure the switch system clock to synchronize a peer or to be

 

[key keyid] [source interface] [prefer]

synchronized by a peer (peer association).

 

or

or

 

ntp server ip-address[version number]

Configure the switch system clock to be synchronized by a time server

 

[key keyid] [source interface] [prefer]

(server association).

 

 

No peer or server associations are defined by default.

 

 

For ip-addressin a peer association, specify either the IP address of

 

 

the peer providing, or being provided, the clock synchronization. For

 

 

a server association, specify the IP address of the time server

 

 

providing the clock synchronization.

 

 

(Optional) For number, specify the NTP version number. The range is

 

 

1 to 3. By default, Version 3 is selected.

 

 

(Optional) For keyid, enter the authentication key defined with the

 

 

ntp authentication-keyglobal configuration command.

 

 

(Optional) For interface, specify the interface from which to pick the

 

 

IP source address. By default, the source IP address is taken from the

 

 

outgoing interface.

 

 

(Optional) Enter the prefer keyword to make this peer or server the

 

 

preferred one that provides synchronization. This keyword reduces

 

 

switching back and forth between peers and servers.

Step 3

 

 

end

Return to privileged EXEC mode.

Step 4

 

 

show running-config

Verify your entries.

Step 5

 

 

copy running-config startup-config

(Optional) Save your entries in the configuration file.

 

 

 

You need to configure only one end of an association; the other device can automatically establish the association. If you are using the default NTP version (Version 3) and NTP synchronization does not occur, try using NTP Version 2. Many NTP servers on the Internet run Version 2.

To remove a peer or server association, use the no ntp peer ip-addressor the no ntp server ip-addressglobal configuration command.

This example shows how to configure the switch to synchronize its system clock with the clock of the peer at IP address 172.16.22.44 using NTP Version 2:

Switch(config)# ntp server 172.16.22.44 version 2

Configuring NTP Broadcast Service

The communications between devices running NTP (known as associations) are usually statically configured; each device is given the IP addresses of all devices with which it should form associations. Accurate timekeeping is possible by exchanging NTP messages between each pair of devices 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 device can simply be configured to send or receive broadcast messages. However, the information flow is one-way only.

Catalyst 3750-E and 3560-E Switch Software Configuration Guide

7-6

OL-9775-02

 

 

Page 172
Image 172
Cisco Systems 3750E manual Configuring NTP Broadcast Service, Ntp peer ip-address version number