CCNA Notes

200-301 Exam Prep

Progress0/67

0% complete

Practice TestsNew
1Networking Devices2Interfaces And Cables3OSI Model and TCP/IP Suite4Intro to the CLI5Ethernet LAN Switching - Part 16Ethernet LAN Switching - Part 27IPv4 Addressing - Part 18IPv4 Addressing - Part 29Switch Interfaces10The IPv4 Header11Routing Fundamentals - Part 111Static Routing - Part 212Life of a Packet13Subnetting - Part 114Subnetting - Part 215Subnetting (VLSM) - Part 316VLANs - Part 117VLANs - Part 218VLANs - Part 319DTP / VTP20Spanning Tree Protocol - Part 121Spanning Tree Protocol - Part 222Rapid Spanning Tree Protocol23Etherchannel24Dynamic Routing25RIP / EIGRP26OSPF - Part 127OSPF - Part 228OSPF - Part 329First Hop Redundancy Protocol30TCP and UDP31IPv6 - Part 132IPv6 - Part 233IPv6 - Part 334Standard Access Control List35Extended Access Control List36CDP and LLDP37NTP - Network Time Protocol38DNS - Domain Name System39DHCP - Dynamic Host Configuration Protocol40SNMP - Simple Network Management Protocol41SYSLOG42SSH - Secure Shell43FTP and TFTP44NAT (Static) - Part 145NAT (Dynamic) - Part 246QoS (Voice VLAN) - Part 147QoS (Quality of Service) - Part 248Security Fundamentals49Port Security50DHCP Snooping51Dynamic ARP Inspection52LAN Architectures53WAN Architectures54Virtualization and Cloud - Part 154Virtualization (Containers) - Part 254Virtualization (VRF) - Part 355Wireless Fundamentals56Wireless Architectures57Wireless Security58Wireless Configuration59Introduction to Network Automation60JSON, XML, and YAML61REST APIs62Software Defined Networking63Ansible, Puppet, and Chef67CCNA Complete Cheatsheet
/NTP - Network Time Protocol
Topic 374 min read

NTP - Network Time Protocol

/
Tip: Select text to highlight or pin your reading position

37. NTP

WHY IS TIME IMPORTANT FOR NETWORK DEVICES?

  • All DEVICES have an INTERNAL CLOCK (ROUTERS, SWITCHES, PCs, etc)
  • In CISCO IOS, you can view the time with the show clock command

imageClick to enlarge

  • If you use the show clock detail command, you can see the TIME SOURCE

imageClick to enlarge

  • The INTERNAL HARDWARE CLOCK of a DEVICE will “drift’ over time, so it’s NOT the ideal time source.

  • From a CCNA perspective, the most important reason to have accurate time on a DEVICE is to have ACCURATE logs for troubleshooting

  • Syslog, the protocol used to keep device logs, will be covered in a later video

Command: show logging

imageClick to enlarge

Note : R3’s time stamp is completely different than R2’s !!!

imageClick to enlarge


MANUAL TIME CONFIGURATION

  • You can manually configure the TIME on the DEVICE with the clock set command

imageClick to enlarge

  • Although the HARDWARE CALENDAR (built-in clock) is the DEFAULT time-source, the HARDWARE CLOCK and SOFTWARE CLOCK are separate and can be configured separately.

HARDWARE CLOCK (CALENDAR) CONFIGURATION

  • You can MANUALLY configure the HARDWARE CLOCK with the calendar set command

imageClick to enlarge

  • Typically, you will want to SYNCHRONIZE the ‘clock’ and ‘calendar’
  • Use the command clock update-calendar to sync the calendar to the clock’s time
  • Use the command clock read-calendar to sync the clock to the calendar’s time

imageClick to enlarge

imageClick to enlarge


CONFIGURING THE TIME ZONE

  • You can configure the time zone with the clock timezone command

imageClick to enlarge

DAYLIGHT SAVING TIME (SUMMER TIME)

imageClick to enlarge

imageClick to enlarge

Full command :

R1(config)# clock summer-time EDT recurring 2 Sunday March 02:00 1 Sunday November 02:00

