LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 07-28-2018, 07:56 PM   #1
berndbausch
Senior Member
 
Registered: Nov 2013
Location: Tokyo
Distribution: A few
Posts: 4,953

Rep: Reputation: 1475Reputation: 1475Reputation: 1475Reputation: 1475Reputation: 1475Reputation: 1475Reputation: 1475Reputation: 1475Reputation: 1475Reputation: 1475
NTP depends on DNS, which depends on NTP


For better or worse, I use an Odroid (credit-card sized ARM-based computer) for various services at home. This includes DNS and NTP. It runs Xenial, a.k.a. Ubuntu 16.04.4.

The Odroid's hardware clock is not battery-backed. When I remove power (it happens both accidentally and voluntarily), neither NTP nor DNS work after booting. Reason: The clock is initialized to Feb 2016. NTP requires DNS to work. DNS uses DNSSEC, which requires a clock that is not off by two years.

How can I break this circular dependency? Ideas that I have:
  • tell chrony to use IP addresses for NTP servers
  • don't use DNSSEC
Can either Chrony or Bind change configuration dynamically and automatically? For example, Chrony starts with an IP-address-based time server, then switches to named NTP server pools. Or Bind starts without DNSSEC, and then switches to DNSSEC when the time has been updated.

Yes I know that I can and should buy a battery module for the Odroid or, better, a UPS for the entire junk yard of hardware.
 
Old 07-28-2018, 09:08 PM   #2
wpeckham
Senior Member
 
Registered: Apr 2010
Location: Continental USA
Distribution: Debian, Ubuntu, Fedora, RedHat, DSL, Puppy, CentOS, Knoppix, Mint-DE, Sparky, Vsido, tinycore, Q4OS
Posts: 3,357

Rep: Reputation: 1452Reputation: 1452Reputation: 1452Reputation: 1452Reputation: 1452Reputation: 1452Reputation: 1452Reputation: 1452Reputation: 1452Reputation: 1452
I always run NTPDATE on boot to set the clock before NTPD starts. Once that starts, BIND (which is what I believe you mean by DNS) should start and run properly.
Give it a try.
Check the man pages or online documentation first.
 
Old 07-28-2018, 11:46 PM   #3
berndbausch
Senior Member
 
Registered: Nov 2013
Location: Tokyo
Distribution: A few
Posts: 4,953

Original Poster
Rep: Reputation: 1475Reputation: 1475Reputation: 1475Reputation: 1475Reputation: 1475Reputation: 1475Reputation: 1475Reputation: 1475Reputation: 1475Reputation: 1475
Another solution is, of course, removing the dnssec clause from the DNS server configuration, restart the server, use chrony's makestep to set the time, then restart the DNS server.

For some reason this doesn't work in my case. makestep has no effect, and I have not been able to find out what the problem might be.

ntpdate with a hard-coded IP address (hoping that address won't change too often...) looks like a good solution. Thanks.
 
Old 07-29-2018, 05:29 AM   #4
wpeckham
Senior Member
 
Registered: Apr 2010
Location: Continental USA
Distribution: Debian, Ubuntu, Fedora, RedHat, DSL, Puppy, CentOS, Knoppix, Mint-DE, Sparky, Vsido, tinycore, Q4OS
Posts: 3,357

Rep: Reputation: 1452Reputation: 1452Reputation: 1452Reputation: 1452Reputation: 1452Reputation: 1452Reputation: 1452Reputation: 1452Reputation: 1452Reputation: 1452
While a DNS server needs the clock, as a CLIENT the resolution should not depend upon anything other than the networking. As long as your primary nameserver is NTO set to the localhost, you should be able to resolve a name against an external name server. How is your resolv.conf set up?
 
Old 07-30-2018, 10:07 PM   #5
berndbausch
Senior Member
 
Registered: Nov 2013
Location: Tokyo
Distribution: A few
Posts: 4,953

Original Poster
Rep: Reputation: 1475Reputation: 1475Reputation: 1475Reputation: 1475Reputation: 1475Reputation: 1475Reputation: 1475Reputation: 1475Reputation: 1475Reputation: 1475
Thanks for the suggestion. resolv.conf on the DNS server sets the DNS server's IP address as first nameserver. If I don't do that, the server doesn't know any names on the home network.

This may not be a problem, but since I am not the only person using this server, I have to be careful and can only experiment when nobody else is working.
 
  


Reply

Tags
dns, ntp, odroid


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 Server Using the NTP Time not External Servers or Pools jackgun Red Hat 3 11-04-2016 02:37 PM
[SOLVED] some issues with CentOSv7 and NTP with timedatectl set-ntp yes lleb Linux - Server 3 03-30-2015 08:45 PM
ntp client is not syncing with ntp server time sagar666 Linux - Server 3 12-19-2014 04:47 AM
[SOLVED] NTP configuration in client to synchronize with NTP server. antnish Linux - General 12 04-01-2013 01:49 PM
ntp drift file in /etc/ntp instead of /var/lib/ntp - suggestion for a patch in Slack niels.horn Slackware 16 05-07-2009 07:35 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 03:22 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
Open Source Consulting | Domain Registration