OPNsense
  • Home
  • Help
  • Search
  • Login
  • Register

  • OPNsense Forum »
  • English Forums »
  • General Discussion »
  • Cannot Connect To Network Switch From LAN
« previous next »
  • Print
Pages: [1] 2

Author Topic: Cannot Connect To Network Switch From LAN  (Read 611 times)

run('Jimbo');

  • Newbie
  • *
  • Posts: 21
  • Karma: 0
    • View Profile
Cannot Connect To Network Switch From LAN
« on: October 26, 2024, 03:58:27 pm »

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 :)
Logged
Jimbo.

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

viragomann

  • Full Member
  • ***
  • Posts: 230
  • Karma: 7
    • View Profile
Re: Cannot Connect To Network Switch From LAN
« Reply #1 on: October 26, 2024, 05:32:12 pm »
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.
 
Logged

run('Jimbo');

  • Newbie
  • *
  • Posts: 21
  • Karma: 0
    • View Profile
Re: Cannot Connect To Network Switch From LAN
« Reply #2 on: October 26, 2024, 05:41:31 pm »
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
Logged
Jimbo.

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

viragomann

  • Full Member
  • ***
  • Posts: 230
  • Karma: 7
    • View Profile
Re: Cannot Connect To Network Switch From LAN
« Reply #3 on: October 26, 2024, 05:54:31 pm »
So the switch has an IP in the LAN subnet from the OPNsense DHCP?
But you cannot access it from other LAN devices?
Logged

run('Jimbo');

  • Newbie
  • *
  • Posts: 21
  • Karma: 0
    • View Profile
Re: Cannot Connect To Network Switch From LAN
« Reply #4 on: October 26, 2024, 05:59:33 pm »
No the switch is static but is in the same subnet as LAN...

Thanks
Logged
Jimbo.

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

viragomann

  • Full Member
  • ***
  • Posts: 230
  • Karma: 7
    • View Profile
Re: Cannot Connect To Network Switch From LAN
« Reply #5 on: October 26, 2024, 06:09:09 pm »
So this is somewhat unclear:
Quote
Interface 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?
Logged

run('Jimbo');

  • Newbie
  • *
  • Posts: 21
  • Karma: 0
    • View Profile
Re: Cannot Connect To Network Switch From LAN
« Reply #6 on: October 26, 2024, 06:27:11 pm »
Yes.

I want to access the switch from igb0...

Thanks
Logged
Jimbo.

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

lilsense

  • Hero Member
  • *****
  • Posts: 600
  • Karma: 19
    • View Profile
Re: Cannot Connect To Network Switch From LAN
« Reply #7 on: October 26, 2024, 06:48:51 pm »
You need to allow the LAN/SWITCH access in the Firewall Rules both ways.
Logged

run('Jimbo');

  • Newbie
  • *
  • Posts: 21
  • Karma: 0
    • View Profile
Re: Cannot Connect To Network Switch From LAN
« Reply #8 on: October 26, 2024, 06:51:34 pm »
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
Logged
Jimbo.

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

EricPerl

  • Full Member
  • ***
  • Posts: 109
  • Karma: 4
    • View Profile
Re: Cannot Connect To Network Switch From LAN
« Reply #9 on: October 26, 2024, 07:41:51 pm »
Quote from: viragomann on October 26, 2024, 06:09:09 pm
So this is somewhat unclear:
Quote
Interface 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...
Logged

run('Jimbo');

  • Newbie
  • *
  • Posts: 21
  • Karma: 0
    • View Profile
Re: Cannot Connect To Network Switch From LAN
« Reply #10 on: October 26, 2024, 08:10:18 pm »
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
« Last Edit: October 26, 2024, 08:15:19 pm by run('Jimbo'); »
Logged
Jimbo.

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

viragomann

  • Full Member
  • ***
  • Posts: 230
  • Karma: 7
    • View Profile
Re: Cannot Connect To Network Switch From LAN
« Reply #11 on: October 26, 2024, 08:17:13 pm »
So connect the switch to igb1 or which subnet you want and set it a proper IP and gateway.
Logged

run('Jimbo');

  • Newbie
  • *
  • Posts: 21
  • Karma: 0
    • View Profile
Re: Cannot Connect To Network Switch From LAN
« Reply #12 on: October 26, 2024, 08:32:52 pm »
I'll have a play with it and get back to you.

Thanks
Logged
Jimbo.

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

run('Jimbo');

  • Newbie
  • *
  • Posts: 21
  • Karma: 0
    • View Profile
Re: Cannot Connect To Network Switch From LAN
« Reply #13 on: October 26, 2024, 08:57:06 pm »
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
Logged
Jimbo.

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

EricPerl

  • Full Member
  • ***
  • Posts: 109
  • Karma: 4
    • View Profile
Re: Cannot Connect To Network Switch From LAN
« Reply #14 on: October 27, 2024, 12:52:02 am »
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.
Logged

  • Print
Pages: [1] 2
« previous next »
  • OPNsense Forum »
  • English Forums »
  • General Discussion »
  • Cannot Connect To Network Switch From LAN
 

OPNsense is an OSS project © Deciso B.V. 2015 - 2024 All rights reserved
  • SMF 2.0.19 | SMF © 2021, Simple Machines
    Privacy Policy
    | XHTML | RSS | WAP2