Hi,
Now I want to build up a small network which need to divide to 4 VLAN for different user or server.
I need 3 of VLAN can have DHCP but my 3rd-Layer Switch from HP can't support DHCP server and till now I have no local Server yet.
I have an HG255D on hand which as I know support OpenWRT.
Does it possible that I make this one work as DHCP server for 3 VLANs via a static route connection with a 3-Layer switch?
Topic: OpenWRT work as DHCP on multi VLAN
The content of this topic has been archived on 2 May 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.
Seems no one tested?
Then if we forget the 3-layer switch, only Openwert, Does it support DHCP on multi VLAN?
Hey there.
Works without any issues.
Configuration through LuCI:
* Go to "network / switch"
* Add vlans. Either use one one port "tagged" with every vlan you want or use different ports with a single untagged vlan each.
* Go to "network / interfaces"
* Add a new interface for each new vlan
* Assing IP addresses in the "Edit" mask, different ranges per vlan, of course.
* Here you have a "DHCP Server" panel at the bottom of that "Edit" mask where can enable or disable DHCP server with a checkbox and configure assignment ranges.
I run a TP-Link 4900 that handles vlan2 for WAN (that's OpenWRT default) as well als vlan1, vlan3 and vlan4 as three different LANs. You might make sure to have those LANs in different firewall groups in order to have different rule sets working as well as different "from/to" default settings. E.g. each "LAN" should be able to access "WAN" without restriction, but you might want to limit routing between LANs to a minimum.
Regards,
Stephan.
Thanks Stephan.
So only consider a multi VLAN DHCP, openWRT works well.
And if I connect to the 3-Layer Switch via a Trunk mode, it should also works well but only that the VLAN route maybe move to OpenWRT bridge instead of the switch.
So what I need test is that:
If it can works well via a 3rd-Layer connection between OPENWRT and Switch with Static route rules and DHCP reply.
Hey there.
Works without any issues.
Configuration through LuCI:
* Go to "network / switch"
* Add vlans. Either use one one port "tagged" with every vlan you want or use different ports with a single untagged vlan each.
* Go to "network / interfaces"
* Add a new interface for each new vlan
* Assing IP addresses in the "Edit" mask, different ranges per vlan, of course.
* Here you have a "DHCP Server" panel at the bottom of that "Edit" mask where can enable or disable DHCP server with a checkbox and configure assignment ranges.I run a TP-Link 4900 that handles vlan2 for WAN (that's OpenWRT default) as well als vlan1, vlan3 and vlan4 as three different LANs. You might make sure to have those LANs in different firewall groups in order to have different rule sets working as well as different "from/to" default settings. E.g. each "LAN" should be able to access "WAN" without restriction, but you might want to limit routing between LANs to a minimum.
Regards,
Stephan.
Hey there.
That's not a problem at all.
You can either configure static routes in your OpenWRT. With this configuration, every device on your network uses the OpenWRT as default gateway and the OpenWRT just knows where to route.
The other way is to distibute different additional routes by DHCP responses.
121,10.210.0.0/24,10.212.0.4
This, for example, tells every client to use 10.212.0.4 as gateway for 10.210.0.0/24 links. Can be easily added right to the DHCP panel of the LuCI part of a distinct network. Right in "Advanced Options" as one line of "DHCP-Options".
I would suggest to just give it a try.
The discussion might have continued from here.