Achievable logoAchievable logo
CCNA
Sign in
Sign up
Purchase
Textbook
Practice exams
Support
How it works
Exam catalog
Mountain with a flag at the peak
Textbook
Introduction
1. Introduction to networking
2. Administering Ethernet LANs
3. IP connectivity
4. Network services
4.1 Access Control Lists (ACLs)
4.2 Network Address Translation (NAT)
4.3 Dynamic Host Configuration Protocol (DHCP)
4.4 Domain Name Service (DNS)
4.5 Quality of Service (QoS)
4.6 Network Time Protocol (NTP)
5. IPv6
6. Wireless networking
7. Network management and administering network devices
8. Network security fundamentals
9. Network automation and programmability
Wrapping up
Achievable logoAchievable logo
4.6 Network Time Protocol (NTP)
Achievable CCNA
4. Network services
Our CCNA course is currently in development and is a work-in-progress.

Network Time Protocol (NTP)

7 min read
Font
Discuss
Share
Feedback

Setting the time manually

Routers on your network need accurate, up-to-date time. Each router has an internal clock, but the factory default time may be incorrect or set to a different time zone. When you need to set the time directly, you can set the time manually from Privileged mode.

Command HH:MM:SS Day of the Month Month of the Year Year
clock set 12:30:00 1 January 2026

clock set 12:30:00 1 January 2026

The command above sets the router’s time to 12:30pm on January 1st 2026.

To verify the current time on the router, enter the show clock command.

Image 228

Image Title - Configuring and verifying the time on R1

Please be aware that the clock set command is configured in Privileged mode. This is one of the few commands in Privileged mode that allow you to configure something on the Router.

If you need the router’s clock to match its local time zone, configure the time zone in Global Configuration mode.

Command Name of the Time Zone (EST, CST, PST) Hours Offset
clock timezone EST -5

configure terminal
clock timezone EST -5

You can also configure the router to honor Daylight Savings Time (in the United States).

In Global Configuration mode, enter the following command:

clock summer-time EDT recurring

Manually setting the clock can be fine in a lab, or in environments where time accuracy isn’t critical. In a larger network, though, accurate time becomes essential.

For example, if several routers experience a brief outage, you’ll often review logs to correlate events across devices. If the routers’ clocks aren’t synchronized, log timestamps won’t line up. That makes it harder to determine which log messages are related to the outage and which occurred outside the event window. This is why it’s important to keep time synchronized across all network devices (not just routers).

Network Time Protocol (NTP)

NTP is a protocol that synchronizes time across network devices. In our case, we configure NTP on routers. NTP uses UDP port 123 when exchanging time synchronization packets.

NTP organizes time sources into a hierarchy called stratums. A stratum indicates the trustworthiness of a time source. Stratums range from stratum 0 to stratum 16. The lower the stratum, the more accurate the time.

Image 229

Image Title - NTP stratums

The most trustworthy is stratum 0. This stratum typically includes atomic clocks, which measure the frequency of atoms and provide extremely accurate time. These clocks are typically carried on GPS satellites, and atomic-clock time is also accessible on the Internet.

When a device uses a time source from a particular stratum, that device is placed in the next stratum number. In other words, each “hop” away from the original source is considered less accurate than the previous stratum.

For example, if a server or router uses an atomic clock as its time source, that server or router is in stratum 1. This is the most accurate time source most organizations can use (unless they own atomic clocks). That stratum 1 device can then act as the time source for the rest of the network, keeping all devices synchronized.

The higher the stratum number, the less accurate the time source is considered to be. Each time you piggyback off of a time source within a particular stratum, you get placed within a stratum number higher than that time source. Once you reach stratum 16, your time is considered unsynchronized or unreliable. This indicates that the device is not connected to a valid time source. This is actually the default stratum on a Cisco Router that does not have its clocked synchronized with a time source.

Configuring a router as an NTP server

