02-02-2017 06:44 AM - edited 03-08-2019 09:09 AM
Hello Guys,
I am very new in networking, I was just practicing in packet tracer from the most basic stuff in networking and testing some behaviors to understand better the concepts.
And I created a simple topology: PC1-------SW------PC 2,
I went to PC1 and statically assigned IP address 192.168.10.2 255.255.255.0, and PC2 192.168.10.3 255.255.0.0.
You can see that one of them is /24 and the other one /16, I tried to ping these 2 PCs and this was succesful.
Why the subnet mask is not taken into account in this comunication ??
I also added a router and put in both PCs a DG: 192.168.10.1, and they both could ping to their default gateway. this was the topology:
ROUTER
[
]
PC1 ------ SW--------------PC2
So I am a little bit confused about why 2 addresses in the same subnet but with different subnet mask can comunicate with no inconvenience.
02-02-2017 05:42 PM
Hi,
A pc uses the subnet mask to determine which network it belongs to.If it determines that an ip address is on the same network, it will arp for the host. If it determines the ip address is remote, it will arp for the default gateway. If you look at the ip addresses carefully, you will see that they are on the same network. 192.168.10.2 255.255.255.0 is on network 192.168.10.0/24, host range 192.168.10.1 - 192.168.10.254. 192.168.10.3 255.255.0.0 is on network 192.168.0.0/16, host range 192.168.0.1 - 192.168.255.254. As you can see, your ip addresses are covered by both ranges. When host 192.168.10.2 talks to host 192.168.10.3, it determines that they are both on the same network and it will arp for 192.168.10.3. Likewise, 192.168.10.3 determines 192.168.10.2 is on the same network.
Thanks
John
02-05-2017 01:28 AM
Hello
As john states the subnet mask IS used , but as thse tow host are within the same range as ech other then communication will be allowed.
If you changed one of the pcs addressing to say .6 with a mask of 255.255.255.252 then you will find the above is then not the case on the two hosts will not be able to communicate
res
Paul
01-24-2023 04:16 AM
if i have 195.251.109.10/24 and another network 195.251.109.10/25 to the same device. that specific ip can they work seperate? cause its the same excaclty ip but different subnet. i know that is two seperate domains, but how they work together in one device (router).
01-24-2023 08:13 AM
On same router, I wouldn't expect it to accept those two IPs because 1) as you note, they are same IP and/or 2) their networks overlap.
If router did accept those IPs, would expect operational issues.
BTW, above assumes VRFs or virtual routers, etc., NOT involved.
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