OPNsense Forum

Archive => 23.1 Legacy Series => Topic started by: quin on June 29, 2023, 10:48:34 AM

Title: OPNsense + KVM: Looking for VLAN best practices
Post by: quin on June 29, 2023, 10:48:34 AM
Hi,

I would like to run a OPNsense Firewall as a virtual guest on a Linux KVM Hypervisor.
The Hypervisor is connected with 2x 10G Fiber to a Switch.

Now the question is how to best configure VLANs:


I couldn't find many guides about the second approach, but it sounds better, because a new VLAN would not require a guest reboot and it doesn't create lots of interfaces on the hypervisor. So I wonder if there is any best practices for this?

Thanks.
Title: Re: OPNsense + KVM: Looking for VLAN best practices
Post by: sorano on June 29, 2023, 10:57:49 AM
I use the latter approach (in ESXi) for the reason you mention, no need to restart when adding new vlan interfaces, another reason is that hypervisors can have an upper limit on the amount of interfaces per vm.
Title: Re: OPNsense + KVM: Looking for VLAN best practices
Post by: quin on June 29, 2023, 11:04:05 AM
Hi!

Are there any downsides to this?

I just wonder why every guide takes the first approach.
Title: Re: OPNsense + KVM: Looking for VLAN best practices
Post by: Patrick M. Hausen on June 29, 2023, 11:04:45 AM
I'd recommend PCIe passthrough if you have enough interfaces.