You can configure a Cisco router to act as the time source for your network.

Before you do this, the router needs a correct clock. You can either:

  • Set the clock manually, or
  • Use a stratum 0 or stratum 1 time source on the Internet for the best possible accuracy

Then, in Global Configuration mode, enter the command below.

Command Stratum number
ntp master 2

configure terminal
ntp master 2

This configures the router as an NTP Server, running in stratum 2.

Configuring a router as an NTP client

Suppose your NTP Server is R1, and another router, R2, is connected to it. You want R2 to act as an NTP Client and synchronize its time using R1’s clock.

R2 (the client) sends an NTP Time Request to the server. The server responds with its current time, allowing R2 to synchronize.

To configure the client, you need the IP address of the NTP server (R1). In this example, it’s 10.1.1.1.

Image 230

Image Title - R2 as an NTP Client synchronizing time with R1 the NTP Server

To point an NTP client router to an NTP server, enter the following command in Global Configuration mode:

Command IP address of the NTP Server
ntp server 10.1.1.1

configure terminal
ntp server 10.1.1.1

Verifying the NTP status on a router

To confirm that the router has synchronized with a valid time source, run this show command:

show ntp status

Image 231

Image Title - Show ntp status command on R2 displaying the time is unsynchronized

If the router hasn’t synchronized yet, you’ll see:

  • The message “Clock is unsynchronized”
  • A stratum number of 16
  • The message “no reference clock”

Another sign is in the output of show clock. If you see an asterisk (*) next to the time, it indicates the clock has not yet been synchronized with a valid time source and the clock is also not manually set (it’s still using the default clock settings).

Image 232

Image Title - Show clock command on R2 displaying the time is unsynchronized

NTP synchronization can take several minutes. Once the clock has synchronized, the output of show ntp status should look like this:

Image 233

Image Title - Show ntp status command on R2 displaying the time is now synchronized

Notice that the reference clock now displays the IP address of the NTP server.

When you run:

show clock

the time should display without an asterisk or any special character. That indicates the clock has synchronized with a valid time source.

Image 234

Image Title - Show clock command on R2 displaying the time is now synchronized

The clock will also display without any preceding characters if the time was manually set on the router.

Here are some NTP codes that can show up in the output from the show clock command:

NTP Code Indication
Asterisk (*) The time is not authoritative, meaning, it is not synchronized with a valid time source, and the clock is also not set manually.
Blank When no special characters precede the time, that means that the time is authoritative, meaning it is synchronized with a time source, or the clock has been manually set.
Period (.) The time is authoritative however, the Router has lost its synchronization with its NTP Server and the clock may be out of sync.

Setting the time manually

  • Use clock set command in Privileged mode to set router time
  • Verify time with show clock
  • Set time zone with clock timezone in Global Configuration mode
    • Example: clock timezone EST -5
  • Enable Daylight Savings with clock summer-time EDT recurring

Importance of clock synchronization

  • Accurate time needed for log correlation across devices
  • Unsynchronized clocks complicate troubleshooting and event analysis

Network Time Protocol (NTP)

  • Synchronizes time across network devices using UDP port 123
  • Time sources organized by stratums (0-16)
    • Lower stratum = more accurate/trustworthy
    • Stratum 0: atomic clocks (most accurate)
    • Stratum 16: unsynchronized/unreliable

Configuring a router as an NTP server

  • Router must have correct clock (manual or external source)
  • Use ntp master [stratum] in Global Configuration mode
    • Example: ntp master 2 sets router as stratum 2 NTP server

Configuring a router as an NTP client

  • Use ntp server [IP address] to point client to NTP server
    • Example: ntp server 10.1.1.1
  • Client synchronizes its clock with server’s time

