OPNsense Forum

English Forums => General Discussion => Topic started by: gctwnl on November 27, 2022, 05:26:30 PM

Title: Can I create a VLAN with its own 192.168.x.x/24 range and DHCP?
Post by: gctwnl on November 27, 2022, 05:26:30 PM
I'm new to opnsense and I'm migrating from EdgeMax/EdgeOS.

My Wifi network has a couple of SSIDs, each of which are coupled to a classic VLAN. On the EdgeMax, I've created a solution where a VLAN 99 is given its own 192.168.3.x network (my main LAN is 192.168.2.x), and the EdgeMax router only allows 192.168.3.x to send traffic outside. The devices on the 192.168.3.x network have their own DHCP setup.

Can I recreate this on opnsense?
Title: Re: Can I create a VLAN with its own 192.168.x.x/24 range and DHCP?
Post by: Demusman on November 27, 2022, 06:28:10 PM
Of course!
You can do anything you want with vlans as long as you have a switch that can handle them.

If you have enough physical interfaces you can use one of them to take the .3 network to your switch.
If you only have a WAN/LAN setup, just go to interfaces/Vlans, add a vlan to the LAN interface with whatever VID you wanna use. You can leave your LAN network untagged on your switch and any added vlans will need to be tagged.
Then go to Interfaces/Assignments and add the new vlan as an interface. You can then assign IP's DHCP and anything else you want to it.

Then that interface will show up under Firewall/Rules. Apply any rules you want to allow it whatever access you want.