Network Time Protocol (NTP)
is a networking protocol for clock synchronization between computer systems
over packet-switched, variable-latency data networks and it works on Application
Layer. The protocol uses the User Datagram Protocol (UDP) on port number 123.
I will configure router R1
to use NTP clock synchronization from 2.rs.pool.ntp.org, the source of server
from http://www.pool.ntp.org/ which is the largest virtual cluster of time servers.
So let's start.
First check time and date on
R1...
R1#show clock
*00:14:33.191 UTC Fri Mar 1
2002
Before we configure R1 to
use NTP first of all we need to configure name server and lookup for domain
name.
R1(config)#ip domain-lookup
R1(config)#ip name-server
4.2.2.2
Let's test it...
R1#ping www.google.com
Translating "www.google.com"...domain
server (4.2.2.2) [OK]
Type escape sequence to
abort.
Sending 5, 100-byte ICMP
Echos to 173.194.65.104, timeout is 2 seconds:
!!!!!
Success rate is 100 percent
(5/5), round-trip min/avg/max = 48/63/72 ms
To configure R1 to use NTP server
issue command...
R1(config)#ntp server
2.rs.pool.ntp.org
Translating
"2.rs.pool.ntp.org"...domain server (4.2.2.2) [OK]
R1(config)#
As you can see domain server
translated name 2.rs.pool.ntp.org to ip address.
R1#show run | include ntp
ntp clock-period 17179864
ntp server 147.91.8.1
Now check time and date on
configured router.
R1#show clock
22:03:23.846 UTC Sat Sep 8
2012
Now we can make R1 to be NTP
server for other network devices.
R1(config)#ntp master 1
Later on we can configure another
router to use R1 as his NTP server.
R2(config)#ntp server <ip address or host name of R1 in our case>
No comments:
Post a Comment