1

This is my problem.

I have trying yo use a RPi 3 Model B with Raspberry Lite OS (headless) for make a home NAS. Well, the true is I can use it via WiFi, but I can't with a ethernet. My router can see raspberry. It gives 192.168.1.164 IP to wireless and 192.168.1.165 to ethernet. If I try to connect via ethernet, I can't do it. I try ping to 192.168.1.165 without result, and I try ssh pi@192.168.1.165 and I get timeout error.

Pluggin out the ethernet and connecting via WiFi I can do ping and ssh to 192.168.1.164

I have been searching and I can't to figure out.

Thanks in advance.

Edit:

Following the answer of @Criggie I have made ip route ls and this is the result:

default via 192.168.1.1 dev eno1 proto dhcp metric 100 
169.254.0.0/16 dev eno1 scope link metric 1000 
192.168.1.0/24 dev eno1 proto kernel scope link src 192.168.1.140 metric 100 

Before that, I have disable WiFi adding dtoverlay=disable-wifi to /boot/config.txt file, and I have reserved the IP of raspberry via router configuration.

Now I can connect to RPi (ping and ssh works), but I can't see it when I execute ip route ls

1 Answer 1

1

Sounds like confusion. Try disconnecting the wireless (ie, forget the SSID) on the Pi, and just leave the wired connection active.

The wired connection will be faster, and more reliable than wireless, and if you're using another wireless device there will be less spectrum contention from two clients trying to exchange data, compared to one wired and one wireless device.


Why? Check out your route table with ip route ls I bet you see something like this:

$ ip route ls
default via 192.168.1.1 dev wlan0 onlink 
default via 192.168.1.1 dev eth0 onlink 
192.168.1.0/24 dev wlan0 proto kernel scope link src 192.168.1.164
192.168.1.0/24 dev eth0 proto kernel scope link src 192.168.1.165

Your wireless came up first, so that interface got a default route via the wireless AND a route to the local network directly via .164

Then your wired link came up in the same network, with its own default route and local network route.

When the kernel makes a routing decision like

What interface do I send a packet out, to get to 192.168.1.user?"

then it searches the route table TOP DOWN, and FIRST MATCH EXITS.

With the routing table above, first match is line3, out device wlan0 and sourced from 192.168.1.164.

Your client machine is sending to 165 and receiving replies from 164, and for security it throws that all away as unexpected traffic.

Does that make sense ?

1
  • Hello @Criggie. Thanks for your answer. Now I can listen the RPi but still can't appears when ip route ls is called. Apr 3 at 10:12

Your Answer

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

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