Question
Consider that 15 machines need to be connected in a LAN using 8-port Ethernet switches. Assume that these switches do not have any separate uplink ports. The minimum number of switches needed is ________.
Official answer and solution
- Official answer
- 3
- From
- Official GATE 2019 answer key
Solution
Formulate the port budget equation for connecting switches into a single connected network and solve for the minimum to accommodate 15 hosts.
We are given:
- Number of machines to connect: 15
- Each switch has 8 ports and no separate uplink ports.
To connect switches together into a single loop-free broadcast domain (a connected tree topology), exactly inter-switch links are required.
Each inter-switch link connects two switch ports (one port on each connected switch). Therefore, links consume switch ports in total.
The total number of ports available for connecting end machines across all switches is:
We require :
Since must be an integer:
- For : available ports = .
- For : available ports = .
- For : available ports = .
Thus, the minimum number of switches needed is 3.
3
Assuming 2 switches provide ports, forgetting that connecting the 2 switches to each other consumes 1 port on each switch, leaving only ports for hosts.
The answer is the one in the official GATE answer key. The solution is this site's own explanation.
Source
- Paper
- GATE 2019 Computer Science and Information Technology (CS)
- Question
- 59 of 65, printed as CS Q.49
- Section
- Computer Science and Information Technology
Report an error in this question
GATE questions are the work of the organising institutes. This site is independent and is not affiliated with them.