10-25-2012 09:50 PM - edited 03-04-2019 05:58 PM
hi, I have two Pc's connected together. PC1 i configured 10.1.1.1/8 address and PC2 with 10.1.1.10/16 address. I feel it should not ping between this two systems because though the IP address may be same but the subnetmask is different. But it pings how can this ping.
Solved! Go to Solution.
10-26-2012 02:43 AM
Hi,
of course.
1) IP addresses and netmasks are all 32 bits binary values so
10.1.1.1/8= 10.1.1.1 255.0.0.0
10.1.1.1= 0000101000000010000000100000001
255.0.0.0= 11111111000000000000000000000000
boolean AND is, T meaning True or 1 and F meaning False or 0
T AND T= T
T AND F= F
F AND T=F
F AND F= F
so if we do the bitwise AND between the IP address and the mask we get:
00001010000000000000000000000000 which is 10.0.0.0
The same operation is done on the destination address.
Regards.
Alain
Don't forget to rate helpful posts.
10-25-2012 11:19 PM
Hi,
pc1 does a logical AND between its address and its subnet mask and finds it is in the 10.0.0.0 network,
now it does the same for the destination address with its mask and finds that destination is in 10.0.0.0 network.
So it will send arp request for 10.1.1.10 and 10.1.1.10 will reply with its MAC.
Now Pc2 must send a echo-reply back to PC1 which sent an echo-request: it does the same logic as PC1 and finds out it is in the 10.1.0.0 network and that PC2 too so it can reply back.
Regards.
Alain
Don't forget to rate helpful posts.
10-26-2012 01:48 AM
Hi Cadet can you explain how does that AND operation happens.
10-26-2012 02:43 AM
Hi,
of course.
1) IP addresses and netmasks are all 32 bits binary values so
10.1.1.1/8= 10.1.1.1 255.0.0.0
10.1.1.1= 0000101000000010000000100000001
255.0.0.0= 11111111000000000000000000000000
boolean AND is, T meaning True or 1 and F meaning False or 0
T AND T= T
T AND F= F
F AND T=F
F AND F= F
so if we do the bitwise AND between the IP address and the mask we get:
00001010000000000000000000000000 which is 10.0.0.0
The same operation is done on the destination address.
Regards.
Alain
Don't forget to rate helpful posts.
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