ToddSmith
Posts: 1
Joined: Sat May 20, 2017 10:38 pm

Really strange NTP over WiFi problem

Sat May 20, 2017 11:02 pm

Greetings! I've got a network of 4 Raspberries all model 3 running the latest Jessie via apt-get update and apt-get dist-upgrade. 2 of them have NTP working perfectly, and 2 of them are behaving oddly.

Pi #1 is acting as a wifi extender, in that it connects to my wifi network via the built in wifi, and passes that through the ethernet port to wifi router #2. The other 3 Raspberries are attached to router #2. NTP is configured to look at 4 NIST pools, and works great.

Pi #2 is acting as a storage/media server. It is connected to router #2 via ethernet and NTP is configured to look at 4 NIST pools and is working great.

Pi #3 and Pi #4 are acting as media center clients hooked to TVs in 2 different rooms. They are attached to router #2 via wifi, and also see SMB shares on Pi #2. NTP is configured to look at 1 NIST pool, Pi #2, and each other. NTP syncs with Pi #2 and each other, but neither Pi can see the NIST pool.

As weird as it sounds, it looks like router #2 is blocking external NTP over wifi, but allowing it over ethernet, or allowing it over wifi on the same subnet. The router is a Linksys WRT54GS.

In researching this problem, I saw where a lot of people are having issues getting NTP to work at all using the built-in wifi of a Pi 3, but that's not the problem here. Pi #1 is attached to router #1 via wifi, and can see all 4 NIST pools configured. Pi #3 and Pi #4 can see each other and Pi #2 over wifi, and can sync, just not see anything not on the local network. And yet Pi #2 sees all, so I don't think it's a router configuration issue, unless it somehow only deals with wifi.

Any thoughts or suggestions would be greatly appreciated.

SurferTim
Posts: 1769
Joined: Sat Sep 14, 2013 9:27 am
Location: Miramar Beach, Florida

Re: Really strange NTP over WiFi problem

Sun May 21, 2017 12:31 pm

This worked for me when using wifi only.

Code: Select all

sudo /sbin/iptables -t mangle -I POSTROUTING 1 -o wlan0 -p udp --dport 123 -j TOS --set-tos 0x00
sudo apt-get install iptables-persistent

Return to “Troubleshooting”