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).