LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 09-04-2013, 09:32 AM   #1
firewallengineer
LQ Newbie
 
Registered: Jul 2013
Posts: 19

Rep: Reputation: Disabled
[HELP] Linux NTP Client Server Configuration


I’m trying to configure NTP client/server in my virtualbox + gns3 lab so that all computers will have the same date & time.

Unfortunately I’m getting this error message:
Quote:
4 Sep 13:19:12 ntpdate[1383]: no server suitable for synchronization found
Please help. Let me know if you need more info.

MY NETWORK TOPOLOGY
http://firewallengineer.files.wordpr...08/routing.png

NTP Client
Core1 eth1: 10.0.0.1
Core3 eth1: 172.16.0.1

NTP Server (Core2)
Core2 eth1: 10.0.0.2
Core2 eth2: 172.16.0.2

VIRTUALBOX CONFIGURATION
VirtualBox configured as “Host-Only”. Hence, there is no internet connection.

NTP CLIENT
Quote:
tc@Core3:~$ sudo ntpdate 172.16.0.2
4 Sep 13:17:36 ntpdate[1333]: no server suitable for synchronization found
tc@Core3:~$
NTP SERVER
Quote:
tc@Core2:~$ tcpdump -i 3 -n not arp
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on eth2, link-type EN10MB (Ethernet), capture size 68 bytes
14:38:26.628822 IP 172.16.0.1.123 > 172.16.0.2.123: NTPv4, Client, length 48
14:38:26.628938 IP 172.16.0.2.123 > 172.16.0.1.123: NTPv4, Server, length 48
14:38:28.628493 IP 172.16.0.1.123 > 172.16.0.2.123: NTPv4, Client, length 48
14:38:28.628600 IP 172.16.0.2.123 > 172.16.0.1.123: NTPv4, Server, length 48
14:38:30.627406 IP 172.16.0.1.123 > 172.16.0.2.123: NTPv4, Client, length 48
14:38:30.627551 IP 172.16.0.2.123 > 172.16.0.1.123: NTPv4, Server, length 48
14:38:32.626576 IP 172.16.0.1.123 > 172.16.0.2.123: NTPv4, Client, length 48
14:38:32.626716 IP 172.16.0.2.123 > 172.16.0.1.123: NTPv4, Server, length 48
^C
8 packets captured
8 packets received by filter
0 packets dropped by kernel
tc@Core2:~$
http://firewallengineer.wordpress.co...configuration/

Last edited by firewallengineer; 09-06-2013 at 12:41 AM.
 
Old 09-04-2013, 10:14 AM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974
well you're getting a response so it's likely that the response is just no good. add a -v or two to the ntpdate command, or with ntpd running, run "ntpq -pn"
 
1 members found this post helpful.
Old 09-04-2013, 10:48 AM   #3
firewallengineer
LQ Newbie
 
Registered: Jul 2013
Posts: 19

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by acid_kewpie View Post
well you're getting a response so it's likely that the response is just no good. add a -v or two to the ntpdate command, or with ntpd running, run "ntpq -pn"
Thanks for your advise. But I'm still getting the same output.

NTP CLIENT
Quote:
tc@Core3:~$ sudo ntpdate -vv 172.16.0.2
4 Sep 14:42:59 ntpdate[1152]: ntpdate 4.2.6p2@1.2194-o Wed Dec 8 22:46:46 UTC 2010 (1)
4 Sep 14:43:07 ntpdate[1152]: no server suitable for synchronization found
tc@Core3:~$
NTP SERVER
Quote:
tc@Core2:/usr/local/etc$ ntpq -pn
remote refid st t when poll reach delay offset jitter
==============================================================================
10.0.0.2 .INIT. 16 u - 64 0 0.000 0.000 0.000
172.16.0.2 .INIT. 16 u - 64 0 0.000 0.000 0.000

127.127.28.0 .GPS. 0 l - 16 0 0.000 0.000 0.000
127.127.28.1 .GPS1. 0 l - 16 0 0.000 0.000 0.000
tc@Core2:/usr/local/etc$
NTP SERVER CONFIGURATION
Quote:
tc@Core2:/usr/local/etc$ cat ntp.conf
driftfile /var/db/ntp.drift

server 10.0.0.2
server 172.16.0.2


# GPS
server 127.127.28.0 minpoll 4 maxpoll 4
fudge 127.127.28.0 time1 0.420 refid GPS

# GPS w/PPS output
server 127.127.28.1 minpoll 4 maxpoll 4 prefer
fudge 127.127.28.1 refid GPS1
tc@Core2:/usr/local/etc$

Last edited by firewallengineer; 09-04-2013 at 10:49 AM.
 
Old 09-04-2013, 11:46 AM   #4
michaelk
Moderator
 
