• edited by
22,836 views
57 57 votes

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$

8 Answers

Best answer
59 59 votes

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.

• edited by
22 22 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?
11 11 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. 

1 1 vote

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.

 

 

0 0 votes

The obvious method might be to AND the given IP's with the mask and check if they give the same result or not, this is good but not the fastest way to go around...

First we can make some observations regarding the given two IP's: 10.105.1.113 and 10.105.1.91

Clearly the first three octets are same so any netmask $\leq{}/24$ will consider them on the same network. Now we only need to check the masks:

A. 255.255.255.0 = \24

B. 255.255.255.128 = \25

C. 255.255.255.192 = \26

D. 255.255.255.224 = \27

1 is clearly not the correct option, for the rest of the options we need only check at maximum the first 3 bits of the last octet to confirm if they are part of the network:
113 = 0111 0001

91  =  0101 1011
Clearly upto the 2nd bit they match so we any netmask greater than 24+2 = 26 will not consider them in the same network, making D the answer. 
.  
 

Answer:
Position:
Show:

Related questions

33 33 votes
8 answers 8 answers
13.3k
13.3k views
go_editor asked Sep 29, 2014
13,301 views
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 prio...
20 20 votes
5 answers 5 answers
10.6k
10.6k views
go_editor asked Sep 30, 2014
10,614 views
$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 neithe...
10 10 votes
2 answers 2 answers
7.5k
7.5k views
go_editor asked Sep 30, 2014
7,526 views
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...
62 62 votes
4 answers 4 answers
30.2k
30.2k views
go_editor asked Sep 29, 2014
30,238 views
Which of the following statements are true?Shortest remaining time first scheduling may cause starvationPreemptive scheduling may cause starvationRound robin is better th...