DHCP service for multiple VLAN

Started by Vincent Chen, February 15, 2022, 03:36:25 AM

Previous topic - Next topic
Hello, everyone

I just got a cisco SG-250 switch and plan to create 2 VLAN on it.
Opnsense will connect to VLAN1. Is it possible to assign IP to
VLAN2 from opnsense dhcp service? I googled and found a similiar
topic years ago and it say it not possible.

If opnsense can not help, I should build a dhcp server on vlan1 and
use SG-250 dhcp relay feature to assign IP to VLAN2. Is this idea
correct?


Thanks,

February 15, 2022, 01:16:45 PM #1 Last Edit: February 15, 2022, 01:27:11 PM by lilsense
You need to configure the interface connected to the Cisco as a trunk interface carrying multiple VLANs. Next create your vlans and assign them to your interface. Assign the vlans with IP and setup DHCP, done.

Simple googling:

https://homenetworkguy.com/how-to/configure-vlans-opnsense/

February 16, 2022, 02:53:32 AM #2 Last Edit: February 21, 2022, 09:53:23 AM by Vincent Chen
Thanks for giving me a good idea to start.

Let me share my experience:

Environment
SG-250 have 2 vlan with id 1,2, opnsense connect to vlan1

Opnsense side
1. add a vlan with id 2
2. assign interface for vlan2
3. enable dhcp service on vlan2

SG-250
1. configure opnsense port to trunk

That's all