OPNsense Forum

English Forums => General Discussion => Topic started by: blazedragon on August 07, 2023, 06:47:13 AM

Title: Switch not working with opnsense router
Post by: blazedragon on August 07, 2023, 06:47:13 AM
Hi guys,

opnsense noob here, bought a 4 i226 nic from aliexpress to upgrade my home router. installed opnsense on it without any issues. I have my isp modem in bridge mode and connected to the wan port of opnsense box, internet works fine. my desktop is directly connected to the opnsense box via port opt2, can access internet. the switch (TL-SG108PE) is connected via port opt1. the switch setup is correctly (checked by directly connecting laptop to it, correct gateway, correct subnet mask, and set as a static ip that does not have a conflict. the ports opt1, opt2 and LAN are all in a bridge interface opt3.  when the switch is plugged into the opt1 port, my desktop cannot ping/connect to it. the opnsense router can ping the switch through the webgui.

I put up a firewall rule to allow all traffic in opt3 any source and destination, but that did not resolve the issue.

what am i doing wrong here?
Title: Re: Switch not working with opnsense router
Post by: meyergru on August 07, 2023, 07:35:55 AM
Did you follow https://docs.opnsense.org/manual/how-tos/lan_bridge.html, especially step 6?

You should assign LAN to your bridge interface opt3, because you already have all the neccessary rules for that already, i.e. LAN (opt3) bridges opt1 & opt2, not opt3 bridging LAN, opt1 & opt2.
Title: Re: Switch not working with opnsense router
Post by: blazedragon on August 07, 2023, 08:00:49 AM
opt3 is not a port but the bridge interface itself. opt3 has LAN, OPT1 and OPT2 interfaces as members, LAN is port igc1, OPT1 is port igc2, and OPT2 is port igc3. Does this sound correct to you?
Title: Re: Switch not working with opnsense router
Post by: blazedragon on August 07, 2023, 08:27:02 AM
I believe I figured it out.

I had to create rules not only on the bridge interface but also on all the port interfaces separately as well to allow traffic from the bridge.

In my case, as I changed the assignment of my LAN to bridge 0 interface and added opt1 opt2 and opt3 (3 ports) as members.
I had to create a rule to allow traffic on opt1 opt2 and opt3 from source LAN net.

now I can ping and access the switch form my desktop.

Thanks!
Title: Re: Switch not working with opnsense router
Post by: Patrick M. Hausen on August 07, 2023, 08:39:45 AM
This hints at the tunables not being set correctly. It should not be necessary. As mentioned by @meyergru, check step 6 of the LAN bridge documentation.
Title: Re: Switch not working with opnsense router
Post by: blazedragon on August 07, 2023, 08:47:05 AM
Quote from: Patrick M. Hausen on August 07, 2023, 08:39:45 AM
This hints at the tunables not being set correctly. It should not be necessary. As mentioned by @meyergru, check step 6 of the LAN bridge documentation.

This was correct!
Thanks, that fixed it. changed the values of the tunables as mentioned and removed the rules on the separate ports, and it works!

appreciate it.