NTP – Network Time Protocol

Categories Cisco, Route, Switch

NTP is a layer 3 protocol. NTP is used for proper time, which is critical in networks. Making sure the network devices are all synchronized with the same time can help with management. Networking devices utilize time for several reasons:

  • Logging output
  • Debugging output
  • User ‘show’ commands
  • Network management/Reporting tools
  • Certificates – If time is incorrect your certificates can become out-of-date

Where do we get the time?

  • All devices have an internal system clock.
  • Most are battery driven and maintain the time/date when the device reloads
  • Devices with battery driven system clocks can also distribute this information to remove devices VIA NTP.

Sources Of Time

  • Manual configuration ie: clock set command
  • NTP
  • SNTP
  • VINES

NTP

  • IETF Standard – RFC 1305 and RFC 5905
  • UDP port 123 (source and destination)
  • NTP nodes obtain time from an authoritative source:
    -Atomic clock
    -GPS
    -Radio
    -Other network devices

NTP Device Roles

  • Client – Device that periodically polls a server for time/calendar information.
  • Server – Provides the information to the client.
  • Stratum 1 – Most accurate clock
  • Stratum 2 – Time server that is one hop away from stratum-1 device, etc
  • The default for an ntp master is stratum 8.
  • When using authentication the clients authenticate the server.

IOS Configuration (server aka Master)

clock set hour:minute:seconds day month year
conf t
ntp master [1 - 15]

IOS Configuration (Client)

conf t
ntp server x.x.x.x

IOS Server Authentication Config

ntp authentication-key 1 md5 something
ntp trusted-key 1

IOS Client Authentication Config

ntp authentication-key 1 md5 something
ntp trusted-key 1
ntp authenticate
ntp server x.x.x.x key 1

Verification

show ntp status
show ntp associations
show ntp stat | i in sync

**look for asterisk , clock is synced or synchronized references.**

**show ntp association detail will show authenticated**