Cannot Connect To Network Switch From LAN

Started by run('Jimbo');, October 26, 2024, 03:58:27 PM

Previous topic - Next topic

Hi can some one help me with connecting to my network switch from lan please...

Setup is as follows...

Interface LAN        (igb0); 10.34.1.0/24
Interface SWITCH  (igb1); 10.34.2.0/24 -> NETGEAR MANAGED SWITCH static 10.34.1.50

My problem is I cannot connect to the netgear switch from my lan port..

If I ping it from my lan port I get...

Pinging 10.34.1.50 with 32 bytes of data:
Reply from 10.34.1.102: Destination host unreachable.

For some reason it returns my pc ip on the lan...

Any Ideas?

Thanks :)
Jimbo.

    OPNsense 24.7.7
------------------------

Does the switch have a gateway setting? And if, is the switch interface IP set correctly?

If it is missing a gateway setting, you can get access with an outbound NAT rule for masquerading the source address.

The netgear switch gateway is set to 10.34.1.1

I am able to ping everything else on the switch just not the switch itself...

Thanks
Jimbo.

    OPNsense 24.7.7
------------------------

So the switch has an IP in the LAN subnet from the OPNsense DHCP?
But you cannot access it from other LAN devices?

No the switch is static but is in the same subnet as LAN...

Thanks
Jimbo.

    OPNsense 24.7.7
------------------------

So this is somewhat unclear:
QuoteInterface LAN        (igb0); 10.34.1.0/24
Interface SWITCH  (igb1); 10.34.2.0/24 -> NETGEAR MANAGED SWITCH static 10.34.1.50

You have a LAN and a SWITCH subnet. However, the switch has an IP in the LAN subnet?

Yes.

I want to access the switch from igb0...

Thanks
Jimbo.

    OPNsense 24.7.7
------------------------

You need to allow the LAN/SWITCH access in the Firewall Rules both ways.

I thaught that but the lan is allow all by default and I tried allow all on the switch interface but still not working...


Thanks
Jimbo.

    OPNsense 24.7.7
------------------------

Quote from: viragomann on October 26, 2024, 06:09:09 PM
So this is somewhat unclear:
QuoteInterface LAN        (igb0); 10.34.1.0/24
Interface SWITCH  (igb1); 10.34.2.0/24 -> NETGEAR MANAGED SWITCH static 10.34.1.50

You have a LAN and a SWITCH subnet. However, the switch has an IP in the LAN subnet?

Why isn't the switch connected to the NIC igb0 that has the correct subnet?
Connecting it to another NIC with an IP that's not in the corresponding subnet is not helping...

October 26, 2024, 08:10:18 PM #10 Last Edit: October 26, 2024, 08:15:19 PM by run('Jimbo');
I want to separate my vlans and switch from igb0 because it's allow all by default. If I move over to igb1 I can block all on igb1 and ony allow what is needed on the vlan interfaces...

LAN should have access to all regardless???

Thanks
Jimbo.

    OPNsense 24.7.7
------------------------

So connect the switch to igb1 or which subnet you want and set it a proper IP and gateway.

I'll have a play with it and get back to you.

Thanks
Jimbo.

    OPNsense 24.7.7
------------------------

Well, I feel a little silly  :)

I have put the switch on the same subnet/gateway as igb1 interface and all is well for now!

Thanks
Jimbo.

    OPNsense 24.7.7
------------------------

FWIW, you don't seem to have VLANs at this point.
You're getting physical isolation from physically separate networks.
In a simple VLAN setup, your network infrastructure would be flat (1 subnet) and you'd use VLANs for logical segmentation/isolation.