2.3k views

Suppose computers $A$ and $B$ have $IP$ addresses $10.105.1.113$ and $10.105.1.91$ respectively and they both use same netmask $N$. Which of the values of $N$ given below should not be used if $A$ and $B$ should belong to the same network?

1. $255.255.255.0$
2. $255.255.255.128$
3. $255.255.255.192$
4. $255.255.255.224$
edited | 2.3k views

When we perform $AND$ operation between $IP$ address $10.105.1.113$ and $255.255.255.224$ result is  $10.105.1.96$

When we perform $AND$ operation between $IP$ address  $10.105.1.91$ and $255.255.255.224$ result is $10.105.1.64$

$10.105.1.96$ and $10.105.1.64$ are different network so $D$ is correct answer.

edited
0
The question says which of the values of N given below should not be used if A and B should belong to the same network. According to option 4 A and B do not belong to same network hence the option should not be considered only. If i choose answer as A where least numbers of bits are used to represent subnet mask. While in option B and C more nos of bits are used in Subnet mask. Hence answer should be A why D is selected as an option?

Method-

128  64  32  16  8  4  2  1

0     1   1    1   0  0  0  1  --- (113 last octet of first address)

0     1    0   1   1  0   1  1  ----(91 last octet of second address)

Now, first MSB and second bit matching but 3rd bit is different.

so , we need 3  continos one's in mask, for different network.

@Arjun Sir please check , this method is also right or not?
0
Good method
0
I apply the same...right method...

The last octets of IP addresses of A and B

A:113 (01110001) and

B: 91 (01011011).

The netmask in option (D) has first three bits are 111  in last octet. If netmask has first 3 bits set, then these bits must be same in A and B, but that is not the case. we can say option (D) is not a valid netmask because doing binary ‘&’ of it with addresses of A and B doesn’t give the same network address. It must be same address as A and B are on same network.

0
good explanation.

1
2