0

I can seemingly only connect to my Pi via an ethernet cable if I have temporarily disconnected from WiFi. Once I login, I can reconnect to Wifi, and I can talk to both my Pi and use the internet.

However I really need to have both simultaneously without having to switch the WiFi off every time I login. What could be causing this? It seems as if my PC only looks for hostnames on the wifi network if it is connected there.

My OS: Windows 10

connection method to Pi: Ethernet

connection method to internet: WiFi

pi login: 'ssh [email protected]'

UPDATE:

ping results, WiFi on/off:

ping with wifi off:

>ping raspberrypi.local

Pinging raspberrypi.local [169.254.115.245] with 32 bytes of data:
Reply from 169.254.115.245: bytes=32 time=3ms TTL=64
...

With WiFi on:

>ping raspberrypi.local

Pinging raspberrypi.local [198.105.244.23] with 32 bytes of data:
Reply from 4.68.73.122: Destination net unreachable.

ipconfig results:

    Ethernet adapter Ethernet 6:

   Connection-specific DNS Suffix  . :
   Link-local IPv6 Address . . . . . : fe80::95ef:4a83:6e99:7193%7
   Autoconfiguration IPv4 Address. . : 169.254.113.147
   Subnet Mask . . . . . . . . . . . : 255.255.0.0
   Default Gateway . . . . . . . . . :

Wireless LAN adapter Wi-Fi:

   Connection-specific DNS Suffix  . : Home
   Link-local IPv6 Address . . . . . : ur mom
   IPv4 Address. . . . . . . . . . . : 192.168.0.106
   Subnet Mask . . . . . . . . . . . : 255.255.255.0
   Default Gateway . . . . . . . . . : 192.168.0.1
3
  • perhaps your wifi is isolated from wired (on the wifi access point/router) Jun 20, 2021 at 9:38
  • Is your wifi and ethernet on the same or different subnets? What are the results of ping raspberrypi.local with and without wifi? How are your ethernet and wifi networks related / connected?
    – user10489
    Jun 20, 2021 at 12:41
  • ping with wifi off: >ping raspberrypi.local Pinging raspberrypi.local [169.254.115.245] with 32 bytes of data: Reply from 169.254.115.245: bytes=32 time=3ms TTL=64 ... With WiFi on: l>ping raspberrypi.local Pinging raspberrypi.local [198.105.244.23] with 32 bytes of data: Reply from 4.68.73.122: Destination net unreachable. Jun 20, 2021 at 16:06

1 Answer 1

0

The 169.254.115.245 address is a self assigned address on the wired network, probably resolved via mdns.

The 198.105.244.23 address is a non-local address probably coming from your ISP possibly via regular DNS and is bogus. (To verify this, visit it with a web browser and see if you get an advertisement page.) The ip address you get with wifi disabled should work even with the wifi enabled, except that it may periodically change.

Here are some options to make the network configuration more stable, each of these has advantages and disadvantages:

  • replace your ISP's DNS server with one that doesn't return bogus answers for unknown hosts. For example, you could use google's 8.8.8.8 or 8.8.4.4
  • Change your wired network configuration to use a static range instead of a self-assigned range on both computers (e.g., 192.168.1.10 for your computer and 192.168.1.20 for the pi)
  • Add a dhcp server to your wired network to pass out ip addresses instead of using self assigned addresses or assigning them by hand (as above), and see if it has an option to make the PI's address static
  • keep using the self assigned addresses you have now; but you'll have to periodically check what address the pi is using when it changes (probably when it reboots)
  • change your local computer's DNS resolution to resolve via mdns before resolving via regular DNS (but this should be default??)
2
  • Thank you so much!! What worked for me was switching my WiFi's DNS server to 8.8.8.8 Not sure why it needed that but that's what did it for me. Jun 20, 2021 at 18:35
  • I'm glad that helped. Likely it was probably using your ISP's dns before, which was returning bogus results for unfound hosts so it could send you advertising. Changing your router's DNS to google's is probably the simplest solution.
    – user10489
    Jun 20, 2021 at 19:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.