The Gateway to Computer Science Excellence
First time here? Checkout the FAQ!
x
+18 votes
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$
asked in Computer Networks by Veteran (107k points)
edited by | 2.3k views

3 Answers

+33 votes
Best answer

D is correct answer because:

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.

answered by (341 points)
edited by
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?
+9 votes
ANSWER : OPTION D
 

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

@Arjun Sir please check , this method is also right or not?
answered by Active (3.2k points)
0
Good method
0
I apply the same...right method...
+3 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. 

answered by Junior (795 points)
0
good explanation.
Answer:

Related questions



Quick search syntax
tags tag:apple
author user:martin
title title:apple
content content:apple
exclude -tag:apple
force match +apple
views views:100
score score:10
answers answers:2
is accepted isaccepted:true
is closed isclosed:true

42,685 questions
48,650 answers
156,447 comments
63,961 users