0

Update I resolved the issue. My static ip address had a default gateway set. Once removed the issue was fixed.

I have a Raspberry Pi that I use in headless mode, and it has been configured to automatically connect to our WiFi and start a script. This is fine and has been working as expected.

Recently I purchased a small Ethernet based printer so I have the ability to be able to print directly from the Raspberry Pi.

However, it's important the printer is not on a subnet that my Wifi can access so to resolve this I set the Ethernet port on the Raspberry Pi to a static IP address that is not part of the network infrastructure. Then set the IP address of the printer to be on this same subnet. Essential, the Raspberry Pi and printer is sitting on its own private IP range.

For clarification, my WiFi is connected to a network 10.10.0.0/16. The Printer and eth0 port of the Raspberry Pi is on 192.168.0.0/24. It's important to know that these two subnets have no internet access.

There is no (and can't be) routing between these two subnets.

This works. My Raspberry Pi can perform its action on the Wifi, plus send a print command to the printer to print.

What I have notice is that the Raspberry Pi's Date and Time has started to be incorrect. When I unplug the Ethernet Cable, the Date and Time fixes itself on next reboot. Plugging Ethernet back in and rebooting, the Date and Time does not update.

I suspect that when it boots up, it attempts to connect to our NTP server using eth0. This port will not have access to our NTP server so fails.

I am not sure how I can test this hypothesis. Is it possible for me to configure the Raspberry Pi to only use wlan0 when it attempts to get the date and time from our NTP server?

I noticed something similar when I attempted to ping to the NTP server from the Raspberry Pi, it could not reach the destination.

Forcing the ping utility to use the wlan0 resolved this

ping -I wlan0 10.10.0.1 

Thanks

  • How is your eth0 configured? – RalfFriedl Jul 31 at 16:49
  • please add the output of these two commands to your question. ip addr and ip route. – Ingo Jul 31 at 18:19
  • Unless you explain how you (mis)configured your networking we can’t tell you how to fix it – Milliways Jul 31 at 22:15
  • I solved the issue by removing the default gateway in the eth0 – Ian Aug 1 at 11:51
  • Please post your solution as an answer rather than an edit to the question. – Brick Aug 1 at 13:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.