How to synchronize time between two devices on a local network using NTPD, with one device serving as both client and server on separate interfaces?

The problem is you’ve told each device to synchronize to itself via the obsolete local clock driver 127.127.1.0 driver. The fallback functionality provided by that driver is now handled by a built-in orphan mode.

Modify both ntp.conf files to remove both lines referencing 127.127.1.0. Add to both files:

tos orphan 11

On the primary device with internet access add:

pool 2.pool.ntp.org. iburst
manycastserver 224.1.2.3

On the device without internet access add:

manycastclient 224.1.2.3 iburst maxpoll 7

Stop ntpd on both devices and delete /var/lib/ntp/drift as neither has actually calculated a meaningful frequency offset from UTC, and the 0.000 they have will dramatically slow the initial frequency correction.

Restart ntpd on the device with internet access and give it at least 15, preferably 30 minutes to find a cohort of pool servers and refine its frequency offset. Then restart the inside ntpd.

Using ntpd’s manycast server discovery scheme insulates the ntp.conf files from any need to know the IP addresses involved, and makes it easy to add additional devices with or without internet access. If you prefer, you could use IPv6 for the multicast addresses replacing 224.x.y.z with ff02::xyz or ff02::x:y:z etc.

Let us know how it goes for you.

2 Likes