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

NTP - Router Time Not Available shibby v140

Discussion in 'Tomato Firmware' started by jagdishadusumalli, May 10, 2017.

  1. jagdishadusumalli

    jagdishadusumalli Network Newbie Member

    hi @shibby20

    i am facing the "Router Time Not Available" issue due to which all my logs time info shows as "Jan 1 05:30:08...+"
    I need logs to have proper time
    1. to report my isp no of disconnects/ downtimes which have increased and not being acknowledged.
    2. bandwidth logs are not working

    I have tested and reproduced this issue on 2 routers Asus RT-AC66U and Netgear R7000 running
    latest shibby v140.

    My WAN connection is PPPoE with a Username, password and a Service Name I have a static ip given by the ISP.

    Rest of all the settings are usual simple and mostly defaults...no complex config.

    http://www.linksysinfo.org/index.php?threads/no-ntp-time.72870/
    I tried a few things from above link, like trying to set NTP Server to US etc
    It did not work though the setup and issue in that thread are different than me.

    My set NVRAM variables nvram set ntp_updates="4" nvram set ntp_server="0.us.pool.ntp.org 1.us.pool.ntp.org 2.us.pool.ntp.org" nvram set ntp_tdod="0" nvram set ntp_kiss="" nvram set ntp_kiss_ignore="" nvram set os_date="Mon, 05 Dec 2016 08:09:29 +0100" nvram set tm_dst="1" nvram set tm_sel="UTC-5:30" nvram set tm_tz="UTC-5:30"

    I found out that when i use the router to connect to internet via USB Modem i.e. WAN Type = "4G/ LTE" the time is being set properly.

    So i think for me its specifically happening when the WAN Conn Type is set to PPPoE

    is there any way i can get this working?
     

    Attached Files:

  2. PetervdM

    PetervdM Network Guru Member

    as time synchronization functions when you are connected by 4G/LTE it might be that your PPPoE provider does not allow SNTP connections to alien time servers, and only allows you to connect to its "own" time servers.
    pls check with them.
     
  3. jagdishadusumalli

    jagdishadusumalli Network Newbie Member

    Thanks peter
    You are right my ISP must have blocked UDP 123 due to which ntpc command fails as below
    Code:
    ntpc 0.us.pool.ntp.org
    Trying 0.us.pool.ntp.org [108.61.56.35]:Timeout
    i am afraid my ISP wont unblock it for me.

    Is there anyway i can set it directly on the shibby firmware and not depend on the NTP time servers
    like we do in our smartphones
     
  4. kthaddock

    kthaddock Network Guru Member

    Maby you can use IP-number insted from ntp.org
    "0.us.pool.ntp.org"
    66.228.48.38, 138.68.46.177, 199.241.184.162, 96.126.122.39
     
  5. jagdishadusumalli

    jagdishadusumalli Network Newbie Member

    the ntpc command would still fail even if i use ip's instead of names
    Code:
    ntpc 66.228.48.38
    Trying 66.228.48.38: Timeout
    Any other workaround?
     
  6. kthaddock

    kthaddock Network Guru Member

    If you use VPN-tunnel you can send you request there.
     
    Justio likes this.
  7. PetervdM

    PetervdM Network Guru Member

    what is your provider? check on their faq / customer support / forum which servers you can use
     
  8. Justio

    Justio Networkin' Nut Member

    I second this. I have moved my router recently (Toastman firmware 8510.5) to a new location and the time synchronisation stopped working with the new provider (both are PPPoE). The issue (at least for me) is with the provider. I've contacted their support to report the issue - waiting for reply.
    The time is correctly syncing trough VPN.

    Edit: Provider reply: the NTP port is filtered :mad:
     
    Last edited: May 11, 2017
  9. Monk E. Boy

    Monk E. Boy Network Guru Member

    It would take some effort, but if you setup a server on your LAN you could have Tomato sync to it for NTP, then have the server go through a VPN tunnel to sync to external sources. If the server has a battery backed up clock it should have a persistent time that's relatively close to actual so when Tomato goes down or gets rebooted its time will still be accurate enough for Tomato to sync against. If Tomato and the server go down (power outage) then the battery backed up clock should keep the clock in a similar state. Once Tomato boots and has a functioning time the VPN tunnel should be easy to establish.

    On the low end you could go with a Pi (though I t think most/all of them don't have battery backed up clocks) or go up a little and get an Intel NUC and put Linux on it. NUCs go all the way down in size and power to devices that look like Firesticks or Chromecast dongles (maybe a little larger, and some have wall wart power supplies).
     
  10. ruggerof

    ruggerof LI Guru Member

  11. nn6onn6o

    nn6onn6o New Member Member

    (Note: please replace the "xx" with "TT" wherever you see HxxP below...as a noob, the board's "link" filters won't let me post the Hyper Text Transfer Protocol acronym).

    Had this problem at the school district I work for - NTP was blocked at the district's WAN firewall (and there were no internal NTP servers!). I found a solution online using NTP via HxxP. There are a couple of programs available for Windows that run as a service and retrieve time via HxxP headers (sorry, don't remember what they are at the moment...the district finally turned NTP on last year).

    And, a quick Google comes up with a short script that might work (requires a couple CLI tools)...
    darn...can't post links yet - Google the the following words:
    ntp via HxxP mina86
    and select the link to the mina86 site.

    The script looks like it could fairly easily be ported to Linux and run via a Tomato startup or chron script. But my 'nix skills are nil, so if someone else wouldn't mind taking a look...

    If I find the Windows apps I used, I'll post again.

    - nn6o
     
  12. jagdishadusumalli

    jagdishadusumalli Network Newbie Member

    Thanks a lot everyone for chipping in with suggestions.
    i dont have any extra system for setting up NTP server nor i have the skills/ knowledge to do.

    i was wondering why we cant have a manual way of setting time on router like we can on desktops and smartphones?
     
  13. Justio

    Justio Networkin' Nut Member

    In order for the VPN to work (as the VPN service does not start without the time being set) from tomato to another VPN server or as Monk E. Boy stated, you need to set the time manually or at start-up
     
  14. PetervdM

    PetervdM Network Guru Member

    you could setup a ntp timeserver utility on a windows system with a fixed ip address within your lan and point your router towards it.
    i usually use an ancient utility - timesync - for all time related issues but i can't find a download location for it anymore. no doubt there will be several others.

    you can't have a data entry field as the value entered wouldn't survive a reboot. tomato doesn't support a rtc, even if the would be present in the hardware used.
     
    Last edited: May 11, 2017
  15. Sortec

    Sortec Connected Client Member

    if you click on custom, you cant enter the npt server of your isp? They have to allow for npt, maybe not external servers, but most computers rely on it.
     
  16. Monk E. Boy

    Monk E. Boy Network Guru Member

    If you telnet or ssh into the router there should be a way to set the clock there. It won't be as accurate as ntp but maybe it'll be accurate enough to get ntp up. The problem is you have to do this by hand.

    Do you have any kind of a desktop or laptop? There used to be free ntp servers available for Windows that could run at startup and you could point your router at your desktop for ntp. For the longest time I did this at a company whose network nazi had blocked NTP at the edge router (he didn't last long after I showed up and started asking questions). The servers synched to external sources and clients synched to the servers, but the servers weren't running TCP/IP (probably showing my age here), so I had one of my clients run TCP/IP and an NTP server and just like that all the *nix guys were happy.
     
  17. jagdishadusumalli

    jagdishadusumalli Network Newbie Member

    Thanks guys..based on the ideas suggested i resolved the issue
    I am running macOS Sierra and i just tried to fetch time from the mac and it worked
    from the router via ssh i did
    Code:
    ntpc 192.168.1.11
    (address of my mac)

    i did'nt have to do anything..any setup or configs even.

    and further to automate this
    i went into the router's Basic Settings -> time
    and for NTP Timer server selected Custom and added the Mac's IP Address as last option
    (See image attached)

    For now it works beautifully but still hoping the ISP would unblock UDP Port 123
     

    Attached Files:

  18. Cold Winter

    Cold Winter Reformed Router Member

    Errrmmm... how does your MAC sync NTP???
     
  19. Monk E. Boy

    Monk E. Boy Network Guru Member

    OS X back toat least 10.4 are running ntpd. The firewall configuration may block any other device on the network from communicating with it, but by default Apple has a pretty permissive configuration for ntpd (which bit them a little while ago when ntpd exploits were uncovered). The PC (or Mac in this case) clock should stay fairly close to accurate, at least well enough to get a VPN tunnel up.
     
  20. jagdishadusumalli

    jagdishadusumalli Network Newbie Member

    As i mentioned in my post i did not do any setting or config.
    i just checked whether i have a NTP Server already running on my macOS Sierra by command below

    ps -ef| grep ntpd
    0 547 1 0 26Apr17 ?? 0:50.86 /usr/sbin/ntpd -c /private/etc/ntp-restrict.conf -n -g -p /var/run/ntpd.pid -f /var/db/ntp.drift

    it showed i had it already

    Then in ssh'd into the router and ran command as below

    ntpc 192.168.1.11

    and bingo Router's Web UI was showing me the correct time.
    Later i set up router's Time settings to update every 4 hours using my mac as NTP server.

    i dont know much about security and vulnerability in ntpd server
    but this is not mac os 10.4 or previous to that but working on the latest macOS Sierra 10.12.4
     
  21. Cold Winter

    Cold Winter Reformed Router Member

    You can get a GPS puck with a usb interface
    for pretty cheap on ebay. And if thats a real ntpd
    daemon on your MAC ( MAC OS is an extention of
    FreeBSD so I suspect its good ), its fairly straight
    forward to get very precise time off of GPS.

    That gives you a truly excellent time service for your
    LAN... and of course, your router ;)
     

Share This Page