Operating System - HP-UX
1833490 Members
2807 Online
110052 Solutions
New Discussion

synchronization time between router and server

 
Kenneth Yap
Frequent Advisor

synchronization time between router and server

Dear Expert,
How to use NTP to synchronizing the time between router and server ?
I have do this step as below:

1. ping the nearest CCH router,. In this example it is 199.40.233.129
/usr/sbin/ping 199.40.233.129

2. Stop xntpd daemon if it?s running
/sbin/init.d/xntpd stop

3. Edit /etc/rc.config.d/netdaemons file and set the following NTP variables as follows.
XNTPD=1
export NTPDATE_SERVER= 199.40.233.129

4. Edit /etc/ntp.conf and add this line
server 199.40.233.129

6. Start xntpd daemon
/sbin/init.d/xntpd start

But when I start xtnpd process, I got this error message...
20 Jul 09:29:03 ntpdate[19272]: no server suitable for synchronization found

Thanks.....

Kenneth..........
10 REPLIES 10
Thierry Poels_1
Honored Contributor

Re: synchronization time between router and server

hi,
seems OK to me. Are you sure your router is broadcasting NTP?
regards,
Thierry.
All unix flavours are exactly the same . . . . . . . . . . for end users anyway.
Kenneth Yap
Frequent Advisor

Re: synchronization time between router and server

Hi Thierry,
Please advise, what do you mean by "router is broadcasting NTP"
Thierry Poels_1
Honored Contributor

Re: synchronization time between router and server

try:
/sbin/init.d/xntpd stop
ntpdate your_router_address

this should return date & time if the router is set up as NTP broadcaster.
good luck,
Thierry.
All unix flavours are exactly the same . . . . . . . . . . for end users anyway.
leereg_5
Frequent Advisor

Re: synchronization time between router and server

To make use of NTP, you must setup a time server and all time client to step the server's clock.If your client is HP system(For , you can named a NTP server with it's IP, if your client is SUN system, you can config it as a broadcast client of the NTP server.(For SUN, change to /etc/inet and copy ntp.client to ntp.conf, then issue /etc/init.d/xntpd start)
Then you can setup the router as a ntp server to be stepped by it's time client.
Always UNIX!
James R. Ferguson
Acclaimed Contributor

Re: synchronization time between router and server

Hi Kenneth:

/usr/sbin/ntpq is very useful in diagnosing time server problems.

# ntpq -p

...will show the associations between the various servers and their states. Be patient, since it takes 10-minutes or so for the time to synchronize.

If the time difference between your servers is 1000 seconds or greater, xntpd will ignore the servers time. If a client cannot find a server to which to synchronize in about 320 seconds, the xntpd daemon will die. Therefore, check the time differences when you startup and manually adjust them if necessary, first.

If you are running 11.x, 'date' has an opton to slowly slew time:

# date -a [-]sss[.fff]

"fff" is fractions of seconds. The adjustment can be negative or positive as shown.

...JRF...
Kenneth Yap
Frequent Advisor

Re: synchronization time between router and server

Dear all,
How to I check the CCH router is NTP Enable or supported...?

leereg_5
Frequent Advisor

Re: synchronization time between router and server

This example shows how to enable NTP broadcast-client mode on the switch, set a broadcast delay of 4000 microseconds, and verify the configuration
Console> (enable) set ntp broadcastclient enable

NTP Broadcast Client mode enabled
Console> (enable) set ntp broadcastdelay 4000

NTP Broadcast delay set to 4000 microseconds
Console> (enable) show ntpThis example shows how to configure the NTP server address, enable NTP client mode on the switch, and verify the configuration:

Console> (enable) set ntp server 172.20.52.65

NTP server 172.20.52.65 added.
Console> (enable) set ntp client enable

NTP Client mode enabled
Console> (enable) show ntp

This example shows how to configure the NTP server address, enable NTP client and authentication modes on the switch, and verify the configuration:

Console> (enable) set ntp server 172.20.52.65 key 879

NTP server 172.20.52.65 with key 879 added.
Console> (enable) set ntp client enable

NTP Client mode enabled
Console> (enable) set ntp authentication enable

NTP authentication feature enabled
Console> (enable) show ntp

This example shows how to set the time zone on the switch:

Console> (enable) set timezone Pacific -8

Timezone set to 'Pacific', offset from UTC is -8 hours
Console> (enable)

This example shows how to set the clock adjusted for Pacific Daylight Time following the U.S. standards:

Console> (enable) set summertime enable PDT

Console> (enable) set summertime recurring

Summertime is enabled and set to 'PDT'
Console> (enable)
This example shows how to remove an NTP server address from the NTP server table:

Console> (enable) clear ntp server 172.16.64.10

NTP server 172.16.64.10 removed.
Console> (enable)

This example shows how to disable NTP client mode on the switch:

Console> (enable) set ntp broadcastclient disable

NTP Broadcast Client mode disabled
Console> (enable)
This example shows how to disable NTP client mode on the switch:

Console> (enable) set ntp client disable

NTP Client mode disabled
Console> (enable)




Always UNIX!
Kenneth Yap
Frequent Advisor

Re: synchronization time between router and server

Hi Thierry,
Is all the routers are supported NTP ? Where we can check the routes are supported or not supported ?
leereg_5
Frequent Advisor

Re: synchronization time between router and server

Login the router, type enable
in the command line, just input "set help"
in the output list there are many items, check it if there is one concern NTP, if there is one , then you can configure NTP according the help content.
Always UNIX!