GATE official initial key has given B,D as answers.
I strongly feel this question should be challenged to give marks for all because this question requires certain assumptions.
In this answer, I have explained the reason why options B and D are correct and the required assumptions for their correctness.
I have prepared a draft to submit. Please find it here – here
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Please watch this short video if you want to understand suppernetting.
Video explanation for route aggregation – Route aggregation or Supernetting | Easiest explanation
Four networks are given in question as follows –
$\textbf{Network1: } 12.20.164.0/22 $
$\textbf{Network2: } 12.20.170.0/23 $
$\textbf{Network3: } 12.20.168.0/23 $
$\textbf{Network4: } 12.20.166.0/23 $
Four options are also given, following is range of options along with range of networks –
Option A covers everything (all networks) but it also covers lot more extra IPs.
Option C and D collectively aggregate everything (all networks) but also covers few more extra IPs.
Option B and D collectively aggregate everything (all networks) without covering extra IPs.
Hence B and D should be answer.
Still, there is a possibility of marks to all
Explaining in short (Please read the above draft for full detail)-
Two reasons –
- Whats wrong with option A or (C,D) ? – they are just covering extra IPs but it is given in kurose that we can cover extra IPs if these IPs are unallocated. (Please see above draft where kurose screenshots are attached.)
- Even If we agree that B and D are more precise in terms of not covering extra IPs still option B and D requires an assumption about topology of network (given below)
Now we explain the assumption about topology of network to make option B, D correct. –
Option D combines network 2 and 3. But you can combine only when Next Hop is same for both networks.
$$\begin{array} {|l|l|l|} \hline
\text{Subnet Number} & \text{Subnet Mask} & \text{Next Hop} \\\hline
12.20.164.0 & 255.255.252.0 & \text{R1} \\\hline
12.20.170.0 & 255.255.254.0 & \color{green}{\text{R2}} \\\hline
12.20.168.0 & 255.255.254.0 & \color{green}{\text{Interface 0}} \\\hline
12.20.166.0 & 255.255.254.0 & \text{Interface 1} \\\hline
\text{default} & & \text{R3} \\\hline \end{array}$$
THE VERY FIRST CONDITION IN AGREGGRATION IS TO HAVE SAME NEXT HOP. OTHERWISE AGREGGRATION IS NOT POSSIBLE.
$\color{green}{\text{R2}}$ and $\color{green}{\text{Interface 0}} $ should be same. Which means following topology –
If network 2 and 3 are on same side of router R then only we can combine them in routing table of R.
What if networks 2 and 3 are connected to different interfaces?
In this case we can not even combine network 2 and 3 hence none of the option should be correct.
First Figure : R2 = Interface 0
Second Figure : R2 ≠ Interface 0
Both Fiigures are very much possible.
Option B and D are correct subject to two assumptions -
- We should have topology given in first diagram
- We are not allowed to cover extra IPs.