OPNsense Forum

Archive => 18.7 Legacy Series => Topic started by: cclloyd on December 30, 2018, 12:01:22 pm

Title: Use Extra NIC for VLAN support.
Post by: cclloyd on December 30, 2018, 12:01:22 pm
I have 2 NICs in the server I use with OPNSense (2 port/4 port).  Currently, the 2 port has my WAN interfance and LAN interface (plugged into an unmanaged switch).

Because the switch is unmanaged, it doesn't support VLAN tagging, so when the wireless router tries to use a VLAN it gets stripped away.

But can I use the 4 ports on the other NIC as extra LAN ports, so say any traffic coming from bce0 is assigned to a certain VLAN, that way I can just plug the wireless router directly into that.
Title: Re: Use Extra NIC for VLAN support.
Post by: bartjsmit on December 30, 2018, 12:31:49 pm
You can add the interface from the console (option 1), either direct or through SSH and assign a VLAN as you do so.

Does the wireless router need a VLAN?

Bart...
Title: Re: Use Extra NIC for VLAN support.
Post by: cclloyd on December 31, 2018, 12:23:03 am
Do I set it to static, IP, DHCP, etc to get it to properly connect?  (The wireless router isn't being assigned an IP from DHCP, I set it manually on the wireless router itself.
Title: Re: Use Extra NIC for VLAN support.
Post by: bartjsmit on December 31, 2018, 10:21:13 am
If you can, put the wireless router in bridge mode. That way, the wireless clients will get a DHCP lease from OPNsense and you have a SPOG for your network configuration.

If you can't, assign a separate subnet to the WiFi and to the connection between the router and the firewall. E.g.

192.168.1.0/24 WiFi -- Router -- 192.168.2.0/24 -- OPNsense -- 192.168.3.0/24 wired LAN

You need to make sure that the router has a static route for 192.168.3.0/24 via OPNsense, and that OPNsense has a static route to 192.168.1.0/24 via the Router.

Bart...

P.S. SPOG = Single Pane Of Glass
Title: Re: Use Extra NIC for VLAN support.
Post by: chemlud on December 31, 2018, 02:36:07 pm
How I use wireless routers:

- Assign it a static IP completely outside the LAN net. Disable DHCP.

- Take one of the LAN (!) ports of the wireless router and connect it to your LAN. DHCP to wireless clients will be managed by the OPNsense. Works flawlessly for years here... (Thanks to Derelict :-D)