Registered: Aug 2002
Posts: 14,929

Rep: Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520
If I may add a few comments... (I'm waiting on some info and bored at the moment)

At the time of your post the server has not synched to the GPS receiver so the message is reasonable. Have you verified the receiver is working and gpsd is configured correctly and running? In addition, it isn't necessary to have server 172.16.0.2 or server 10.0.0.2 lines since it references the server itself.

Just out of curiosity what is the make/model of the GPS receiver.

Last edited by michaelk; 09-04-2013 at 11:48 AM.
 
1 members found this post helpful.
Old 09-04-2013, 11:56 AM   #5
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974
GPS aside, the two remote servers are returning Strata 16 responses. This means they are saying that they should not be trusted. Fix those servers first before trying to use them.
 
Old 09-04-2013, 10:42 PM   #6
firewallengineer
LQ Newbie
 
Registered: Jul 2013
Posts: 19

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by michaelk View Post
If I may add a few comments... (I'm waiting on some info and bored at the moment)

At the time of your post the server has not synched to the GPS receiver so the message is reasonable. Have you verified the receiver is working and gpsd is configured correctly and running?
Hi michaelk, thanks for your reply.
I’m sorry but I’m very new to this. Could you please let me know or share the link how to do it?

Quote:
Originally Posted by michaelk View Post
In addition, it isn't necessary to have server 172.16.0.2 or server 10.0.0.2 lines since it references the server itself.
OK, I'll remove these 2 lines then.

Quote:
Originally Posted by michaelk View Post
Just out of curiosity what is the make/model of the GPS receiver.
May I know how to check this?

Last edited by firewallengineer; 09-04-2013 at 10:45 PM.
 
Old 09-05-2013, 03:18 AM   #7
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974
He's saying that the GPS unit isn't working. Note though that outside of the config dumps, you've not actually acknowledged yourself that there IS a GPS device in the first place.... so... what't that all about? As for wehat model.. go look at the box, if it exists, or ask whoever is meant to be in charge of it.
 
1 members found this post helpful.
Old 09-05-2013, 08:42 AM   #8
firewallengineer
LQ Newbie
 
Registered: Jul 2013
Posts: 19

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by acid_kewpie View Post
He's saying that the GPS unit isn't working. Note though that outside of the config dumps, you've not actually acknowledged yourself that there IS a GPS device in the first place.... so... what't that all about? As for wehat model.. go look at the box, if it exists, or ask whoever is meant to be in charge of it.
This is just Tiny Core Linux in my own VirtualLab Box. Yes, there is no GPS in it and I've already disable it.

NTP SERVER
Quote:
tc@Core2:~$ cat /usr/local/etc/ntp.conf
driftfile /var/db/ntp.drift

# GPS
#server 127.127.28.0 minpoll 4 maxpoll 4
#fudge 127.127.28.0 time1 0.420 refid GPS

# GPS w/PPS output
#server 127.127.28.1 minpoll 4 maxpoll 4 prefer
#fudge 127.127.28.1 refid GPS1
tc@Core2:~$
Quote:
tc@Core2:~$ ntpq -pn
No association ID's returned
tc@Core2:~$
To verify the NTP configuration, I’ve change the client date

NTP CLIENT
Quote:
tc@Core1:~$ sudo date -s "20:00"
Thu Sep 5 20:00:00 UTC 2013
tc@Core1:~$

tc@Core1:~$ sudo ntpdate 10.0.0.2
5 Sep 13:00:43 ntpdate[1085]: no server suitable for synchronization found
tc@Core1:~$

tc@Core1:~$ date
Thu Sep 5 20:01:10 UTC 2013
tc@Core1:~$
NTP SERVER
Quote:
tc@Core2:~$ date
Thu Sep 5 12:49:28 UTC 2013
tc@Core2:~$
and no, still doesn’t work.

Last edited by firewallengineer; 09-05-2013 at 08:52 AM.
 
Old 09-05-2013, 01:29 PM   #9
michaelk
Moderator
 
Registered: Aug 2002
Posts: 14,929

Rep: Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520
Not an expert when it comes to VMs.. I would configure the physical host to use an external NTP server pool and use guest additions to enable the VMs to sync to the host. Although guest additions may not provide the best time source. Your ntp server is not synching to anything.
 
  


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 client is not syncing to ntp server LittleMaster Linux - Newbie 6 04-05-2013 03:37 PM
[SOLVED] NTP configuration in client to synchronize with NTP server. antnish Linux - General 12 04-01-2013 02:49 PM
NTP client configuration sujitg Linux - Newbie 1 01-16-2011 11:51 AM
NTP client configuration krishrj Linux - Server 2 05-25-2010 08:59 AM


All times are GMT -5. The time now is 11:07 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