05-16-2021 10:43 PM
I want to know how a PC determines whether another PC is on same subnet or not
as i have been taught a PC applies its own Subnet mask to the IP address and determines its network portion.
But please Consider the Below Question for answering
PC1 : 10.1.1.1 /24 Mask
PC2 : 10.1.1.2 /16 Mask
Now if PC1 applies its network mask to PC2s IP address will it think that they are on the same network
Can Anyone Please Explain me with this Example.
Solved! Go to Solution.
05-17-2021 01:20 AM
Hello @ojasdillikar4794214 ,
the two devices in your example are in overlapping IP subnets.
PC1 : 10.1.1.1 /24 Mask
PC2 : 10.1.1.2 /16 Mask
10.1.1.0/24 is a subnet of 10.1.0.0/16
Both will think that the other host is in the same subnet as it is and to resolve the MAC address of the other host they will use ARP.
The two devices may be able to talk even if the subnet mask is different as ARP request are sent to FFFF.FFFF.FFFF broadcast destination.
Now let's suppose that these two devices are connected to a switch and a router R1 connects to a third port in same VLAN.
R1 has IP 10.1.1.254/24
R1 has another interface in another VLAN with IP 10.1.2.254/24.
PC1 if configured with def gW 10.1.1.254 will be able to send packets to an host in 10.1.2.0/24
PC2 will try to ARP to resolve each host in 10.1.2.X thinking they are in the same subnet,
Now depending on R1 configuration R1 can help PC2 by answering an ARP request for 10.1.2.X with the MAC address of its interface with IP address 10.1.1.254.
This feauture is called Proxy ARP and from a security point of view is recommended to disable it.
Hope to help
Giuseppe
05-17-2021 05:40 AM
By default it will fail because each device thinks the other is local, see Giuseppe's example below and by all means come back if you still have questions.
Jon
05-17-2021 01:13 AM
Your understanding is correct.
Both PCs will think each is in the same subnet even though they are using a different subnet mask and if they were in the same vlan they would be able to communicate.
Jon
05-17-2021 04:37 AM
05-17-2021 05:40 AM
By default it will fail because each device thinks the other is local, see Giuseppe's example below and by all means come back if you still have questions.
Jon
05-17-2021 01:20 AM
Hello @ojasdillikar4794214 ,
the two devices in your example are in overlapping IP subnets.
PC1 : 10.1.1.1 /24 Mask
PC2 : 10.1.1.2 /16 Mask
10.1.1.0/24 is a subnet of 10.1.0.0/16
Both will think that the other host is in the same subnet as it is and to resolve the MAC address of the other host they will use ARP.
The two devices may be able to talk even if the subnet mask is different as ARP request are sent to FFFF.FFFF.FFFF broadcast destination.
Now let's suppose that these two devices are connected to a switch and a router R1 connects to a third port in same VLAN.
R1 has IP 10.1.1.254/24
R1 has another interface in another VLAN with IP 10.1.2.254/24.
PC1 if configured with def gW 10.1.1.254 will be able to send packets to an host in 10.1.2.0/24
PC2 will try to ARP to resolve each host in 10.1.2.X thinking they are in the same subnet,
Now depending on R1 configuration R1 can help PC2 by answering an ARP request for 10.1.2.X with the MAC address of its interface with IP address 10.1.1.254.
This feauture is called Proxy ARP and from a security point of view is recommended to disable it.
Hope to help
Giuseppe
05-17-2021 08:06 AM
Thanks a lot , You explained it Really well . Happy that you made me understand it well ☺
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide