• edited by
22,386 views
76 76 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$

10 Answers

Best answer
111 111 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
12 12 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
8 8 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
2 2 votes

You can always AND the netmask with the various IP addresses. I present a different method which I feel is more convenient. It's from Todd Lammle's CCNA prep book (for classful addressing specifically, but the approach extends to this situation).

We have the netmask $255.255.255.224$. I subtract the last octet value from $256$ to get what Todd calls the block size of that octet. It's 32 here. That means that our subnets, starting from $192.168.1.0$, are $192.168.1.0$, $192.168.1.32$, $192.168.1.64$, $192.168.1.96$, $192.168.1.128$, and so on. You get the picture. You keep adding the last octet's block size to get the subnet addresses for all subnets in the network.

Why this makes it easier, is that now I can just compare the last octet values and see which subnet an IP address is in. For example, $X$ is in $192.168.1.96$ and $Y$ is in $192.168.1.64$. Once you find out the subnets of all the given IPs, you'll see that there are only 3 distinct subnet addresses, and so the answer is $C)$.

2 2 votes
Simply, Bitwise AND the bits of fourth octet for each of the following IP address with fourth octet of subnet mask. You will get only
XX.XX.XX.96, XX.XX.XX.64 and XX.XX.XX.128.
Answer:
Position:
Show:

Related questions

100 100 votes
7 answers 7 answers
30.8k
30.8k views
Ishrat Jahan asked Oct 29, 2014
30,788 views
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$ ad...
22 22 votes
4 answers 4 answers
14.5k
14.5k views
Ishrat Jahan asked Oct 29, 2014
14,470 views
The total number of keys required for a set of $n$ individuals to be able to communicate with each other using secret key and public key cryptosystems, respectively are:$...
73 73 votes
7 answers 7 answers
24.3k
24.3k views
Ishrat Jahan asked Oct 29, 2014
24,320 views
The three way handshake for $\text{TCP}$ connection establishment is shown below. Which of the following statements are TRUE?$S1:$ Loss of $\text{SYN} + \text{ACK}$ from...
61 61 votes
4 answers 4 answers
25.0k
25.0k views
Ishrat Jahan asked Oct 29, 2014
25,006 views
Which of the following statements are TRUE?S1: TCP handles both congestion and flow controlS2: UDP handles congestion but not flow controlS3: Fast retransmit deals wit...