cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
967
Views
0
Helpful
3
Replies

Subnetting Issue

kishorecisco
Level 1
Level 1

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.

1 Accepted Solution

Accepted Solutions

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.

Don't forget to rate helpful posts.

View solution in original post

3 Replies 3

cadet alain
VIP Alumni
VIP Alumni

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.

Don't forget to rate helpful posts.

Hi  Cadet can you explain how does that AND operation happens.

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.

Don't forget to rate helpful posts.