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

Set Tomato as NTP Client

Discussion in 'Tomato Firmware' started by GreenThumb, Jun 18, 2010.

  1. GreenThumb

    GreenThumb Addicted to LI Member

    I want to make it so Tomato uses another machine on my LAN as a time server. I have entered the correct IP address into the box under Basic ---> Time --> NTP Time Server, but the time for the router is never available. I am sure I have my server set-up correctly. I noticed that Tomato uses "ntpsync" which is not part of the official NTP reference implementation.

    My question: Where is the NTP configuration file on Tomato? Typically it is located in /etc/ntp.conf, but it's not there with Tomato.
  2. HennieM

    HennieM Network Guru Member

    AFAIK there's no ntp.conf file. crond runs ntpsync at the intervals that you specify - see /tmp/var/spool/cron/crontabs/root. Then there are some nvram settings - do a `nvram show | grep ntp` and you'll see them.

    I would also advise that you sniff your network (tcpdump on Linux or Ethereal [now under another name] on Linux or Windoze) to see if Tomato tries to contact your server, and what transpires in the conversation.

    I have had ntp servers blocked by Tomato before - see http://www.linksysinfo.org/forums/showthread.php?t=56309&highlight=ntp_kiss
  3. GreenThumb

    GreenThumb Addicted to LI Member

    Well my problem is not that tomato is blocking my server, but Tomato is claiming that my server is requesting for Tomato to stop contacting it. This has to be the fault of Tomato because I have my server setup to specifically allow the router full access.

    It will work for a while (days or even weeks) then suddenly it pops up the message that my server doesn't want it contacting it anymore.

    EDIT: Just saw the thread you posted. The issue I am having is the same as you outlined. Yes, I agree, this seems like a bug.
  4. HennieM

    HennieM Network Guru Member

    The reason why Tomato blocks certain servers (while it seems like the server is blocking Tomato) is when the NTP server's stratum is not good enough, or Tomato figures that the server is not providing consistent time. Stratum 1 is VERY accurate, while any value higher than that is a decrease in accuracy. In my case Tomato always blacked my internal NTP server just after a power failure, so my internal NTP server (to which Tomato syncs) has not had enough time to sync to stratum 1 and 2 servers on the internet, and thus get its own stratum down to an acceptable value.

    If it happens with your Tomato after a few days or weeks of everything running, I would think your NTP server is not up to scratch; i.e. occasionally your NTP server's stratum drifts into the tens or higher, and this is when Tomato blocks it.

    It is also possible that somehow, there's a setting on your NTP server which prevents certain hosts from accessing it - like maybe if a firewall on your NTP servers reckons the requests from Tomato are annoying, or maybe even the NTP software itself. I would doubt this though, and rather figure that it's Tomato doing the blocking.

    Whatever the case, when you set ntpc_kiss_ignore=1 on the Tomato router, Tomato no longer blocks any NTP servers.
  5. GreenThumb

    GreenThumb Addicted to LI Member

    How do I set this? I don't know much about Busybox. On a normal Linux install, one would probably use /etc/sysctl.conf. There is no such file on Tomato.
  6. rhester72

    rhester72 Network Guru Member

    It's an nvram variable:

    nvram set ntpc_kiss_ignore=1
    nvram commit
    Then reboot, and you're all set.


Share This Page