LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 11-16-2011, 11:54 AM   #1
Vikonder
LQ Newbie
 
Registered: Nov 2011
Posts: 1

Rep: Reputation: Disabled
Cross synchronization NTP not working


Hi,

I have Red Hat 5.5 on 2 units (hub-omu1a, hub-omu1b)
Synchronization should be cross:

hub-omu1a ---> hub-omu1b
hub-omu1b ---> hub-omu1a

1. Configure /etc/ntp.conf (equal for each unit)
Code:
requestkey 1
controlkey 0
trustedkey 1 
statsdir /var/ntp/ntpstats/
driftfile /var/lib/ntp/drift
keys /etc/ntp/keys
restrict default notrust notrap
restrict 10.9.16.100 mask 255.255.255.255 nomodify notrap
restrict 10.9.16.101 mask 255.255.255.255 nomodify notrap
filegen peerstats file peerstats  type day enable
filegen loopstats file loopstats  type day enable
filegen clockstats file clockstats type day enable
tos orphan 7
server hub-omu1b key 1
peer hub-omu1a key 1
2. Result of NTP synchronization:
Code:
[root@hub-omu1a /etc/init.d]# ntpq -p
     remote           refid      st t when poll reach   delay   offset  jitter
==============================================================================
*hub-omu1b       127.0.0.1        7 u   62   64  377    0.180   -0.038   0.042
 hub-omu1a       .INIT.          16 u    -   64    0    0.000    0.000   0.000
[root@hub-omu1a /etc/init.d]# ntpstat
synchronised to NTP server (10.9.15.58) at stratum 7
   time correct to within 10 ms
   polling server every 64 s
Code:
[root@hub-omu1b /etc/init.d]# ntpq -p
     remote           refid      st t when poll reach   delay   offset  jitter
==============================================================================
 hub-omu1a       10.9.15.58       7 u   23   64   77    0.236    0.008   0.013
 hub-omu1b       .INIT.          16 u    -   64    0    0.000    0.000   0.000
[root@hub-omu1b /etc/init.d]# ntpq -p
     remote           refid      st t when poll reach   delay   offset  jitter
==============================================================================
 hub-omu1a       10.9.15.58       7 u   26   64   77    0.236    0.008   0.013
 hub-omu1b       .INIT.          16 u    -   64    0    0.000    0.000   0.000
[root@hub-omu1b /etc/init.d]# ntpstat
synchronised to unspecified at stratum 7
   time correct to within 0 ms
   polling server every 64 s
What is incorrect to get really cross Synchronization???

thanks
 
Old 11-16-2011, 02:18 PM   #2
tronayne
Senior Member
 
Registered: Oct 2003
Location: Northeastern Michigan, where Carhartt is a Designer Label
Distribution: Slackware 32- & 64-bit Stable
Posts: 3,541

Rep: Reputation: 1060Reputation: 1060Reputation: 1060Reputation: 1060Reputation: 1060Reputation: 1060Reputation: 1060Reputation: 1060
You may want to re-think what you're doing just a little -- let's say that you have a reference source, be that a radio clock, GPS, stratum 2 server somewhere electrically close to you, it might be useful to assign your hub-omu1a as your primary time server, serving time to your network (in this case hub-omu1b). If the two hubs are electrically close (as in connected to the same LAN), hub-omu1b will synchronize to hub-omu1a before it will ever synchronize to an outside time source and hub_omu1a has no reason whatsoever to synchronize to hub_omu1b (it's kind of like audio feedback doing that).

Your /etc/ntp.conf for hub-omu1a would use three servers (more is overkill, less isn't always useful), the first being a dedicated time source (if you have one; e.g., a radio clock or GPS), and two additional pool servers (or just three pool servers if you don't have a dedicated time source), something like this:
Code:
server  127.127.1.0     # local clock
fudge   127.127.1.0 stratum 10
server  0.us.pool.ntp.org
server  1.us.pool.ntp.org
server  2.us.pool.ntp.org
You need the local clock if the internet goes away (or your dedicated time source goes away) so that NTP can fall back on itself while there's an outage. You use the fudge line so that the local clock will not remain in use once the internet (time source) comes back on line.

You then want to serve time to hub-omu1b (or, for that matter to your entire LAN) from hub-omu1a) -- it's useful to assign fixed-IP addresses to your servers rather than relying on DHCP to not drop a lease. Your /etc/ntp.conf file on hub-omu1b would look like
Code:
server  127.127.1.0     # local clock
fudge   127.127.1.0 stratum 10
server  address_of_hub-oum1a or its name if you have it listed in /etc/hosts
server  0.us.pool.ntp.org
server  1.us.pool.ntp.org
Neither this or any other machine needs nor wants to feed back to the other and it is necessary to add the local clock, fudge plus the two pool servers lines for when hub-oum1a is unavailable and, of course, hub-oum1a needs to be configured to serve time. Keep in mind that if you have PCs hanging on your network, hum-oum1a will serve time to as well.

Might work better for you that way.

Hope this helps some.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
NTP - no server suitable for synchronization found ninja master Linux - Software 3 05-25-2010 06:41 AM
NTP synchronization CoderMan Linux - Server 2 02-22-2010 04:14 PM
time synchronization - NTP tractng Linux - Newbie 1 04-02-2008 09:28 PM
NTP synchronization, slewing for large period of time ? trubi Solaris / OpenSolaris 1 10-18-2004 06:26 AM
ntp synchronization problems ricky_ds Linux - Networking 1 10-13-2004 11:22 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 04:19 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration