Cant find Switch on OPNSense

Started by cg50000OPN, February 15, 2023, 08:47:41 PM

Previous topic - Next topic
Hey guys,

I have OPNSense router firewall as 192.168.1.1. Latest build installed today at 12:30PM MST. (note this issue below was happening with the prior build as well, so don't think this is related to the new build)

I bought a new TP-LINK TL-SG3210XHP-M2 switch, and before connecting it to OPNSense, configured its IP to a static IP of 192.168.1.20, so it would not get its IP from DHCP. I was able to connect to it fine from a laptop, login to the admin GUI, etc.

Once I connected it to OPNSense, I was no longer able to log into it at that IP. The device isn't being found.

However, all of the clients connected to the switch are getting internet just fine. Traffic is moving through the switch.

Is there a setting in OPNSense I need to change to be able to access the switch?

Thanks!

Traffic from clients with a 192.168.1.x address to 192.168.1.20 does not pass through you OPNsense at all.

Assuming that you did not change the /24 (aka 255.255.255.0) netmask/prefix-length on your OPNsense and you setup your switch with a static address and the same netmask.

You can check your OPNsense LAN interface settings and the DHCPv4 settings. You can check the netmask on your PC, too - ipconfig on Windows, ifconfig on a Mac.

If that looks good, can you ping 192.168.1.20?

If you can't look in OPNsense, Services > DHCPv4 > Leases - possibly in the presence of a DHCP server the switch asked for a dynamic address despite the fact that you thought you configured it statically. Possibly you can find a öease for the switch there.

If you can't, does the switch have a console port?

If it doesn't, perform a factory reset (regularly poking some tiny hole in the chassi with a paper clip while powering on or some such - consult the switch manual) and do let it get a dynamic address from DHCP this time. Then look in the OPNsense for the lease again and assign a static address of 192.168.1.20 in OPnsense.

That's the order i. which I would go about the problem.
Deciso DEC750
People who think they know everything are a great annoyance to those of us who do. (Isaac Asimov)

I found it thanks to your guidance around looking at the leases! You were right, the router assigned it a new IP despite that I had set a static IP. It was listed under the leases by model number which gave it away. ;)
Thanks so much! :)

February 15, 2023, 09:52:36 PM #3 Last Edit: February 15, 2023, 09:58:59 PM by cg50000OPN
Ok so now that I found it, how can I permanently assign the switch an IP so I can access it at same place each time? Is that a setting in OPNSense or switch?

(I am assuming it will get a new IP address (say, if I ever needed to reboot it) since Its now DHCP and not static?)

Thanks!

In OPNsense at the "Leases" page, there's a small "+" to the right. Use that to assign a fixed IP address.

Fixed assignments must not be part of the dynamic pool. By default the pool is .100-.199 if I remember correctly, so assigning .20 is safe.
Deciso DEC750
People who think they know everything are a great annoyance to those of us who do. (Isaac Asimov)

You are awesome, thank you SO much! :)

So, I was able to use the + and add the switch under the IP I stated. However, it was already added under its own dynamic IP and was working well. After OPNSense appliance reboot, it came back under that same IP address and its still working.

The issue is now I have that switch listed twice under the leases, and I cant seem to be able to delete the one I set with the static Ip. There isn't a delete icon next to it?

Those are DNS servers. You're on the wrong page.


You need to reboot the switch to have it get its new static address.
Deciso DEC750
People who think they know everything are a great annoyance to those of us who do. (Isaac Asimov)

@pmhausen You helped get the problem fixed. 

Quote from: pmhausen on February 15, 2023, 10:05:02 PMFixed assignments must not be part of the dynamic pool.

Although I think this is good advice.  Its not a must.  You can technically static map (DHCP reservations) ip addresses that are in a pool.  I do it all the time.  I only started using OPNsense from 22.1.  So maybe older software wasn't allowed.  not sure.