LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   [HELP] Linux NTP Client Server Configuration (https://www.linuxquestions.org/questions/linux-newbie-8/%5Bhelp%5D-linux-ntp-client-server-configuration-4175475858/)

firewallengineer 09-04-2013 08:32 AM

[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/

acid_kewpie 09-04-2013 09:14 AM

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"

firewallengineer 09-04-2013 09:48 AM

Quote:

Originally Posted by acid_kewpie (Post 5021589)
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$

michaelk 09-04-2013 10:46 AM

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.

acid_kewpie 09-04-2013 10:56 AM

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.

firewallengineer 09-04-2013 09:42 PM

Quote:

Originally Posted by michaelk (Post 5021655)
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 (Post 5021655)
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 (Post 5021655)
Just out of curiosity what is the make/model of the GPS receiver.

May I know how to check this?

acid_kewpie 09-05-2013 02:18 AM

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.

firewallengineer 09-05-2013 07:42 AM

Quote:

Originally Posted by acid_kewpie (Post 5022102)
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.

michaelk 09-05-2013 12:29 PM

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.


All times are GMT -5. The time now is 05:39 AM.