Connect to PLC on different subnet (STAIC IP) than interface IP (DHCP)
-
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
-
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?
-
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.
-
@johnpoz Clicked on the wrong reply button. Thank you for the answer, my reply to your answer is in the thread.
-
@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.
-
@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.