1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Set up NTP server on Tomato

Discussion in 'Tomato Firmware' started by Kyusaku, Nov 10, 2009.

  1. Kyusaku

    Kyusaku Network Guru Member

    Is it possible to do this? I would love to just time sync with my router instead of an outside server.
  2. pfoomer

    pfoomer LI Guru Member

    Where will your router get its time from?
  3. Kyusaku

    Kyusaku Network Guru Member

    I don't mind the router pulling the time from an outside source but looking for network devices pulling the time from the tomato router.
  4. rhester72

    rhester72 Network Guru Member

    The RTC on the router is *very* inaccurate - this really isn't a good idea.

  5. pfoomer

    pfoomer LI Guru Member


    I dont think the current firmware will do this, though there are other routers that supposedly will (modified firmware on netgear for example).

    This topic was discussed at length some time ago, searching should find it.

    Yes I agree it would be a good idea, but I think an addition to the firmware, or running the ntpd via a share is the only solution at the moment, but I am happy to be educated!!

    In pfoomers ideal world, a usb gps providing the source and the ntpd running would be great
  6. ringer004

    ringer004 LI Guru Member

    Still need this?


    Do you still need this? I wrote an ntp daemon for tomato. Other posters concerns about where to get the time from are legitimate. I have another time source where I get the reference from. If you just wanted to return the routers current time, I could easily modify what I use for your need. I could supply the source code and the executable, 'ntpd.c' and 'ntpd'. Would this do you any good?
  7. Kyusaku

    Kyusaku Network Guru Member

    Well my intention was really just to have a more reliable NTP server to pull requests from clients like a server behind a router. So even if the internet went down on the WAN side the clients could still pull NTP data. But if the internal clock on the router is so bad I thought it might be a bad idea after all.
  8. ringer004

    ringer004 LI Guru Member

    OK. I guess it really depends on what your requirements are. Last April or so, I updated ntpc to allow small incremental changes to the system time. If you run that in a cron every hour, you can keep the router to within a second or so of real time. If that coarse accuracy is good enough, then maybe the ntp server is still a viable option. I think Victek's mod (maybe others too?) have put the new ntpc in their builds.
  9. Maggard

    Maggard LI Guru Member

    Possible, sure, shouldn't be a terribly hard port.

    Worth the effort? Almost certainly not.

    As noted the timer on these devices are notoriously inaccurate, so your time served will skew relatively quickly. Furthermore the traffic in an NTP query is remarkably trivial, just a few bytes. Finally the traffic generated by your router re-syncing itself every hour or more is likely far greater then the devices it serves doing so for themselves every 24 hours or so.

    Unless there is some insanely strict firewall/security/whatever reason just relying on the existing NTP pool seems by far the best use of anyone's, er, time.
  10. mraneri

    mraneri LI Guru Member

Share This Page