GATE | GATE-CS-2006 | Question 82
Consider the diagram shown below where a number of LANs are connected by (transparent) bridges. In order to avoid packets looping through circuits in the graph, the bridges organize themselves in a spanning tree. First, the root bridge is identified as the bridge with the least serial number. Next, the root sends out (one or more) data units to enable the setting up of the spanning tree of shortest paths from the root bridge to each bridge.
Each bridge identifies a port (the root port) through which it will forward frames to the root bridge. Port conflicts are always resolved in favour of the port with the lower index value. When there is a possibility of multiple bridges forwarding to the same LAN (but not through the root port), ties are broken as follows: bridges closest to the root get preference and between such bridges, the one with the lowest serial number is preferred.
For the given connection of LANs by bridges, which one of the following choices represents the depth first traversal of the spanning tree of bridges?
(A) B1, B5, B3, B4, B2
(B) B1, B3, B5, B2, B4
(C) B1, B5, B2, B3, B4
(D) B1, B3, B4, B5, B2
Answer: (A)
Explanation: Spanning tree is
B1
/ \
/ \
B5 B3
/ \
/ \
B4 B2
Note that B4 and B2 are connected through B3 (Not B5) because B3 has lower serial number than B5.
One DFS traversal of tree is B1 B5 B3 B4 B2
Hence Option A is the Answer
Quiz of this Question
Last Updated :
02 Dec, 2021
Like Article
Save Article
Share your thoughts in the comments
Please Login to comment...