I'm searching for a solution for what I consider a simple routing problem but I can't get my head around it. It's about 3 pi's. The first one works as an accesspoint (I call it #1), the second one works as mailserver (#2) and the third one works as an sharing server (#3) for drives and so on. Forwarding between interfaces is enabled on all three Pi's. There are also other devices connected to #1 that do not play an important role in this situation. There's also no bridging involved (on #2 and #3) and also currently no firewall.

Currently #2 and #3 are connected wirelessly to #1 and all three pi's have connectivity to my network and to the internet. Sometimes #3 has issues with connectivity especially when it is very busy so I want to connect it to #2 with an ethernet cable. This requires #3 to be in a different subnet.

I've set in the routing table of #3 that #2 is the default gateway so #3 sends all packets to #2 and receives its packets from #2. #1 has a route describing that #3 can be reached via #2 and #2 has rules that describe that #3 is to be reached over ethernet and #1 over wireless. So now #2 can ping to #1 and its connected devices and it can ping to #3. If I issue an ping -I eth0 on #3 it indeed appears #3 can ping #1. Unfortunately #3 can't reach the internet. It isn't supposed to anyway but this points out there's already a slight problem.

Somehow if I disconnect wireless on #3 (so it remains connected by ethernet only) it can't ping #1 anymore and obvious it still can ping #2 while #2 can ping both #1 and #3. In the previous step it was established that #3 could ping #1 over eth0 so I don't understand what is going on. It seems like eth0 is influenced by bringing down the wireless interface.

There are literally hundreds of routing examples on the web but nothing seems to work in this situation.

Can please someone enlighten me and please don't mark it a duplicate only (which it very well might be).

Edit: As requested a diagram and the output of the routing tables involved.


  • 1
    you need to show us a diagram that includes the IP address prefixes (subnets) attached to each interface (on all devices), along with all routing information you've currently got configured. In your case, you're going to require IP forwarding on #2, and to reach the Internet from a non-wireless IP address, you'll need to do NAT on or before your external Internet gateway or else it will have no idea how to get back to it. – stevieb Aug 17 '16 at 19:51
  • I think you need some kind of redirection in #2. #2 is not a router so probably when it receives a package from #3 which is not for it, it doesn't know what to do. Try looking for information about forwarding ethernet traffic towards wireless interface – migrc Aug 18 '16 at 7:14
  • @stevieb Thanks. I've added a diagram and additional information. – wie5Ooma Aug 18 '16 at 16:45

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.