Time synchronization is not working as expected

Router with openwrt firmware connected to another router with standard firmware
Firstly, it does not break the connection with the time servers, the connection is constantly connected,
the DHCP time update does not work, when the IP address of the server of the first router is specified,
the time is not updated.
Is it possible to solve these problems in the future?

My temporary solution. Installed luci-app-ntpc, disabled sysntpd,
set the scheduler to restart network once a day to update the time

how can you tell ?

are you referring to DHCP option 4 / 42 ?

install the ntpclient package ?

1 Like

In default installation OpenWrt will query [0-3].openwrt.pool.ntp.org
Are they reachable? Are there dns resolving issues? Is there any VPN involved which won't start with wrong date?
Also the output of
uci export system; ps www | grep ntp
can be helpful.

3 Likes

I need to get time from the first router, with IP address 192.168.0.1
A standard router can get time if you connect it to the first router, and the router with OpenwRT firmware does not know how to do this

Did you change the default time server to the uplink router?

Let's better not jump into conclusions and throw allegations without any evidence or specific examples.

2 Likes

/usr/sbin/ntpdate -s 192.168.0.1
Provided this device serves time.

this setting does not work
you can check it yourself by connecting a router with openwrt to another router

This doesn’t help.

Most consumer routers don’t come with a real time clock onboard. If you are telling us your device at 192.168.0.1 serves time to your network, and ntpdate asks it for a time update that isn’t answered you have a fault with that device.

EDIT: Sorry, I assumed you had ntpdate installed from your reference to disabling sysntpd. Add the ntpdate package.




OK!!
This other router ~ the TP Link? Do you control and own the device?

I control completely and the problem is not in it, and I understand that openwrt was not initially tested when connected to another router, it turns out that I was the first one who connected this way? :slight_smile:

No, it probably "just works" for most people...

Is the main router running the vendor firmware, OpenWrt, or something else?

Are you 100% positive that your main router has an NTP server enabled? Most don't.

2 Likes

you have not provided any hard data yet. not even openwrt version.
can you please answer what had been asked from you, like:

  • openwrt version you use,
  • what is configured as time server in your openwrt router (e.g. run cat /etc/config/system in an SSH session and copy-paste the timeserver part only, or use openwrt web interface System/System/Time synchronization / NTP server candidates),
  • confirm if your other router is actually running as a timeserver. it is not enough that your other router showing correct time because it is synchronized to an upstream time server, it must work also as a time server in order your openwrt to synchronize to.

technically speaking if your other router is indeed working as a time server it should be no different than any other time server, such as the default *.openwrt.pool.ntp.org. as millions of openwrt device "just" work most likely the problem is on your other router's end.

2 Likes

For the last two years, I have not been able to solve this problem, so I wrote here on the forum, in the hope that the programmers will solve this problem. It's easier for me to explain on my fingers, I'm not a programmer
Connect any router first and connect a router with openwrt firmware to the menu and write in the time server settings the local IP address of the first router and you yourself will see that the time will not be updated

yet, still you have not provided any hard data. it is very hard to help you if you just keep ignoring to answer ... good luck.

Not answering the questions...

And why do you need to use the ISPs device as NTP source?

ask someone the time who doesn't have a watch on. They will tell you they don't know. unless the ISP router has a "watch" aka ntp running, you won't get very far.

it's called talking about nothing.
what data should be provided?
I described the problem and I think that whoever understands this will be enough.
the watch developer himself, I think he will only understand what I mean :slight_smile:
anyway thanks for trying to help

You still haven't provided any kind of evidence backing up your statement, except for a "it doesn't work, so it must be broken".

We can't see anything that would require fixing...

1 Like