VLAN question

AMiGAmann

Contributor
Joined
Jun 4, 2015
Messages
106
Hi there,

I would like to host OPNsense on TrueNAS SCALE as a virtual machine. The vm should have at least two different nics in two different VLANs, one for the LAN-side, one for the WAN-side. The TrueNAS SCALE host itself is located in another VLAN.

So i actually have one physical NIC in the host and want to configure three different VLANs for TrueNAS SCALE, OPNsense-LAN and OPNsense-WAN.

Can anybody tell what the best way is to realize this scenario?

Thank you!!

Best regards,
AMIGAmann
 

AMiGAmann

Contributor
Joined
Jun 4, 2015
Messages
106
Yes, the switch supports VLANs.

Currently the TrueNAS SCALE host has two physical nics, only one connected to a switch. The switch port is configured to send untagged frames for the VLAN TrueNAS SCALE is located in.

I would like to prepare a link aggregation (without using it yet) and setup 3 VLANs as described before.

I guess the following should be the way to go:
- remove static ip address from interface used so far
- create interface of type "Link Aggregration" and add the two interfaces of the physical nics
- create 3 interfaces of type VLAN for the desired VLANs and add the lagg as parent of each interface
- create 3 interfaces of type "Bridge" and add 1 interface of type VLAN (created before) to each bridge
- configure static ip for the bridge of the VLAN TrueNAS SCALE is located in (default route stays untouched)
- attach 2 nics in OPNsense virtual machine to the 2 bridges left for the desired VLANs
- configure manual ip addresses in OPNsense virtual machine for the two interfaces, set each ip address of existing router as default gateway
- configure switch port to handle tagged frames for all 3 VLANs

Is that the way to go or do you recommend another way?

Thanks,
AMiGAmann
 
Last edited:
Top