Setting up multiple interfaces for the same physical ports with IP/subnet location based on static/dynamic leasing

Hey guys, I'm new to OpenWrt and have been having some fun playing around with it.

Here's what I'm trying to do:

Have 2 different interfaces both covering the same physical interfaces (eth1.1, WLAN) with different subnets (192.168.0.0/24 and 192.168.2.0/24) which already gets me into trouble (I had no luck with aliases like @lan either).

I set one of the interfaces to dynamic DHCP to allocate addresses to the 192.168.2.0/24 pool (this subnet uses my split VPN tunnel)
The 192.168.0.0/24 pool I only want to be used through static leasing (in case I have devices I do not want to go through the VPN)

What would be the best way to go about it?

Thanks

  • Make the interface 192.168.2.0/24 and use DHCP as normal
  • Use DHCP to statically assign 192.168.1.0/24 addresses (and I'm assuming with a gateway - by using DHCP Option No. 3).

(Although, I'm lost at why you want 2 subnets on the same broadcast domain.)

Hi lleacchii

Thanks for your response. Me being quite a noob at linux/openwrt must constantly do things that are hard for you guys to understand :sweat_smile:

I managed to get things working by using only one interface for LAN and one for guest and splitting the VPN tunnel in LAN from 192.168.0.128 and then assigning static leases within 192.168.0.0/24

Cheers