Joseph 0028

IP/ Subnets and communication between subnets

4 posts in this topic

Lets say i have a PLC, with a name PLC1 with IP/Subnet of 10.125.34.243/255.255.255.0

I have to communicate this PLC1 with 2 other PLC's, PLC2 and PLC3

PLC2 with IP/Subnet of 10.125.34.10/255.255.0.0

PLC3 with IP/Subnet of 10.125.46.10/255.255.0.0

I imagine that, all these three are in different subnets, and so there should be no communication at all, but when i tested it, PLC1 to talking to/from PLC2 and not PLC3. 

anyone know the answer to this ? How does it talk to PLC2 with different subnet, but not PLC3 which is in different subnet as well. 

Share this post


Link to post
Share on other sites

you need to look at IP and MASK values in a BINARY format and with just few basic rules you will see why:

1. IP address is actually two addresses - Subnet address and Node address, Subnet mask tells how the 32 bits representing IP address are divided into those two addresses.2.

2. part of IP address that corresponds to Subnet address is determined by field of "1"s in subnet mask

3. part of IP address that corresponds to Node address is determined by field of "0"s in subnet mask

4. On one subnet, all nodes must have same subnet mask,  same Subnet address but unique node address

 

 

for example:

a) your example shows subnet masks that are not equal - that is wrong

b) 255.255.255.0 mask means that first three octets of IP address MUST be same among nodes. PLC 3 is not in there from PLC1 perspective. PLC2 may or may not be detected either,  since mask does not match. it depends how sloppy firmware in that device is

c) if you change subnet mask for PLC1 to 255.255.0.0 all three PLCs can talk because all above rules are met

 

 

 

1 person likes this

Share this post


Link to post
Share on other sites

Posted (edited)

Your problem is the subnet mask. With a mask of 255.255.255.0 PLC1 can only talk to other devices in the 10.125.34 subnet. If you set the mask to 255.255.0.0 like the other two PLC's it will work. You really should do a little research into how subnet masks work.

subnet tutorial

Edited by Mendon Systems
1 person likes this

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now