Support I have two WLANs: my_wifi_1 and my_wifi_2.
Is it possible to have my_wifi_1 have allocated the IP addresses 192.168.1.100 to 192.168.1.149 whilst my_wifi_2 receives the addresses 192.168.1.150 - 192.168.1.255. That is, they're both on the same subnet.
I'd like to do this so that I can write some Policy Based Rules. I'd like route clients attached to my_wifi_1 over the WAN, and route clients attached to my_wifi_2 over a VPN, whilst keeping all of them in the same LAN (e.g. for Chromecast and Airplay discovery).
I suspect the answer is 'no', but I'm hoping I'm wrong...
I suggest you divide it into two different subnets, such as 192.168.1.0/25 and 192.168.1.128/25. In between the two subnets, firewall and routing strategy are set to realize mutual visits. When accessing the external network, subnet 1 is accessed through WAN port, while subnet 2 is accessed through VPN
Thanks, @luochongjun. That makes sense conceptually. I'll see if I can execute it. I think something close to this is what you're suggesting, along with the Policy Based Rules (which I can set in the LuCI UI using vpn-policy-routing & luci-app-vpn-policy-routing)
Ah yes. I suspect, however, that if I don't bridge them, then service discovery across the two subnets (Airplay, Chromecast etc) won't work without arguing with avahi. I could be mistaken.
yeah, I think I'm using a cannon to kill a mosquito here. I've already got a few static DHCP leases set up, and am doing precisely that.
The use case I'm trying to solve is: in-laws come over, they want to cast from their device to the TV. The TV is on my private subnet which forwards over the VPN. They connect to a subnet which forwards over the WAN (so that Netflix doesn't shout at them about proxies / VPNs) and can still cast to the TV. I could reserve a static DHCP lease and use PBR, but I was hoping I could achieve this without knowing their MAC address in advance.
Not the end-of-the-world, and I had a hunch it'd be more hassle than it's worth. Worth asking, though.
If two networks are bridged then they are one broadcast zone. When a DHCP packet is broadcast if there are two DHCP servers they will both hear the request, both respond, and which one takes effect is nondeterministic.
One way you could make this work is to set up a filtering bridge. But I'd recommend you just set up static leases by MAC and have one DHCP server.
This use case can be solved by static reserving all your stuff and having a dynamic pool for the rest of the stuff, when in-laws come they get a dynamic address and that is a signal to policy route through WAN.
If your problem is solved, please click the check mark below the solution post which makes it easier for people to search for solved problems if they have similar issues! Thanks.
I ended up giving avahi-daemon a bash (just for 'fun'). The Chromecasts are in 192.168.1.1/24 and they appear sporadically in 192.168.3.1/24. But, more-often-than-not, the appear and then disappear, and then I can't cast to them reliably from 192.168.3.1/24. If anybody has any experience of battle with avahi-daemon, then I'd appreciate the guidance. I've managed to get it working in ddwrt before, but so far, haven't succeeded here.