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?
View worked solution
Answer: A
To find the depth-first traversal of the spanning tree of bridges, we first construct the spanning tree based on the given rules:
- Identify the Root Bridge: The bridge with the lowest serial number is B1.
- Determine the Spanning Tree Connections:
- B1 connects directly to B5 (via LAN1) and B2 (via LAN2).
- B5 connects to B3 (via LAN3).
- For LAN4 and LAN5, both B3 and B4 are at the same distance (2 hops) from the root. Since B3 has a lower serial number than B4, B3 becomes the designated bridge. Thus, B4 connects to the tree through B3.
This gives the following hierarchical spanning tree structure:
B1
/ \
B5 B2
|
B3
|
B4
Performing a Depth-First Search (DFS) traversal starting from the root B1 (visiting the left branch first):
- Visit B1
- Go to B5
- Go to B3
- Go to B4
- Backtrack to B1, then visit B2
The resulting DFS traversal sequence is B1, B5, B3, B4, B2.
Free practice · Your answers on this page are not saved.
