Pages

Wednesday, November 28, 2007

NTP Server/Client/Router RHEL4

===========================
NTP Server setting on RHEL4
===========================
The Network Time Protocol (NTP) is a protocol used to help synchronize your Linux system's clock with an accurate time source. There are that allow the general public to synchronize with them.

Installation:

step 1: leo@gnu# rpm -ivh ntp-4.2.0.a.20040617-6.el4

Configuration:

The /etc/ntp.conf file is the main configuration file

step 2: leo@gnu# vi /etc/ntp.conf

(add/edit following lines into main configuration files)

# -- CLIENT NETWORK -------
restrict xx.xx.0.0 mask 255.255.0.0 nomodify notrap

# --- OUR TIMESERVERS -----
server ntpserver.youdomain.com # A stratum 1 server
server ntpserver.youdomain.com # A stratum 2 server

# --- NTP MULTICASTCLIENT ---
restrict xx.xx.0.0 mask 255.255.0.0 nomodify notrap


logfile /var/log/ntpd
broadcast xx.xx.1.255





step 3:leo@gnu# chkconfig ntpd on

step 4:leo@gnu# date

step 5:leo@gnu# ntpdate -u ip_of_ntpserver

step 6:leo@gnu# service ntpd start



Determining If NTP Is Synchronized ?

step 7:leo@gnu# ntpq -p

===========================
NTP Server setting on RHEL4
===========================

step 1: leo@gnu# ntpdate -u ip_of_ntpserver

step 2: leo@gnu# vi /etc/ntp.conf

(add/edit following lines into main configuration files)

# --- OUR TIMESERVERS -----
server ntpserver.youdomain.com # A stratum 1 server
server ntpserver.youdomain.com # A stratum 2 server

step 3: leo@gnu# /etc/init.d/ntpd start

Determining If NTP Is Synchronized ?

step 4:leo@gnu# ntpq -p


-----------------------------------

ADD NTP server to Cisco Router

-----------------------------------

leo@gnu# telnet router.domain.com

router> enable
router# config t
router(config)# ntp update-calendar
router(config)# ntp server xx.xx.xx.xx
router(config)# exit
router# wr mem


---------------------------------

No comments: