IAE Academy

GATE 2022 CS Q.22: solution and answer

GATE 2022 · CSQ.22 · 1 mark · MCQ

Consider an enterprise network with two Ethernet segments, a web server and a firewall, connected via three routers as shown below.

What is the number of subnets inside the enterprise network?

GATE 2022 CS question 22: Network topology.Tap to open full size
Figure from the GATE 2022 CS paper. It is part of the question.
Figure description

Network topology. A firewall (top left) has an arrow 'To Internet' leaving it on the left. The firewall has two links: one down to the left Router (R1) and one horizontal line to the top-centre Router (R2). R2 connects down to a Web Server and, by a line going right and down, to the right Router (R3). R1 connects down to a left Ethernet segment (a bus/switch) with several hosts attached, shown with a dashed line for 'more hosts'. R3 connects down to a right Ethernet segment with several hosts attached, also with dashed continuation. Labels: Firewall, Router (three times), Web Server, Ethernet (twice).

  1. (A)

    3

  2. (B)

    12

  3. (C)

    6

  4. (D)

    8

Answer and solution

ANSWER

There are 6 subnets inside the enterprise network, option (C).

Official answer: CSource: Official answer key, GATE 2022 CS (IIT Kharagpur)

  1. A subnet is a group of interfaces that can reach each other without passing through a router. In the drawing, every link between two devices that sit on opposite sides of a router is its own subnet, and each Ethernet segment is one subnet.

  2. Leave out the firewall-to-Internet link. It lies outside the enterprise network.

  3. Link from the firewall to the left router: 1 subnet.

  4. Link from the firewall to the top router: 1 subnet.

  5. Link from the top router to the web server: 1 subnet.

  6. Link from the top router to the right router: 1 subnet.

  7. Left Ethernet segment, with its hosts and the left router's interface: 1 subnet. Right Ethernet segment, with its hosts and the right router's interface: 1 subnet.

  8. Total , which is option (C).

KEY IDEA

Count one subnet for each point-to-point link between devices that routers separate, plus one for each Ethernet segment. Do not count the link out to the Internet.

WATCH OUT FOR

Counting the number of routers or devices instead of the networks between them. Another slip is counting the Internet link, which gives 7, or counting only the two Ethernet segments plus the routers, which gives 3 or 5.

From the GATE 2022 CS paper. Every question of this paper · Download the full paper · All 20 IPv4 questions, with notes

More IPv4 questions