The following examples show how to configure the system as an NTP client and an NTP server.
Example 1
NTP communications are established on the virtual router boston. The system is a client of the NTP server with IP address 172.16.5.1.
- host1#virtual-router boston
- host1:boston#ping 172.16.5.1
- Sending 5 ICMP echos to 172.16.5.1, timeout = 2 sec.
- .....
- Success rate = 100% (0/5), round-trip min/avg/max = 0/0/0
ms
- host1:boston#configure terminal
- host1:boston(config)#ntp server 172.16.5.1
- host1:boston(config)#ntp enable
Example 2
NTP communications are established on the virtual router boston. The system is specified as an NTP server.
- host1#virtual-router boston
- host1:boston#configure terminal
- host1:boston(config)#ntp server
Example 3
NTP communications are established on the virtual router boston. The router is specified as an NTP broadcast server and synchronizes with NTP server 172.16.5.1. The specified interface enabled for NTP broadcasting is configured with version 4 and poll interval 5 for broadcasting NTP messages.
- host1#virtual-router boston
- host1:boston#configure terminal
- host1:boston#ntp enable
- host1:boston(config)#ntp server 172.16.5.1
- host1:boston(config)#interface fastethernet
9/3
- host1:boston(config-if)#ntp broadcast 4 5
![]() |
Note: In Example 3, the router that acts as the NTP broadcast server must either synchronize to another server or master (specified by the ntp server command) or act as master (ntp master command). |