Configuring System Timing
The system is equipped with a clock that supplies the timestamp for statistical counters, accounting records, logging, and event notification. After the initial configuration of the system clock, you can configure the system to communicate with one or more Network Time Protocol (NTP) server(s) to ensure that the clock is always accurate.
In addition to configuring the timing source, you must configure the system's time zone.
Setting the System Clock and Time Zone
Use the following command example to configure the system clock and time zone:
clock set date:time
configure
clock timezone timezone [ local ]
end
-
Enter the date and time in the format YYYY:MM:DD:HH:mm or YYYY:MM:DD:HH:mm:ss.
-
Refer to the online Help for the clock timezone command for a complete list of supported time zones.
-
The optional local keyword indicates that the time zone specified is the local timezone.
-
Daylight Savings Time is automatically adjusted for time zones supporting it.
Save your configuration as described in the Verifying and Saving Your Configuration chapter.
Verifying and Saving Your Clock and Time Zone Configuration
Enter the following command to verify that you configured the time and time zone correctly:
show clock
The output displays the date, time, and time zone that you configured.
Configuring Network Time Protocol Support
This section provides information and instructions for configuring the system to enable the use of the Network Time Protocol (NTP).
![]() Important |
Configure the system clock and time zone prior to implementing NTP support. This greatly reduces the time period that must be corrected by the NTP server. |
Many of the services offered by the StarOS require accurate timekeeping derived through NTP. If the time reference(s) used by StarOS are not accurate, the services may be unreliable. For this reason it should be assumed that normal system operation requires that NTP be configured.
The system uses NTP to synchronize its internal clock to external time sources (typically GPS NTP sources, or other Stratum 2 or 3 servers, switches or routers).
-
NTP enabled.
-
NTP configured for use in the local context only. Use of other contexts (which can be specified in the enable configurable) will cause issues.
-
NTP configured for at least three external NTP servers. With three or more servers, outlyers and broken or misconfigured servers can be detected and excluded. Generally, the more servers the better (within reason).
![]() Important |
Do not configure any external NTP servers using the prefer keyword. The NTP clock selection algorithms already have the built-in ability to pick the best server. Use of prefer usually results in a poorer choice than NTP can determine for itself. |
![]() Important |
Do not change the maxpoll, minpoll, or version keyword settings unless instructed to do so by Cisco TAC. |
Use the following example to configure the necessary NTP association parameters:
configure
ntp
enable
server ip_address1
server ip_address2
server ip_address3
end
-
By default context_name is set to local. This is the recommended configuration.
-
A number of options exist for the server command. Refer to the NTP Configuration Mode Commands chapter in the Command Line Interface Reference for more information.
-
Enter the IP address of NTP servers using IPv4 dotted-decimal or IPv6 colon-separated-hexadecimal notation.
-
You can configure a maximum of 6 NTP server IP addresses.
![]() Important |
Configure the system with at least three (preferably four) NTP servers. |
Save the configuration as described in the Verifying and Saving Your Configuration chapter.
Configuring NTP Servers with Local Sources
NTP can use network peers, local external clocks (such as GPS devices), or a local clock with no external source.
A local clock with no external source is usually a last-resort clock when no better clock is available. It is typically configured on a site's intermediate NTP server so that when a WAN network outage occurs, hosts within the site can continue to synchronize amongst themselves.
You can configure this in ntpd or on many commercially available NTP devices. This local clock should always have a high stratum number (8+) so that under normal conditions (when real sources are available) this local clock will not be used.
Using a Load Balancer
The NTP daemon and protocol assume that each configured server is running NTP. If a NTP client is configured to synchronize to a load balancer that relays and distributes packets to a set of real NTP servers, the load balancer may distribute those packets dynamically and confuse the NTP client. NTP packets are latency and jitter sensitive. Relaying them through a load balancer can confuse the NTP client and is not a supported practice.
Verifying the NTP Configuration
Verify the NTP configuration is correct. Enter the following command at the Exec mode prompt:
show ntp associations
The output displays information about all NTP servers. See the output below for an example deploying two NTP servers.
+----Peer Selection: ( ) - Rejected / No Response
| (x) - False Tick
| (.) - Excess
| (-) - Outlyer
| (+) - Candidate
| (#) - Selected
| (*) - System Peer
| (o) - PPS Peer
v
remote refid st t when poll reach delay offset jitter
==============================================================================
*10.81.254.202 .GPS. 1 u 160 1024 377 21.516 0.019 0.009
The following table describes the parameters output by the show ntp associations command.
Column Title | Description |
---|---|
remote |
|
refid |
Last reported NTP reference to which the server is synchronizing. |
st |
NTP server stratum level. |
t |
Communication type: broadcast, multicast, etc. |
when |
Number of seconds since the last contact. |
poll |
Polling interval between the system and the NTP server. |
reach |
Octal value of the reachability shift register indicating which responses were received for the previous eight polls to this NTP server. |
delay |
Round-trip delay (in milliseconds) for messages exchanged between the system and the NTP server. |
offset |
Number of milliseconds by which the system clock must be adjusted to synchronize it with the NTP server. |
jitter |
Jitter in milliseconds between the system and the NTP server. |