GATE / CS ARCHIVE

GATE CSE 2006 / QUESTION 82

Spanning-tree bridge traversal

Computer Networks · Network Layers & Devices · Full GATE CSE 2006 paper

GATE 2006, Q82 2 marks · MCQ
Report issue

Network Layers & Devices

Question 82, GATE 2006: Transparent bridges B1,…,B5 connect six LANs. The following connection list fully specifies the figure; Bk:p denotes port p of bridge k:
LAN H1,H2: B1:1, B5:2, B3:4.
LAN H3,H4: B1:2, B5:3, B3:3.
LAN H5,H6: B5:1, B3:1, B4:1, B2:2.
LAN H7,H8: B5:4, B3:2, B4:2, B2:1.
LAN H9,H10: B4:3.
LAN H11,H12: B2:3.
The bridge with lowest serial number is root. Every bridge selects a shortest path to the root; equal root-port choices prefer lower port index. For forwarding onto a LAN, bridges closer to the root win, then lower bridge serial number. Which listed order is a depth-first traversal of the resulting bridge spanning tree?
Options:
(A) B1,B5,B3,B4,B2
(B) B1,B3,B5,B2,B4
(C) B1,B5,B2,B3,B4
(D) B1,B3,B4,B5,B2
Question 82, GATE 2006: Transparent bridges B1,…,B5 connect six LANs. The following connection list fully specifies the figure; Bk:p denotes port p of bridge k:
LAN H1,H2: B1:1, B5:2, B3:4.
LAN H3,H4: B1:2, B5:3, B3:3.
LAN H5,H6: B5:1, B3:1, B4:1, B2:2.
LAN H7,H8: B5:4, B3:2, B4:2, B2:1.
LAN H9,H10: B4:3.
LAN H11,H12: B2:3.
The bridge with lowest serial number is root. Every bridge selects a shortest path to the root; equal root-port choices prefer lower port index. For forwarding onto a LAN, bridges closer to the root win, then lower bridge serial number. Which listed order is a depth-first traversal of the resulting bridge spanning tree?
Options:
(A) B1,B5,B3,B4,B2
(B) B1,B3,B5,B2,B4
(C) B1,B5,B2,B3,B4
(D) B1,B3,B4,B5,B2
Tap to enlarge
Your answer
Answer & solution

Answer: A (no official key was published)

1. B1 is the root (lowest serial number). B5 and B3 both connect directly to the two top LANs: B5 chooses root port 2 over 3, while B3 chooses root port 3 over 4.

2. On each middle LAN B3 wins the designated-bridge tie against B5 because 3<5. B4 chooses its root port 1 via the H5/H6 LAN; B2 chooses root port 1 via the H7/H8 LAN.

3. Thus the bridge tree has edges B1–B5, B1–B3, B3–B4, B3–B2. Among listed sequences only B1,B5,B3,B4,B2 is a depth-first traversal, A.

4. (Other child orders can give other valid DFS sequences, but the other listed sequences leave B3’s subtree prematurely.)

5. Teaching check: After choosing root ports, compare B3 and B5 on the middle LANs: both are one bridge-hop from B1, so B3’s smaller ID wins. B4 and B2 consequently attach under B3. A depth-first traversal must finish B3’s children before returning to visit sibling B5.

Original paper, page 13