There are many reasons that an administrator will want to keep the time accurate on all systems in the infrastructure. Network Time Protocol (NTP) assists the administrator in this goal by automatically synchronizing the time between network devices.
Devices in the network running NTP can receive the correct time from an authoritative time source, such as a Cisco router, a radio clock, or an atomic clock attached to a timeserver.
To configure a router to receive the time from an authoritative time source on the network, use the following command:
ntp server {{[vrf vrf-name] ip-address hostname} [version
number] [key key-id] [source interface] [prefer]}
Some platforms have a battery-powered hardware clock, referred to as the calendar, in addition to the software-based system clock. The hardware clock runs continuously, even if the router is powered off or rebooted. It is a good practice to periodically update the hardware clock with the time learned from NTP. To do this, use this command:
ntp update-calendar
To have the router provide the correct time for the network, we can use this command:
ntp master [stratum]
The stratum value is an indicator of how close a device is to the master time source. Consider it like a hop count. If you set the stratum to 1 on the router, you are indicating that it is itself the authoritative time source.
We can also have the router synchronize the clock of a peer router, or be synchronized from that peer. The command to configure this is as follows:
ntp peer {{[vrf vrf-name] ip-address hostname}[normalsync][
version number] [key key-id] [source interface] [prefer]}
No comments:
Post a Comment