LAN has no internet when opsense is connected to switch

Started by ofelipedbzgt, February 26, 2025, 12:33:59 AM

Previous topic - Next topic
Hello, everyone! I've decided to move from my haweii ax2s router to opnsense but I'm having some problems.

Installation went smoothly, I'm connecting to my isp via pppoe. My modem is on bridge mode and I have the opnsense machine connected to it via a pcie network adapter and the motherboard native ethernet port. I have internet on the machine and can ping external IPs no problem.

The problem starts when I plug my LAN connector to my switch, nothing works even though the opnsense machine has a working internet connection. The weird part is that when I connect opnsense directly to my PC, it has internet connection. Again, when I connect to the switch it stops working.

My switch is passive and I have 6 other devices connected to it. My past router had a subnet of 192.168.3.0/24, but now opnsense is on 192.168.1.0/24, could this be the culprit? How do I troubleshoot this?

Another problem that I had was when trying to setup opnsense with the same old subnet of 192.168.3.0/24. After the setup wizard is done, I can't connect to the machine at all on the new ip. The gui says the site is not reachable.

I haven't changed anything inside opnsense, I just ran the setup wizard.

I'm not tech savy and I'm starting with opnsense to learn and because I like to mess around things. Any guidance on sources to learn more about networking is very welcome.

February 26, 2025, 10:16:07 AM #1 Last Edit: February 26, 2025, 10:20:37 AM by meyergru
The reason this is not working for you is that your LAN devices are connected to the switch and have been assigned IPs from the 192.168.3.0/24 range by your old router. Unless you reconnect them physically or wait until they refresh their DHCP-assigned IPs (which could be days), they will not change their IPs.

That is also the reason why a directly-connected PC will work: by reconnecting it, you force a DHCP renewal.

Simply assign 192.168.3.1/24 for OpnSense LAN as well, then all of your devices are in the correct range. I assume that 192.168.3.1 was the IP old your old router. Be aware that the directly-connected PC you are doing this from will then lose its connection until you reconnect it physically and get a new IP from the new 192.168.3.0/24 range.

You could also reconnect all devices, but if some of them are statically configured, a reconnect will not help, because they stay at 192.168.3.0/24 and also keep their old gateway, 192.168.3.1.
Intel N100, 4 x I226-V, 16 GByte, 256 GByte NVME, ZTE F6005

1100 down / 770 up, Bufferbloat A

Thank you very much for the clear explanation. I'm sorry because it seems more like a network related question than an opnsense one, I should've known better.

I think I may have skipped some steps as it is feeling too advanced for me at the moment. I'll go back and study more about networking before using opnsense.

Cheers