SystemGlobal Config

ntp server [ip]

Configures the router to synchronize its system clock with an NTP server, ensuring accurate time for logging, authentication, and network protocols.

Syntax·Global Config
ntp server [ip]

When to Use This Command

  • Set up NTP on a router to synchronize time with a central NTP server for consistent logging across the network.
  • Configure multiple NTP servers for redundancy in case the primary server becomes unreachable.
  • Use NTP to ensure accurate timestamps for security logs and digital certificates in a corporate network.
  • Synchronize time on routers in a branch office with a head-end NTP server to maintain consistent time for routing protocols like OSPF.

Command Examples

Basic NTP server configuration

ntp server 192.168.1.1

This command configures the router to synchronize its clock with the NTP server at IP address 192.168.1.1. No output is displayed upon successful configuration.

Verifying NTP association after configuration

show ntp associations
  address         ref clock     st  when  poll reach  delay  offset   disp
*~192.168.1.1     .GPS.            1   23    64   377   1.234  0.123   0.456
+~10.0.0.1        .GPS.            2   12    64   377   2.345  0.234   0.567

The output shows NTP associations. The asterisk (*) indicates the current synchronization source. 'address' is the NTP server IP, 'ref clock' is the reference clock source (e.g., GPS), 'st' is stratum level (lower is better), 'when' is seconds since last sync, 'poll' is polling interval, 'reach' is reachability (377 means all 8 attempts successful), 'delay' is round-trip delay in ms, 'offset' is time difference in ms, 'disp' is dispersion in ms. Good values: low delay, offset near 0, high reach.

Understanding the Output

The 'show ntp associations' command displays the status of NTP peers. The asterisk (*) marks the server currently used for synchronization. The 'st' column shows stratum; stratum 1 is most accurate (directly connected to a reference clock). 'when' indicates seconds since the last update; a low value is good. 'poll' is the polling interval in seconds. 'reach' is an octal value; 377 (all 8 bits set) means the last 8 polls were successful. 'delay' and 'offset' should be low for accurate time; high values may indicate network issues. 'disp' is the dispersion, representing the maximum error; lower is better. If no server is selected (no asterisk), check reachability and network connectivity.

CCNA Exam Tips

1.

CCNA exam tip: NTP uses UDP port 123; ensure ACLs allow this traffic.

2.

CCNA exam tip: The 'ntp server' command is configured in global config mode; verify with 'show ntp status'.

3.

CCNA exam tip: Stratum levels: 1 is most accurate, 16 is unsynchronized; routers typically operate at stratum 2-10.

4.

CCNA exam tip: Use 'ntp peer' for symmetric active mode (not in CCNA scope), but know the difference.

Common Mistakes

Mistake: Forgetting to configure 'ntp update-calendar' to update the hardware clock; the system clock resets after reboot.

Mistake: Using an incorrect or unreachable NTP server IP; verify connectivity with 'ping'.

Mistake: Not allowing NTP through ACLs; the router will not synchronize.

Related Commands

Practice for the CCNA 200-301

Test your knowledge with hundreds of CCNA practice questions covering all exam domains.

Practice CCNA Questions