Multiple networks on same physical network DHCP

Hi

Is it possible to setup two different scopes on a DHCP server? The scenario is, my OpenWRT box's LAN side interface has two IPs, 192.168.1.1 and 192.168.2.1 and I want it to assign IPs to regular DHCP clients from the 192.168.1.0 range, but specific devices (MAC filtered) I need to be assigned to 192.168.2.0. Also, I need IPv6 to those MAC filtered devices to be on another IPv6 subnet. I have a /56 prefix so I subnet using bit 56 to bit 63. Currently, I am doing this by manually configuring these devices, but it would be nice to have them auto config as they are regularly moved to other locations and fiddling with the settings every time is annoying.

Gratz

see

The extra DHCP config section might be the solution for ipv4 but I'm still unsure how to filter clients for each subnet. For ipv6 it's trickier the RA and DHCP settings are very confusing.

The problem is this. I have Sky (UK) FTTC fibre. In order for my landline to work it needs to be plugged into the Sky router because it's now a voip service. Obviously if I change the sky router to the OpenWRT box, I lose the voip and thus lose my landline. I still use the Sky router, but all its DHCP options are turned off so it just acts as a WiFi access point. The voip doesn't work like this because there's no connection on the WAN port. If I connect the router via the WAN port, the voip works, but now WiFi clients get double natted and ipv6 is totally messed up with conflicts..

EDIT: Never mind, what I want to do is not possible because the MAC address of the WAN port on the Sky router is the same as the LAN ports. So there's no way for OpenWRT to distinguish which side is which. I might be able to hack the sky router to use a VLAN on the WAN side though. Investigating.

EDIT2: Yes, you can set the sky router to use VLAN 101 on the WAN side. This simplifies things as I can now use a virtual adapter eth0.101 on OpenWRT to deal with it.

1 Like