I also have several pies on my in-house network, acting as bridging wireless access points. (different SSIDs but they all bridge to the same 192.168.1 subnet, and that works great.) The majority of machines in my house (about 80 of them) connect via these pi-based access points.
Now for obscure reasons that are not worth explaining here, I have a second internal wifi network on 10.0.0 that has a few other machines on it. This subnet is behind a commercial NAT wifi router, so these addresses are not visible to the rest of the in-house net which is on 192.168.1 (although the in-house net is visible to the machines on 10.0.0 indirectly, through their nat gateway which connects to 192.168.1.1 by wire)
I would like machines on 192.168.1 to be able to *route* through to 10.0.0 via the main router 192.168.1.1
This should be fairly easy. Just have 192.168.1.1 attach *as a client* to the 10.0.0 wifi router. Then it will be able to forward packets to any 10.0.0 address, since routing is already enabled on it (being after all configured as a router)
The problem is that if I connect to a wifi network from the pi router, it thinks that the new network leads to the internet and changes its default route to the 10.0.0.1 access point. Which I don't want. I just want to access stations on 10.0.0 but not to route through that network to the internet.
So my question is "How do I make my 192.168.1.1 router log on as a client to the 10.0.0 wifi access point, without changing its default route to the 10.0.0.1 gateway which that access point advertises?"
I hope that was clear. To forestall inappropriate answers, I *don't* want to set this machine up as an access point itself (eg with hostapd), nor do I want to set up bridging to that subnet. I just want it to pick up a 10.0.0.x IP on wlan0 as a client and forward packets internally between eth1 (192.168.1) and wlan0 (10.0.0). I can set up a static route on 10.0.0.1 to direct packets for 192.168.1 back to the new wlan0 IP on my pi router which I'll make sure is a fixed address.
I can probably do what I want manually when I connect to the wifi, if I then do a 'route delete default' to get rid of the unwanted 10.0.0.1 gateway, followed by a 'route add default' to restore the original default route, but I don't want to do that manually and I'm not confident that it would be robust enough if done with wlan0's ifup/ifdown scripts - I don't want to take the chance of having the external internet connection go down just because I connected or disconnected to that private wifi subnet. It would be much more robust if bringing up the wifi never touched the default route to begin with.
Is there a recommended configuration? Something in wpa_supplicant.conf? I'm hoping the answer is a lot shorter than the question