Does a DD-WRT router work as an NTP server?

Post new topic   Reply to topic    DD-WRT Forum Index -> Advanced Networking
Author Message
Fried Chicken
DD-WRT User


Joined: 12 Jun 2019
Posts: 143
Location: Texas

PostPosted: Sat Jan 28, 2023 18:27    Post subject: Does a DD-WRT router work as an NTP server? Reply with quote
Should I set up my network so my main router connects to my preferred NTP server? (pool.ntp.org) and then all subrouters and access points ping *that* (192.168.1.1) for NTP information?

Would it in fact be better to set it up that way for ping stability reason?

_________________
Google is Spyware
Sponsor
dale_gribble39
DD-WRT Guru


Joined: 11 Jun 2022
Posts: 1952

PostPosted: Sat Jan 28, 2023 18:34    Post subject: Reply with quote
DD-WRT uses (a modified version of) ntpclient; it does not use the busybox-included ntpd, whatsoever, so you cannot use DD-WRT as an NTP server.
_________________
"The woods are lovely, dark and deep,
But I have promises to keep,
And miles to go before I sleep,
And miles to go before I sleep." - Robert Frost

"I am one of the noticeable ones - notice me" - Dale Frances McKenzie Bozzio

<fact>code knows no gender</fact>

This is me, knowing I've ruffled your feathers, and not giving a ****
Some people are still hard-headed.

--------------------------------------
Mac Pro (Mid 2012) - Two 2.4GHz 6-Core Intel Xeon E5645 processors 64GB 1333MHz DDR3 ECC SDRAM OpenSUSE Leap 15.5
Fried Chicken
DD-WRT User


Joined: 12 Jun 2019
Posts: 143
Location: Texas

PostPosted: Sat Jan 28, 2023 21:46    Post subject: Reply with quote
dale_gribble39 wrote:
DD-WRT uses (a modified version of) ntpclient; it does not use the busybox-included ntpd, whatsoever, so you cannot use DD-WRT as an NTP server.


Thank you!

_________________
Google is Spyware
egc
DD-WRT Guru


Joined: 18 Mar 2014
Posts: 12915
Location: Netherlands

PostPosted: Sat Jan 28, 2023 21:52    Post subject: Reply with quote
You probably can use Entware to install an NTP server: https://bin.entware.net/armv7sf-k3.2/Packages.html
_________________
Routers:Netgear R7000, R6400v1, R6400v2, EA6900 (XvortexCFE), E2000, E1200v1, WRT54GS v1.
Install guide R6400v2, R6700v3,XR300:https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=316399
Install guide R7800/XR500: https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=320614
Forum Guide Lines (important read):https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=324087
Fried Chicken
DD-WRT User


Joined: 12 Jun 2019
Posts: 143
Location: Texas

PostPosted: Sun Jan 29, 2023 3:09    Post subject: Reply with quote
I'm not interested in installing an NTP server, but something very funny has just occurred to me.

I get regular "cyclic NTP update failed" responses from the NTP server I use.
It's occurred to me, all my devices, or maybe just by dd-wrt devices might be pinging simultaneously, causing the server to possibly not respond.

I guess it would depend on how the NTP servers are queried (either at a certain time, or after a certain amount of time).

It seems to check quite a bit in the log:

Code:
Jan 28 20:48:31 ProtectLi daemon.debug ntpclient[8705]: Connecting to pool.ntp.org [108.61.56.35] ...
Jan 28 20:48:31 ProtectLi daemon.info ntpclient[8705]: Time set from pool.ntp.org [108.61.56.35].
Jan 28 20:48:31 ProtectLi daemon.info process_monitor[10260]: Cyclic NTP Update success (servers pool.ntp.org)
Jan 28 20:48:31 ProtectLi daemon.info process_monitor[10260]: Local timer delta is 0




part 2:

I just checked, and the dd-wrt devices don't check at the same time but seem to check hourly.

_________________
Google is Spyware
egc
DD-WRT Guru


Joined: 18 Mar 2014
Posts: 12915
Location: Netherlands

