NTP – Watch Your Time

Just like you wear a watch to have time, network devices have a time protocol called NTP that does just that. The following are my study notes on the subject.

  • There are two types of clocks: hardware clock and software clock.
  • The hardware clock has its own battery. When router shuts down, hardware calendar still works.
  • When we reboot router, the software clock synchronizes with hardware clock, even if we already set the software clock.
  • Once the software clock is user-defined, we can synchronize the hardware clock with it, with “clock update-calendar”.
  • with “show clock” and “show clock detail”, if an asterisk is displayed then the time server is not authoritative which means that it is not reliable.
  • The protocol has a notion of stata. Each time server has a stratum:
    • Server with stratum 0 has more precise time than server with stratum 1, etc.
    • Server with stratum 1 feeds server with stratum 2, which feeds server with stratum 3, etc.
  • NTP synchronises software clock only, by default. We can instruct NTP to synchronize hardware clock too with “ntp update-calendar”.

Time Synchronisation between a Cisco Catalyst 6500 switch and Active Directory

Script: 6500 switch is the corporate time server

Server team wants to synchronize Active Directory time with the NTP server.


  • enable debugs:

debug ntp all

  • check logs on the 6500 switch:
ntp active passive

It seemed that there’s a “passive/active” concept in NTP :)

The 6500 switch supports both NTP active and passive modes. By default, it only accepts NTP active mode.
We need to enable NTP passive mode on the 6500 switch.

Clock Configuration

Time precision on syslog messages is important for event tracing and history.

1. set the clock: #clock set 18:21:00 21 November 2010

2. set the timezone: (config)#clock timezone UTC 1

clock timezone utc
To play with the syslog message format, in the timestamp section, there’s the following command:
(config)#service timestamp log {datetime | uptime} …

service timestamp log

a simple “exit” can give us what the new syslog format looks like:

syslog format after ntp configuration
the time displayed is the local one. We can see “UTC” as the time zone. The difference between local time and time-zone is the time offset -which is 1 hour for my country Tunisia.

Be First to Comment

Leave a Reply

Your email address will not be published. Required fields are marked *