What's new

Can I use my Asus 68U router as a NTP time source for my LAN

  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

Bruce_H

Occasional Visitor
I am running Asuswrt-Merlin firmware on my RT-AC68U router, and I am wondering if it is possible to have my internal Network devices use the router as a NTP time source since it is already syncing to an external time source (pool.ntp.org). If so then where can I find information on how to do this?

Thanks
Bruce H.
 
....where can I find information on how to do this?

There are different options depending on which version of ntpd you wish to use ranging from using the built-in Busybox version (/usr/sbin/ntpd --help) i.e. simply edit

/jffs/scripts/services-start
Code:
/usr/sbin/ntpd -l

or installing @kvic's ntpd (Tools - NTP Daemon Performance Stats GUI optional) or the FULL ntpd from Entware.

This thread should give you comprehensive details including a link to Kvic's ntpd project and example scripts etc.
https://www.snbforums.com/threads/ntp-server.34828/#post-282020
 
Last edited:
I use this setup and it works like a charm for all my local PCs. :D
 
Bad idea to do this as most (none?) of the asus routers have battery backup.

Last thing you want is a client syncing when the router is restarting and it hasent set its time yet.
 
Bad idea to do this as most (none?) of the asus routers DO NOT have battery backup.

Last thing you want is a client syncing when the router is restarting and it hasent set its time yet.
Yep, but therefore I start the NTP server only AFTER the router has synced the time... :D
 
https://github.com/RMerl/asuswrt-merlin/wiki/Setting-up-a-NTP-Server-for-your-local-lan

began with a wiki article seen this question turn up from time to time so thought it might be better to make it into a wiki page, feel free to improve upon it.

Perhaps it would be prudent to address concerns and follow the advice of @joegreat

https://www.snbforums.com/threads/c...ntp-time-source-for-my-lan.38370/#post-316684

and update the wiki

/jffs/scripts/srvices-start
Code:
if [ "$(nvram get ntp_ready)" == "1" ];then  # Only start the NTP server if router has itself synchronised with Internet
   ntpd   -l
else
   logger -st "($(basename $0))" $$ "***ERROR Router cannot get initialise NTP Server!"
fi
 
Bit of a thread dig here but I figured its better than making a new one.
I've followed all the steps from the wiki however the service doesn't appear to start on its own if the router is rebooted.

I'm using WinSCP and if I right click on the post-mount script and "execute" it I get this message

Command '"./post-mount"'
failed with return code 0 and error message
./post-mount: line 15: Internet: not found
(post-mount): 4364 ***SUCCESS Router copied
ntp.conf-file to /etc!
(post-mount): 4364 ***SUCCESS Router initialized NTP
Server!.
If i then set my Windows PC to use my routers IP for NTP it works.

However if I reset the router and try again on the Windows PC it will not work and i'd have to manually execute the post-mount script.

Any help would be appreciated thanks.
 

Similar threads

Latest threads

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Top