Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

    Connect to PLC on different subnet (STAIC IP) than interface IP (DHCP)

    Scheduled Pinned Locked Moved Routing and Multi WAN
    6 Posts 2 Posters 587 Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • T
      timber988
      last edited by

      INTERFACE IP: 10.10.1.1/24
      PLC IP: 192.168.1.5 (STAIC IP)
      (the PLC is connected to the interface port via a switch)

      I am not getting a ping response from the PLC when connected to the 10.10.1.0/24 network (firewall rules have been added). I guess some kind of route to 192.168.1.0/24 is needed, but there is no router on the 192.168.1.0/24 network (only static IPs that can not be changed).

      I have searched the web for answers, but probably used the wrong terminology.. would appreciate any guidance in the right direction. Thanks

      johnpozJ 1 Reply Last reply Reply Quote 0
      • johnpozJ
        johnpoz LAYER 8 Global Moderator @timber988
        last edited by johnpoz

        If your network is 10.10.1.0/24

        And you have PLCs on this network then they should also be on the 10.10.1/24 network.

        If they are on a different network, then there should be a router - there has to be if you want to talk to network X from network Y.

        If you can not change your PLCs to be on a different network then 192.168.1.0, can you not set a gateway on them? And just put an interface on pfsense say 192.168.1.1 so you can route?

        Or change your PCs to also use the 192.168.1/24 network vs the 10.10.1 network

        Please draw up your network.. Is the 192.168.1 network a different L2 then your 10.10.1 network - or is everything just connected to a dumb switch? (does not understand vlans) or are their multiple physical switches?

        If this a single L2 network (everything connected to dumb switch(es) that are connected together. Then Why can you not just use 192.168.1 network for all devices on this network?

        An intelligent man is sometimes forced to be drunk to spend time with his fools
        If you get confused: Listen to the Music Play
        Please don't Chat/PM me for help, unless mod related
        SG-4860 24.11 | Lab VMs 2.8, 24.11

        T 1 Reply Last reply Reply Quote 1
        • T
          timber988
          last edited by

          Thank you for the through reply.

          I added an interface PLC_LAN 192.168.1/24 and connected it to the dumb switch like this:
          PFSENSE -> PLC_LAN (192.168.1/24) -> DUMB SWITCH -> [the PLC with static IP]

          When I connect my laptop to the PLC_LAN I can now connect to the PLCs:
          PFSENSE -> PLC_LAN (192.168.1/24) -> DUMB SWITCH -> laptop (192.168.1.101)

          But when I connect my PC to the LAN interface (10.10.1/24), I can not connect to the PLC.
          PFSENSE -> LAN (10.10.1/24) -> laptop (10.10.1.102)

          I have added firewall rules. I am able to ping 192.168.1.1, but not PLC with static IP at 192.168.1.5.

          Seems like I am missing the final piece.

          johnpozJ 1 Reply Last reply Reply Quote 0
          • T
            timber988 @johnpoz
            last edited by

            @johnpoz Clicked on the wrong reply button. Thank you for the answer, my reply to your answer is in the thread.

            1 Reply Last reply Reply Quote 0
            • johnpozJ
              johnpoz LAYER 8 Global Moderator @timber988
              last edited by johnpoz

              @timber988 said in Connect to PLC on different subnet (STAIC IP) than interface IP (DHCP):

              Seems like I am missing the final piece.

              Do you have "gateway" set on the PLC? This would be pfsense IP address on the plc_lan interface.

              Its not possible for a device to answer something from a network other then its local network without a default gateway, or route telling it who to send the answer to that knows how to get back to that other than its local network address.

              There is no rules needed on the plc_lan interface.. Rules to allow access from your lan to the plc_lan would be on the lan interface, and by default this is any any..

              BTW - these are different dumb switches that are on your lan and your plc_lan right?? Connecting both lan and plc_lan interfaces into the same dumb switch is not a good idea!! Your not actually isolating anything if you do it that way.

              I have added firewall rules

              What rules - again the default any any rule on your lan would allow you to talk to any other network/vlan connected to pfsense. No extra rules would be needed.

              An intelligent man is sometimes forced to be drunk to spend time with his fools
              If you get confused: Listen to the Music Play
              Please don't Chat/PM me for help, unless mod related
              SG-4860 24.11 | Lab VMs 2.8, 24.11

              T 1 Reply Last reply Reply Quote 1
              • T
                timber988 @johnpoz
                last edited by

                @johnpoz Thank you for your swift replies. I was able to fix it the same day, even my reply is late.

                (Yes the switches are different. They are not connected to each other.)

                The problem was, as you mentioned, that the PLC gateway was not set.
                Thanks again.

                1 Reply Last reply Reply Quote 0
                • First post
                  Last post
                Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.