in Computer Networks retagged ago by
12 votes
12 votes

Consider routing table of an organization’s router shown below:

$$\begin{array} {|l|l|l|} \hline \text{Subnet Number} & \text{Subnet Mask} & \text{Next Hop} \\\hline & & \text{R1} \\\hline & & \text{R2} \\\hline & & \text{Interface 0} \\\hline & & \text{Interface 1} \\\hline \text{default} & & \text{R3} \\\hline \end{array}$$

Which of the following prefixes in $\text{CIDR}$ notation can be collectively used to correctly aggregate all of the subnets in the routing table?

  1. $$
  2. $$
  3. $$
  4. $$
in Computer Networks retagged ago by


@Arjun Sir

please correct the answer “A” to “B, D” on this page. 

Can anyone say Why C And D can't collectively used here!? I think B and C are generating same sort of lowest and highest address.

4 Answers

18 votes
18 votes

 GATE official initial key has given B,D as answers. 

I strongly feel this question should be challenged to give marks for all

I have prepared a draft to submit. Please find it here – here



Answer A

Some Binary Maths-
$255 = 11111111\\
254 = 11111110\\
252 = 11111100 $

$ = /23 \\ = /22

$\color{brown}{\textbf{Network1: }}  = \color{blue}{12.20.1010}\color{red}{01}00.0$

$\color{brown}{\textbf{Network2: }}  = \color{blue}{12.20.1010}\color{red}{101}0.0$

$\color{brown}{\textbf{Network3: }}  = \color{blue}{12.20.1010}\color{red}{100}0.0$

$\color{brown}{\textbf{Network4: }}  = \color{blue}{12.20.1010}\color{red}{011}0.0$


Ignore above color coding (why some part in $\color{blue}{\text{blue}}$ and some in $\color{red}{\text{red}}$). This will clear in a minute.

Now, We have these 4 networks. How can we identify all of these networks with some common name?

-Ok, You can say all of these start with $12$.

But can you be more specific? –

All of these start with $12.20$

But can you be as specific as you can?-

We can say all of these networks start with $\color{blue}{12.20.1010}$.

Now we say, we have supernet. And anything that start with $\color{blue}{12.20.1010}$ is part of my supernet.

This is used to simplify the routing table so that it does not have to maintain multiple entries. 1 entry will work here instead of 4 different entries.

We want initial 20 bits to be $\color{violet}{\textbf{fixed}}$ as $\color{blue}{12.20.1010}$ and remaining bits to has be $\color{red}{\textbf{free}}$.

The option(s) which has $\color{blue}{12.20.1010}$ as initial bits (and rest bits as free) is/are correct option(s)


Option A  : $ = \color{blue}{12.20.1010}0100.0$

it has initial 20 bits $\color{violet}{\textbf{fixed}}$  as  $\color{blue}{12.20.1010}$. Hence correct option.

Option B  : $ = \color{blue}{12.20.1010}\color{red}{01}00.0$.

It has initial 22 bits as fixed. Hence wrong option.

Option C  : $ = \color{blue}{12.20.1010}\color{red}{0}100.0$.

It has initial 21 bits as fixed. Hence wrong option.

Option D  : $ = \color{blue}{12.20.1010}\color{red}{10}00.0$.

 It has initial 22 bits as fixed. Hence wrong option.


Options like $$ or $$  or $$  or $12.20.10\text{xxxxxx}.0/18$ are also correct.

Actually option A contains a lot many ip addresses which doesn’t belong to any of the 4 networks. But that is ok, because it atleast contains all of the 4 networks, there could be some more ip addresses or networks.

Infact $$ this supernet contains everything in world hence can be used for route aggregation but its not most specific.

Number of IP addresses that option A contains = $2^{\text{free bits}} = 2^{12}$

Number of IP addresses all networks contains combinedly  $= \underbrace{2^{10} }_\color{brown}{\textbf{Network1}} 
+\underbrace{2^9 }_\color{brown}{\textbf{Network2}}
+\underbrace{2^9 }_\color{brown}{\textbf{Network3}}
+\underbrace{2^9 }_\color{brown}{\textbf{Network4}}
= 5\times2^9$

Video explanation for route aggregation – Route aggregation or Supernetting | Easiest explanation


Edit: GATE official initial key has given B,D as answer.

Possible Reason: “collectively” word in the question. obviously B and D collectively are more precise than A.

Explanation for B and D – $\color{brown}{\textbf{Network4}}$ is already a part of  $\color{brown}{\textbf{Network1}}$ hence we can just ignore $\color{brown}{\textbf{Network4}}$ for supernetting purpose.

Network1 (and Network4) is directly given by option B.

Network2 and 3 has  $\color{blue}{12.20.1010}\color{red}{10}$ as common and can be represented by option D.

In this way, we do not have to aggregate extra ips and combinedly (B,D) are more precise than A.


edited by


@Arjun sir,,advertised%20for%20a%20given%20protocol.&text=Only%20the%20router%20receiving%20data,Aggregate%20routes%20to%20forward%20traffic

Please give the above article a read. It is not the wording of the question.

We cannot use IP addresses not assigned to us for aggregation as it would cause packets to drop. If everyone started doing this, the internet would become extremely slow.                                                                                                                                                                                                      

Also sir, if you could give some idea regarding the fate of question 39(minimum spanning tree), it would relieve our anxieties a bit. 

Thank you


So you think b,d has to be correct right ?, I strongly feel that it has to be they won't change the keys and especially gives MTA, I dont know why there is so much buzz about this, Also in the document they donot followed the rules of aggregation, I mean why they are being given as the rules if we donot have to follow them. Also option a cannot be correct ever because it is one of the host id's it can never be the subnet id if it will be .160 at last instead of 164, then It will be correct, because then we can have .160 as one of the subnet id, we cannot make .164 in last part by only /20. But idk why they complicated it so much..It is a simple aggregation based question just given in table format and some mixed language, according to the rules b and d will be correct and also I dont see them changing the keys, Also your link says the same about it.

Also the mst question hate to say it, I am gonna lose marks but they won't change it.. 



@N.S. Same here.

14 votes
14 votes  → 12.20.10100100.00000000  → 12.20.10101010.00000000  → 12.20.10101000.00000000  → 12.20.10100110.00000000 and can be combined to 12.20.10101000.0 ( comes inside So, can be used for route aggregation of both. and can’t be combined further.

So, answer is option B and D.

Question is asking which prefixes can be collectively used to correctly aggregate all of the subnets in the routing table. Not which options independently does it.

Also, Option A contains IP address which doesn’t belong to the specified organization.

edited by

1 comment

Can you please explain, why C and D cannot be right. C contains 1st and last subnets, just like B. So answer can be C and D.

I know I am wrong. Please telll me where am I making a mistake.
5 votes
5 votes
A is the answer by combining the last common bits by the principle of supernetting.

1 comment

It is not, a can never be correct, How can you make .164 in 3 octet by just /20. It is one of the host id's it can never be a subnet id, Also the routing table stores the subnet or network id's.

You are blindly applying the rules, but it is not the case you have to think carefully in this question..
0 votes
0 votes

i think this is right .


Related questions