CS FundamentalsHardGATE CS (PYQ pattern)
Switches B1..B5 (bridge ID = number) are connected by point-to-point links: B1-B2 (cost 38), B1-B3 (cost 38), B1-B4 (cost 38), B1-B5 (cost 4), B2-B4 (cost 38), B2-B5 (cost 38), B3-B4 (cost 38), B3-B5 (cost 38). Classic spanning tree runs: the lowest ID is root; each non-root switch picks the port with the lowest path cost to the root as its root port (ties: lower neighbour ID); on each link the end whose switch has the lower cost to the root (ties: lower ID) is the designated port, and any other port that is not a root port is blocked. How many ports are blocked?
- A. 5
- B. 3
- C. 0
- D. 4
Correct answer: D. 4
Costs to the root: {1: 0, 2: 38, 3: 38, 4: 38, 5: 4}. Root ports: {2: 1, 3: 1, 4: 1, 5: 1}. Every link that is not part of the resulting tree has exactly one blocked port: 8 links - 4 tree links = 4.
More Computer Networks questions
- Switches B1..B5 (bridge ID = number) are connected by point-to-point links: B1-B2 (cost 38), B1-B3 (cost 38), B1-B4 (cost 38), B1-B5 (cost…
- An (11,7) Hamming code uses even parity with check bits at positions 1, 2, 4 and 8 (positions numbered 1 to 11 from the left). The…
- An (11,7) Hamming code uses even parity with check bits at positions 1, 2, 4 and 8. The received word (positions 1 to 11) is 10001100111…
- Which of these CRC generator polynomials, given as bit strings (leftmost bit is the highest power), is guaranteed to detect EVERY error…
- A 4 x 4 block of data bits is protected by even row and column parity. The received block (rows separated by /, each row followed by | and…
- A learning switch starts with an empty table. Frames arrive as (source, destination, ingress port): (A,B,1), (B,A,2), (C,E,3), (A,C,1)…