Verifying the NTP status on a router

  • Use show ntp status to check synchronization
    • “Clock is unsynchronized”, stratum 16, “no reference clock” = not synced
  • Use show clock to view current time and sync status
    • Asterisk (*) = not authoritative, not synced, not manually set
    • Blank = authoritative (synced or manually set)
    • Period (.) = authoritative but lost sync with NTP server
  • NTP sync may take several minutes to complete

Sign up for free to take 5 quiz questions on this topic

Previous
Next  | 5.1 IPv6 address format and abbreviation
All rights reserved ©2016 - 2026 Achievable, Inc.

Network Time Protocol (NTP)

Setting the time manually

Routers on your network need accurate, up-to-date time. Each router has an internal clock, but the factory default time may be incorrect or set to a different time zone. When you need to set the time directly, you can set the time manually from Privileged mode.

Command HH:MM:SS Day of the Month Month of the Year Year
clock set 12:30:00 1 January 2026

clock set 12:30:00 1 January 2026

The command above sets the router’s time to 12:30pm on January 1st 2026.

To verify the current time on the router, enter the show clock command.

Image 228

Image Title - Configuring and verifying the time on R1

Please be aware that the clock set command is configured in Privileged mode. This is one of the few commands in Privileged mode that allow you to configure something on the Router.

If you need the router’s clock to match its local time zone, configure the time zone in Global Configuration mode.

Command Name of the Time Zone (EST, CST, PST) Hours Offset
clock timezone EST -5

configure terminal
clock timezone EST -5

You can also configure the router to honor Daylight Savings Time (in the United States).

In Global Configuration mode, enter the following command:

clock summer-time EDT recurring

Manually setting the clock can be fine in a lab, or in environments where time accuracy isn’t critical. In a larger network, though, accurate time becomes essential.

For example, if several routers experience a brief outage, you’ll often review logs to correlate events across devices. If the routers’ clocks aren’t synchronized, log timestamps won’t line up. That makes it harder to determine which log messages are related to the outage and which occurred outside the event window. This is why it’s important to keep time synchronized across all network devices (not just routers).

Network Time Protocol (NTP)

NTP is a protocol that synchronizes time across network devices. In our case, we configure NTP on routers. NTP uses UDP port 123 when exchanging time synchronization packets.

NTP organizes time sources into a hierarchy called stratums. A stratum indicates the trustworthiness of a time source. Stratums range from stratum 0 to stratum 16. The lower the stratum, the more accurate the time.

Image 229

Image Title - NTP stratums

The most trustworthy is stratum 0. This stratum typically includes atomic clocks, which measure the frequency of atoms and provide extremely accurate time. These clocks are typically carried on GPS satellites, and atomic-clock time is also accessible on the Internet.

When a device uses a time source from a particular stratum, that device is placed in the next stratum number. In other words, each “hop” away from the original source is considered less accurate than the previous stratum.

For example, if a server or router uses an atomic clock as its time source, that server or router is in stratum 1. This is the most accurate time source most organizations can use (unless they own atomic clocks). That stratum 1 device can then act as the time source for the rest of the network, keeping all devices synchronized.

The higher the stratum number, the less accurate the time source is considered to be. Each time you piggyback off of a time source within a particular stratum, you get placed within a stratum number higher than that time source. Once you reach stratum 16, your time is considered unsynchronized or unreliable. This indicates that the device is not connected to a valid time source. This is actually the default stratum on a Cisco Router that does not have its clocked synchronized with a time source.

Configuring a router as an NTP server

You can configure a Cisco router to act as the time source for your network.

Before you do this, the router needs a correct clock. You can either:

  • Set the clock manually, or
  • Use a stratum 0 or stratum 1 time source on the Internet for the best possible accuracy

Then, in Global Configuration mode, enter the command below.

Command Stratum number
ntp master 2

configure terminal
ntp master 2

This configures the router as an NTP Server, running in stratum 2.

Configuring a router as an NTP client

Suppose your NTP Server is R1, and another router, R2, is connected to it. You want R2 to act as an NTP Client and synchronize its time using R1’s clock.

