I have been trying to connect my Raspberry Pi to the internet through its built in Wifi, as well as controlling/ accessing the Pi via ssh though a Static IP address via the built in Ethernet port.
When the Ethernet is unplugged, I can access the Pi though SSH and the NTP updates the time correctly.
However when I attach my ethernet cable, the NTP fails to connect, and endlessly cycles through the pools I have given in timesyncd.conf.
sudo nano etc/systemd/timesyncd.conf
looks like this:
[Time]
NTP=0.debian.pool.ntp.org 1.debian.pool.ntp.org 2.debian.pool.ntp.org ntp.ubuntu.com
FallbackNTP=1.debian.pool.ntp.org ntp.talktalk.net 1.ntp.talktalk.net 2.ntp.talktalk.net
#RootDistanceMaxSec=5
#PollIntervalMinSec=32
#PollIntervalMaxSec=2048
sudo nano etc/dhcpcd.conf
looks like this:
interface eth0
static ip_address=192.168.4.13/24
static routers=192.168.4.1
static domain_name_servers=192.168.4.1
#static ip6_address=fd51:42f8:caae:d92e::ff/64
ip route show all
looks like this:
default via 192.168.4.1 dev eth0 src 192.168.4.13 metric 202
default via 192.168.1.1 dev wlan0 proto dhcp src 192.168.1.235 metric 303
192.168.1.0/24 dev wlan0 proto dhcp scope link src 192.168.1.235 metric 303
192.168.4.0/24 dev eth0 proto dhcp scope link src 192.168.4.13 metric 202
cat /etc/resolv.conf
shows this:
# Generated by resolvconf
domain lan
nameserver 192.168.4.1
nameserver 192.168.1.1
I find it interesting when typing timedatectl show-timesync --all
, the Server Address is being resolved, without internet access:
LinkNTPServers=
SystemNTPServers=0.debian.pool.ntp.org 1.debian.pool.ntp.org 2.debian.pool.ntp.org ntp.ubuntu.com
FallbackNTPServers=1.debian.pool.ntp.org ntp.talktalk.net 1.ntp.talktalk.net 2.ntp.talktalk.net
ServerName=ntp.ubuntu.com
ServerAddress=91.189.94.4
RootDistanceMaxUSec=5s
PollIntervalMinUSec=32s
PollIntervalMaxUSec=34min 8s
PollIntervalUSec=4min 16s
Frequency=0
If I VNC into the Pi and try access the web browser, the pages do not load.
If I remove the Ethernet cable, I am instantly able to access the internet and the NTP server updates automatically.
If I again re-plug the ethernet in, the connection drops back out.
My home network is on 192.168.1.X range (wifi) and I have set my laptop and the Pi's ethernet port to the 192.168.4.x range arbitrarily to be different from all other devices in the home.
I'm pretty new to all this, apologies if I've given too much/ too little info. Any advice on where to look, or more info I can give would be appreciated.
Thanks for reading!