Hello,
First of all this is not really just an OpenWrt specific question, it's more like general TCP/IP knowledge (or the lack of). But it may be OpenWrt specific when it comes to routing and network bridges. First I'll try to paste in a rudimentary ASCII diagram that I created about a part of my setup:
+------------------+ +------------------+
|ap1 wifi radio1 | |client device1 |
+---+br1: if1,radio1 +-+ +-+ +-+ +-+172.21.100.69 |
| +------------------+ +------------------+
|
+--------------------+ | +------------------+ +------------------+
|OpenWrt ap1 | | |ap1 wifi radio2 | |client device2 |
+---+if1: 172.21.100.249 +---+---+br2: if1,radio2 +-+ +-+ +-+ +-+192.168.2.1 |
| |if2: 192.168.2.249 | +------------------+ +------------------+
| +--------------------+
| br66: if1,if2 (?)
|
+--------------------+ |
|OpenWrt main router | | +------------------+
|if1: 172.21.100.254 +---+-----------------------------------------------------------------+my client device3 |
|if2: ... | |172.21.100.66 |
|if3: ... | +------------------+
|... |
+--------------------+
static route1:
iface if1
target 192.168.2.0/24
gw 172.21.100.249
What I'm trying to acomplish is the following: I would like to access the 192.168.2.0/24 subnet from my client (device3) which is by default on the 172.21.100.0/24 subnet. For this reason I have set up an additional static route on the main router, as described above. This has let me access and ping only ap 192.168.2.249 from all the clients within subnet 172.21.100.0/24, I am not able to reach 192.168.2.1.
Another important detail in my case above, some if the radios (or separate SSIDs), let's say radio1 on ap1 are configured in access point mode, however radio2 is connecting to device2 in client mode.
What I have tried is to bridge if1 and if2, since by default, once I connected with OpenWrt in client mode to device2, it created this new interface (if2), but not a network bridge with other interfaces. I always assumed that when a new 'radio' or SSID is created and a specific network (interface) is being chosen (in the case that there is only one or many LANs or VLANs), a network bridge is created between the selected LAN and radio.
I have tried adding a static route on the OpenWrt ap1, but it seems that it was incorrect, as it rendered the device unresponsive, so I had to power cycle it to gain access back.
I have also tried setting the static route created on the main router, on my client3 only, this way i was able to only access 192.168.2.249 again only from that device.
Tried to dedicate a whole different OpenWrt device just for this, with the same wireless config/routing settings but the results are same.
I also tried to directly bridge radio2 with if1 (172.21.100.249/24), first by setting a secondary static IP address for if1: 192.168.2.249/24 (and then by not creating the f2 interface altogether), but it caused the wireless client disconnect immediately, with error: " Interface 2 setup failed: BRIDGE_NOT_ALLOWED" in the syslog. Apparently the wifi radio in client mode can only operate as a new 'network interface'.
Should I try creating/using VLANs instead for this purpose? I have also never tried ad-hoc mode at the wireless radio settings. Would that work in my case? What is the correct way of specifying a static route that would work in my case?
Oh, and a second important thing. device2 is acting as an access point itself, it has it's own SSID/WPA2 which lets clients connect to it, however it is not a router. Also there is no possiblity to change it's IP adress and subnet, or set it up to act as a wireless client, hence my settings is OpenWrt.
Thank You,