in Computer Networks recategorized by
471 views
1 vote
1 vote

Suppose the $\text{IP}$ addresses of $\text{A}$ and $\text{B}$ are $10.105.1.113$ and $10.105.1.91,$ respectively. They both use the same netmask $\mathrm{N}$. Which of the following values of $\mathrm{N}$ given below should not be used if $\text{A}$ and $\text{B}$ should belong to the same network, and why?

  1. $255.255 .255 .0$
  2. $255.255 .255 .128$
  3. $255.255 .255 .192$
  4. $255.255 .255 .224$
in Computer Networks recategorized by
by
471 views

1 Answer

1 vote
1 vote

Answer is $\mathrm{Option}$ $\mathrm{D}$

We know that if we AND netmask with IP address we get the Network ID

A. $10.105.1.113$ AND $255.255.255.0$ = $10.105.1.0$

    $10.105.1.91$ AND $255.255.255.0$ = $10.105.1.0$

So, both have the same NetID hence they belong to the same network 

B. $10.105.1.$$0111$ $0001$ AND $255.255.255.10000000$ = $10.105.1.0$

    $10.105.1.$$0101$ $0011$ AND $255.255.255.10000000$ = $10.105.1.0$

So, both have the same NetID hence they belong to the same network 

C. $10.105.1.$$0111$ $0001$ AND $255.255.255.11000000$ = $10.105.1.64$

    $10.105.1.$$0101$ $0011$ AND $255.255.255.11000000$ = $10.105.1.64$

So, both have the same NetID hence they belong to the same network 

D. $10.105.1.$$0111$ $0001$ AND $255.255.255.11100000$ = $10.105.1.96$

    $10.105.1.$$0101$ $0011$ AND $255.255.255.11100000$ = $10.105.1.64$

So, both have the different NetID hence they belong to different network hence ,this cannot be used

Similar question : https://gateoverflow.in/2349/gate-cse-2010-question-47

They just copied the gate 2010 question

Related questions