This covers the START of Daylight Savings and the end of Daylight Savings

SUMMARY OF COMMANDS

imageClick to enlarge


NTP BASICS

  • Manually configuring the time on DEVICES is NOT Scalable
  • The manually configured clocks will “drift”, resulting in inaccurate time
  • NTP (Network Time Protocol) allows AUTOMATIC synchronization of TIME over a NETWORK
  • NTP CLIENTS request the TIME from NTP SERVERS
  • A DEVICE can be an NTP SERVER and an NTP CLIENT at the same time
  • NTP allows accuracy of TIME with ~1 millisecond if the NTP SERVER is in the same LAN - OR within ~50 milliseconds if connecting to the NTP SERVER over a WAN / the INTERNET
  • Some NTP SERVERS are ‘better’ than others. The ‘distance’ of an NTP SERVER from the original reference clock is called stratum
<aside> 💡 NTP uses UDP port 123 to communicate </aside>

REFERENCE CLOCK

  • A REFERENCE CLOCK is usually a VERY accurate time device like an ATOMIC CLOCK or GPS CLOCK
  • REFERENCE CLOCKS are stratum 0 within the NTP hierarchy
  • NTP SERVERS directly connected to REFERENCE CLOCKS are stratum 1

imageClick to enlarge

(Peering with Devices is called …)

imageClick to enlarge

  • An NTP CLIENT can SYNC to MULTIPLE NTP SERVERS

imageClick to enlarge


NTP CONFIGURATION

imageClick to enlarge

imageClick to enlarge

imageClick to enlarge

Using key argument “prefer” makes a given server the PREFERRED SERVER

(To show configuration servers)

imageClick to enlarge

sys.peer = This is the SERVER that the current ROUTER (R1) is being synchronized to

st = Stratum Tier

(To show NTP Status)

imageClick to enlarge

stratum 2 because it’s synchronizing from Google (stratum 1)

(To show NTP clock details)

imageClick to enlarge

This command configures the ROUTER to update the HARDWARE CLOCK (Calendar) with the time learned via NTP

R1(config)# ntp update-calendar

The HARDWARE CLOCK tracks the DATE and TIME on the DEVICE - even if it restarts, power is lost, etc.

When the SYSTEM is restarted, the HARDWARE CLOCK is used to INITIALIZE the SOFTWARE CLOCK


CONFIGURE A LOOPBACK INTERFACE FOR AN NTP SERVER

imageClick to enlarge

Why configure a LOOPBACK DEVICE on R1 for NTP ?

If one of R1’s ROUTER INTERFACES goes down, it will still be accessible via R3’s ROUTING path

imageClick to enlarge

SET NTP SERVER for R2 using the LOOPBACK INTERFACE on R1

imageClick to enlarge

SETTING R3 NTP SOURCE SERVERS using R1 and R2

imageClick to enlarge

NOTE : R1 has PREFERENCE because it’s STRATUM TIER is HIGHER than R2s


CONFIGURING NTP SERVER MODE

imageClick to enlarge

imageClick to enlarge

imageClick to enlarge

imageClick to enlarge

imageClick to enlarge


CONFIGURING NTP SYMMETRIC ACTIVE MODE

Command to configure NTP SYMMETRIC MODE R2(config)#ntp peer <peer ip address>

imageClick to enlarge

imageClick to enlarge


CONFIGURE NTP AUTHENTICATION

  • NTP AUTHENTICATION can be configured, although it is OPTIONAL
  • It allows NTP CLIENTS to ensure they only sync to the intended SERVERS
  • To CONFIGURE NTP AUTHENTICATION:
    • ntp authenticate (Enables NTP AUTHENTICATION)
    • ntp authenticate-key *key-number* md5 *key* (Create the NTP AUTHENTICATION Key(s))
    • ntp trusted-key *key-number* (Specify the Trusted Key(s))
    • ntp server *ip-address* key *key-number* (Specify which key to use for the server)

EXAMPLE CONFIGURATIONS

imageClick to enlarge


NTP COMMAND REVIEW

imageClick to enlarge

PreviousCDP and LLDP
NextDNS - Domain Name System