Network Time Protocol
Network Time Protocol
TABLE OF CONTENTS
1 General..........................................................................................................................................................1
2 NTP Architecture...........................................................................................................................................2
3 Configuration.................................................................................................................................................2
3.1 Static time config..................................................................................................................................2
3.2 Server config.........................................................................................................................................2
3.3 Client config..........................................................................................................................................3
3.4 Validate.................................................................................................................................................3
1 GENERAL
1
2 NTP ARCHITECTURE
- Client/server model
- NTP primary server:
o only acts as server
o directly connected to an authoritative time source
o stratum level 1
- NTP secondary server:
o server that uses client/server mode
o relies on synchronization with some other NTP server
- NTP Peer
o Devices that are both connected to an external NTP source
o Peers act as clients and server to each other. They try to blend their time
o Used in redundant setups (e.g. 2 WAN routers)
o Peers adjust at a maximum rate of two minutes per query
3 CONFIGURATION
- Best practice to first set the clock statically to a reasonable time before NTP syncing
Time Belgium:
clock summer-time CEST recurring last Sun Mar 2:00 last Sun Oct 3:00
2
Ntp master stratum-lvl Conf Device acts as NTP server only. Gets its
time information from the internal clock on
the device, default level is 8
Ntp source loopback nr Conf
Ntp peer ipAddress Conf
ntp server {address|hostname} [prefer] Conf - Device can act both as client or
[source interface] server. First it acts as a client and
synchronizes its time with the
server. Then it acts as a server
itself
- Multiple servers can be set for
redundancy, but only one server is
actively used
- Source is used to stipulate the
source IP address for queries to
server
- Prefer keyword for which NTP
server the time should come from
ntp source GigabitEthernet0/0 Conf Exaple when using VRF
ntp server vrf MgmtVRF 10.24.0.1
ntp logging Conf Log NTP events
ntp panic update Conf Reject time updates too for of internal
clock (> panic threshold (default 1000Sec))
Service timestamps log datetime localtime Conf Sync logging time with local NTP time
3.4 VALIDATE