📘 CCNA 200-301 v1.1
4.2 Configure and verify NTP operating in a client and server mode
1. What is NTP?
- NTP (Network Time Protocol) is a protocol used to synchronize the clocks of devices (routers, switches, servers, etc.) in a network.
- Time synchronization is important in IT for:
- Logging events accurately
- Security (timestamps in authentication)
- Network troubleshooting (matching logs from different devices)
- Scheduling tasks or automation
In networks, devices can act as:
- NTP Server: Provides the accurate time to other devices.
- NTP Client: Receives time from an NTP server and synchronizes its clock.
2. NTP Modes in Networks
- Server Mode:
- The device provides time to other devices.
- Example: A data center router can act as an NTP server for all internal devices.
- Client Mode:
- The device synchronizes its clock with an NTP server.
- Example: A branch office switch receives time from a central office router configured as NTP server.
- Peer/Stratum:(optional for CCNA exam understanding)
- Servers can synchronize with other NTP servers for redundancy.
- Devices are categorized by stratum levels (stratum 1 = most accurate, stratum 2 = synced to stratum 1, etc.)
3. Configuring NTP on Cisco Devices
Step 1: Configuring an NTP Server
- Use a router or switch as the NTP server.
- You can configure it to sync with an external time source (like an internet NTP server) or provide its own local time.
Commands:
Router> enable
Router# configure terminal
Router(config)# ntp master 1
Explanation:
ntp master 1→ This makes the router act as an NTP server.- The number
1is the stratum level of the server (how accurate/trusted the time is).
Step 2: Configuring an NTP Client
- A client syncs its clock with a server.
Commands:
Router> enable
Router# configure terminal
Router(config)# ntp server 192.168.1.1
Explanation:
ntp server <IP>→ Sets the IP address of the NTP server the device should sync with.
TIP: NTP works over UDP port 123, so ensure routing and firewall allow this traffic.
Step 3: Verifying NTP Configuration
- Check if the device is syncing correctly:
Router# show ntp status
- Key things to look for:
Clock is synchronized→ YES means client is synced- Stratum number → Shows how far from the primary time source
- Check which servers are used:
Router# show ntp associations
- Displays:
- IP addresses of NTP servers
- Status of synchronization
- Check the clock:
Router# show clock
- Displays the current device time
- Should match the NTP server time after syncing
4. Summary for CCNA Exam
- NTP is used to sync time across network devices.
- Devices can be NTP servers (provide time) or clients (receive time).
- NTP configuration commands:
ntp master <stratum>→ serverntp server <IP>→ client
- Verification commands:
show ntp status→ check syncshow ntp associations→ check server connectionsshow clock→ check device time
Remember: For CCNA, focus on basic NTP client/server setup and verification, not complex NTP hierarchy.
