1753428 Members
4775 Online
108793 Solutions
New Discussion юеВ

Re: NTP Configuration

 
SOLVED
Go to solution
jeevarajkn
Frequent Advisor

NTP Configuration

Dear Guru,s

Iam planning to use two ntp server for my hpunix 11.23 and solaris 10 clients.

cisco router as my two ntp sources.

can any body explain how we can configue primary and secondar ntp sources in ntp.conf file and /etc/rc.config.d/netdaemons file.

Pleaase suggest
15 REPLIES 15
Johnson Punniyalingam
Honored Contributor

Re: NTP Configuration

ntp is the network time protocol service while xntpd is nothing but the daemon which is must to run the ntp service.
In Your case.
Login as root to Pluto server and:
1) Edit " /etc/rc.config.d/netdaemons " file on the Pluto Server as follows : export NTPDATE_SERVER=
export XNTPD=1
export XNTPD_ARGS=

2)Edit " /etc/ntp.conf " file in the pluto server with the below entries at the end of the file :

server
3) To Maually start xntpd daemon : # /sbin/init.d/xntpd start
ON Jupiter side :

1)Edit " /etc/rc.config.d/netdaemons " file on the clients side as follows :
export NTPDATE_SERVER=
export XNTPD=1
export XNTPD_ARGS=
2)Edit " /etc/ntp.conf " file on the Jupiter server and add below entries at the end of the file:
server
3)#/sbin/init.d/xntpd start

In case the time synchronisation doesn't start it will definately start at the reboot of respective servers. 95 % it will start w/o reboot.

Regards,
Johnson
Problems are common to all, but attitude makes the difference
jeevarajkn
Frequent Advisor

Re: NTP Configuration

Johnson

can you please tell me how I can mention two ntp source ip adress in ntp.conf and netdaemon file.

means if one ntp source down my client wants to sync to second source automatically.
sujit kumar singh
Honored Contributor

Re: NTP Configuration

hi


expressing multiple ntpservers either in the etc/rc.config.d/netdaemons , in /etc/ntp.conf , the system shall be choosing the best source to sync the sources.

ON the Clients:
In the /etc/rc.config.d/netdaemons just specify the file names one aside another with a spacebar /TAB between them.

export NTPDATE_SERVER=


In the /etc/ntp.conf file you can just put the multiple server entries as mentioning in the server directive separated by a TAB.

On the Client

#vi /etc/ntp.conf
server
server
server
driftfile /var/adm/drift

regards
sujit
Suraj K Sankari
Honored Contributor

Re: NTP Configuration

Hi,

At Server:

The steps to configure a system to be an ntp Server are:
1. Edit the /etc/rc.config.d/netdaemons file to configure the xntpd daemon to startup every time the system boots.

export XNTPD=1 # Set 0 to 1, Start the xntpd daemon every boot "ntp"
export NTPDATE_SERVER= Timer server IP # Set ntp server ip address
export XNTPD_ARGS= ""

For NTP servers, do not set the NTPDATE_SERVER variable (leave it blank).
This variable is for NTP clients.

2. If required Edit the /etc/TIMEZONE file and specify the correct time zone for the system.
TZ=CST6CDT Set the TZ variable to equal the time zone for the system. TO See the /usr/lib/tztab file for a list of all the available time zones.

export TZ

3. Edit the /etc/ntp.conf file and define the NTP server for defining an ntp server to use its local clock:

server 127.127.1.1
fudge 127.127.1.1 stratum 10

4. Start the xntpd daemon manually by executing the following command:

/sbin/init.d/xntpd start

5. Wait. It could take up to 6 minutes for the xntpd daemon to start.

6. Verify the ntp server configuration (and its association with peer NTP servers) by executing the following command:

ntpq -p

In short
At server: U only need to set: the XNTPD variable to equal 1 (/etc/rc.config.d/netdaemon)
Others parameter should keep it be blank.

At client: U must set all below parameter:
export NTPDATE_SERVER='NTP server1 NTP server2'
export XNTPD=1
export XNTPD_ARGS=
and /etc/ntp.conf:
broadcastclient yes
server NTP server
driftfile /etc/ntp.drift

Suraj
Johnson Punniyalingam
Honored Contributor

Re: NTP Configuration

Johnson

>>>can you please tell me how I can mention two ntp source ip adress in ntp.conf and netdaemon file.

means if one ntp source down my client wants to sync to second source automatically.<<

Example:-
vi /etc/ntp.conf
ntpserver1 192.168.1.1
ntpserver2 192.168.1.2

Hope this Helps,

Thanks,
Johnson

Problems are common to all, but attitude makes the difference
jeevarajkn
Frequent Advisor

Re: NTP Configuration

Hi All
Thnaks for the tips

One more qurey from my end.

For configuring ntp client is it required to run all the servers in same time zone.

because my some of the servers are running in diffrent time zone ie, UAE-4,UAE+4,GMT+4,WAT-4,SAST-2.

In this condition is it required to change all the servers to same time zone.

Expecting some good fast tips.

Thnaks

Jeevaraj
killer1
Advisor

Re: NTP Configuration

Hello Jeevaraj

It is not required to have all servers in same time zone.

NTP will take care of updating the time according to different time zones.

Regards
Dennis Handly
Acclaimed Contributor

Re: NTP Configuration

>killer1: NTP will take care of updating the time according to different time zones.

NTP works on UTC so doesn't are about timezones. It is libc and TZ that takes care of timezones.
jeevarajkn
Frequent Advisor

Re: NTP Configuration

Dennis

Could you please explain me more???????