R2 (the client) sends an NTP Time Request to the server. The server responds with its current time, allowing R2 to synchronize.

To configure the client, you need the IP address of the NTP server (R1). In this example, it’s 10.1.1.1.

Image 230

Image Title - R2 as an NTP Client synchronizing time with R1 the NTP Server

To point an NTP client router to an NTP server, enter the following command in Global Configuration mode:

Command IP address of the NTP Server
ntp server 10.1.1.1

configure terminal
ntp server 10.1.1.1

Verifying the NTP status on a router

To confirm that the router has synchronized with a valid time source, run this show command:

show ntp status

Image 231

Image Title - Show ntp status command on R2 displaying the time is unsynchronized

If the router hasn’t synchronized yet, you’ll see:

  • The message “Clock is unsynchronized”
  • A stratum number of 16
  • The message “no reference clock”

Another sign is in the output of show clock. If you see an asterisk (*) next to the time, it indicates the clock has not yet been synchronized with a valid time source and the clock is also not manually set (it’s still using the default clock settings).

Image 232

Image Title - Show clock command on R2 displaying the time is unsynchronized

NTP synchronization can take several minutes. Once the clock has synchronized, the output of show ntp status should look like this:

Image 233

Image Title - Show ntp status command on R2 displaying the time is now synchronized

Notice that the reference clock now displays the IP address of the NTP server.

When you run:

show clock

the time should display without an asterisk or any special character. That indicates the clock has synchronized with a valid time source.

Image 234

Image Title - Show clock command on R2 displaying the time is now synchronized

The clock will also display without any preceding characters if the time was manually set on the router.

Here are some NTP codes that can show up in the output from the show clock command:

NTP Code Indication
Asterisk (*) The time is not authoritative, meaning, it is not synchronized with a valid time source, and the clock is also not set manually.
Blank When no special characters precede the time, that means that the time is authoritative, meaning it is synchronized with a time source, or the clock has been manually set.
Period (.) The time is authoritative however, the Router has lost its synchronization with its NTP Server and the clock may be out of sync.
Key points

Setting the time manually

  • Use {`clock set`} command in Privileged mode to set router time
  • Verify time with {`show clock`}
  • Set time zone with {`clock timezone`} in Global Configuration mode
    • Example: {`clock timezone EST -5`}
  • Enable Daylight Savings with {`clock summer-time EDT recurring`}

Importance of clock synchronization

  • Accurate time needed for log correlation across devices
  • Unsynchronized clocks complicate troubleshooting and event analysis

Network Time Protocol (NTP)

  • Synchronizes time across network devices using UDP port 123
  • Time sources organized by stratums (0-16)
    • Lower stratum = more accurate/trustworthy
    • Stratum 0: atomic clocks (most accurate)
    • Stratum 16: unsynchronized/unreliable

Configuring a router as an NTP server

  • Router must have correct clock (manual or external source)
  • Use {`ntp master [stratum]`} in Global Configuration mode
    • Example: {`ntp master 2`} sets router as stratum 2 NTP server

Configuring a router as an NTP client

  • Use {`ntp server [IP address]`} to point client to NTP server
    • Example: {`ntp server 10.1.1.1`}
  • Client synchronizes its clock with server’s time

Verifying the NTP status on a router

  • Use {`show ntp status`} to check synchronization
    • “Clock is unsynchronized”, stratum 16, “no reference clock” = not synced
  • Use {`show clock`} to view current time and sync status
    • Asterisk (*) = not authoritative, not synced, not manually set
    • Blank = authoritative (synced or manually set)
    • Period (.) = authoritative but lost sync with NTP server
  • NTP sync may take several minutes to complete

More from Network services

  • Network Address Translation (NAT)
  • Dynamic Host Configuration Protocol (DHCP)
  • Domain Name Service (DNS)
  • Quality of Service (QoS)