edited by
11,780 views
54 votes
54 votes

Host $X$ has IP address $192.168.1.97$ and is connected through two routers $R1$ and $R2$ to an­other host $Y$ with IP address $192.168.1.80$. Router $R1$ has IP addresses $192.168.1.135$ and $192.168.1.110$. $R2$ has IP addresses $192.168.1.67$ and $192.168.1.155$. The netmask used in the network is $255.255.255.224$.

Given the information above, how many distinct subnets are guaranteed to already exist in the network?

  1. $1$
  2. $2$
  3. $3$
  4. $6$
edited by

8 Answers

Best answer
73 votes
73 votes
$255.255.255.224  =  11111111.11111111.11111111.11100000$

$192.168.1.97$
$192.168.1.80$
$192.168.1.135$
$192.168.1.110$
$192.168.1.67$
$192.168.1.155$

We need to do bitwise AND with subnet mask.
the last $5$ bits are going to be 0 when ANDED.

No need to waste time in finding binary.
Only focus on $1$st $3$ bits of binary.  

(From left side, $1$st bit is $128$,next one is $64$,next one is $32$..it goes like that you know.)

$\bf{97}$:    $0 + 64 + 32 +$ something  so $1$st $3$ bits will contain $011$
$\bf{80}$:    $0 + 64 + 0+$ something  so $010$
$\bf{135}$:  $128+0+0+$ something so $100$
$\bf{110}$:  $0+64+32+$ something so $011$
$\bf{67}$:    $0+64+0+$ something so $010$
$\bf{155}$:  $128+0+0+$ something so $100$

So we got $011, 010, 100$
$3$ subnets.... subnet id are...

$192.168.1.96$
$192.168.1.64$
$192.168.1.128$

Correct Answer: $C$
edited by
11 votes
11 votes
Given all address are of class c Default mask for class c=24bit Given net mask =255.255.255.224 11111111.11111111.11111111.11100000 Subnet id=3bit Simply BITWISE AND the bits of the first octet for each of the IP addresses we got 011, 010, 100 3 subnets. subnet id are 192.168.1.96 192.168.1.64 192.168.1.128
6 votes
6 votes
Simply BITWISE AND the bits of the first octet for each of the following IP addresses . You will get only
xx.xx.xx.96 ,xx.xx.xx.64 and xx.xx.xx.128  
Option C) 3 is the answer
edited by
Answer:

Related questions