PostPosted: Sun Jan 29, 2023 7:11    Post subject: Reply with quote
DDWRT by default checks time every hour, on Basic Setup page under NTP settings: "Update Interval: 3600 seconds"

Your time server maybe be temporarily overloaded, I use this as time servers:
Quote:
2.pool.ntp.org time.google.com 212.18.3.19 216.239.35.0

To make sure they resolve if I use secure DNS I have this under DNSMasq Additional Options:
Quote:
server=/pool.ntp.org/time.google.com/1.0.0.1
server=/pool.ntp.org/time.google.com/9.9.9.9

_________________
Routers:Netgear R7000, R6400v1, R6400v2, EA6900 (XvortexCFE), E2000, E1200v1, WRT54GS v1.
Install guide R6400v2, R6700v3,XR300:https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=316399
Install guide R7800/XR500: https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=320614
Forum Guide Lines (important read):https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=324087
Fried Chicken
DD-WRT User


Joined: 12 Jun 2019
Posts: 143
Location: Texas

PostPosted: Sun Jan 29, 2023 7:41    Post subject: Reply with quote
egc wrote:
DDWRT by default checks time every hour, on Basic Setup page under NTP settings: "Update Interval: 3600 seconds"

Your time server maybe be temporarily overloaded, I use this as time servers:
Quote:
2.pool.ntp.org time.google.com 212.18.3.19 216.239.35.0

To make sure they resolve if I use secure DNS I have this under DNSMasq Additional Options:
Quote:
server=/pool.ntp.org/time.google.com/1.0.0.1
server=/pool.ntp.org/time.google.com/9.9.9.9


You can have multiple timeservers separated by a space?

_________________
Google is Spyware
egc
DD-WRT Guru


Joined: 18 Mar 2014
Posts: 12915
Location: Netherlands

PostPosted: Sun Jan 29, 2023 8:42    Post subject: Reply with quote
exactly
_________________
Routers:Netgear R7000, R6400v1, R6400v2, EA6900 (XvortexCFE), E2000, E1200v1, WRT54GS v1.
Install guide R6400v2, R6700v3,XR300:https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=316399
Install guide R7800/XR500: https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=320614
Forum Guide Lines (important read):https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=324087
yoyoma2
DD-WRT User


Joined: 24 Sep 2016
Posts: 373

PostPosted: Sun Jan 29, 2023 18:23    Post subject: Reply with quote
Fried Chicken wrote:
I get regular "cyclic NTP update failed" responses from the NTP server I use.
If errors still occur with other NTP servers (suggested by @egc) then your ISP may have inconsistent latency. Installing ntpd from entware (also suggested by @egc) is a on-liner if you already use entware. Entware's ntpd solved this in the past with my previous ISP.

Even with my current better ISP, I still run an NTP server on a linux machine and all my 20-25 devices can bombard it with ntp requests over the LAN. More accurate and "polite" than have every device individually harassing a public NTP server.
dale_gribble39
DD-WRT Guru


Joined: 11 Jun 2022
Posts: 1952

PostPosted: Sun Jan 29, 2023 19:16    Post subject: Reply with quote
All you need on your router or PC or anything really is to sync once per day, not once per hour.... nobody is running the Atomic Clock or anything that requires any closer precision, are they?
_________________
"The woods are lovely, dark and deep,
But I have promises to keep,
And miles to go before I sleep,
And miles to go before I sleep." - Robert Frost

"I am one of the noticeable ones - notice me" - Dale Frances McKenzie Bozzio

<fact>code knows no gender</fact>

This is me, knowing I've ruffled your feathers, and not giving a ****
Some people are still hard-headed.

--------------------------------------
Mac Pro (Mid 2012) - Two 2.4GHz 6-Core Intel Xeon E5645 processors 64GB 1333MHz DDR3 ECC SDRAM OpenSUSE Leap 15.5
Display posts from previous:    Page 1 of 1
Post new topic   Reply to topic    DD-WRT Forum Index -> Advanced Networking All times are GMT

Navigation

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum