Log In
25 votes

Suppose computers $A$ and $B$ have $IP$ addresses $$ and $$ 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. $$
  2. $$
  3. $$
  4. $$
in Computer Networks
edited by

4 Answers

36 votes
Best answer

D is correct answer because:

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

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

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

edited by
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?
14 votes


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.
So mask will be

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

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. 

good explanation.
0 votes

To solve these kind of questions, first approach should be finding network ID

Now given all the subnet masks, try to calculate Network ID for both the IP addresses and you will find out that

last octet of both the IP addresses are 113 and 91 respectively

With 224 in the last octet of Subnet mask, we are not able to get same Network ID as

113 is 01101111 and

  91 is 01011011 

with 0 mask we get 0 as network id

with 128 we get 0 as network id

with 192 we get 64 as network id

but with 224 we get different network ids

Hence option with 224 in the last octet is the correct answer.




Related questions

15 votes
5 answers
One of the header fields in an IP datagram is the Time-to-Live (TTL) field. Which of the following statements best explains the need for this field? It can be used to prioritize packets. It can be used to reduce delays. It can be used to optimize throughput. It can be used to prevent packet looping.
asked Sep 29, 2014 in Computer Networks jothee 3.6k views
9 votes
5 answers
$25$ persons are in a room. $15$ of them play hockey, $17$ of them play football and $10$ of them play both hockey and football. Then the number of persons playing neither hockey nor football is: $2$ $17$ $13$ $3$
asked Sep 30, 2014 in Numerical Ability jothee 3.4k views
5 votes
2 answers
Choose the most appropriate word from the options given below to complete the following sentence: If we manage to __________ our natural resources, we would leave a better planet for our children. uphold restrain cherish conserve
asked Sep 30, 2014 in Verbal Ability jothee 1.6k views
28 votes
2 answers
Which of the following statements are true? Shortest remaining time first scheduling may cause starvation Preemptive scheduling may cause starvation Round robin is better than FCFS in terms of response time I only I and III only II and III only I, II and III
asked Sep 29, 2014 in Operating System jothee 6.1k views