Professional Documents
Culture Documents
• What do bridges do if
some LANs are LAN 2
reachable only in d
multiple hops ?
Bridge 3 Bridge 4
LAN 1
Bridge 2
LAN 3 LAN 4
M. Veeraraghavan (originals by J. Liebeherr)
1
Danger of Loops
51:24:68:1f:3:4
Bridge 0:0:1:2:3:5
3 1 2
Priority: 0x12:41
fe:64:96:12:1:3
• Root Bridge: The bridge with the lowest identifier is the root
of the spanning tree.
Bridge 3 with ID
0:1:34:1:21:56:19:87
1
LAN A
Bridge 2 with ID=
1 6:4:55:4:21:56:19:87
LAN B
2 1
Root bridge is bridge 3
Bridge 1 with ID=
4:1:21:1:21:56:19:87 since it has the smallest ID
• Root Port: Each bridge has a root port which identifies the
next hop from a bridge to the root.
• Root Path Cost: For each bridge, the cost of the min-cost
path to the root
• Example on previous slide: What is the root port and root path
cost of bridge 1:
– The root port is port 2 since it leads to the root bridge
(bridge 3)
– The root path cost is 1 since bridge 1 is one hop away from
the root bridge (I.e., bridge 3).
• Note: We assume that “cost” of a path is the number of “hops”.
• The spanning tree consists of all the root ports and the
designated ports.
• These ports are all set to the “forwarding state,” while all
other ports are in a “blocked state.”
B 0 B
• Each bridge looks at the BPDUs received on all its ports and
its own transmitted BPDUs.
• Root bridge is the smallest received root ID that has been
received so far (Whenever a smaller ID arrives, the root is
updated)
• B’s root port is the port from which B received the lowest
cost path to R (in terms of relation ““).
• Knowing R and Cost, B can generate its BPDU (but will not
necessarily send it out):
R Cost B
R Cost B
• B will send this BPDU on one of its ports, say port x, only if
its BPDU is lower (via relation ““) than any BPDU that B
received from port x.
• In this case, B also assumes that it Port x
is the designated bridge for the
LAN to which the port connects. Bridge B
Port A Port C
Port B
• At this time: Bridge B has calculated the root bridge for the
network, its root port, root path cost, and whether it is the
designated bridge for each of its LANs.
• Now B can decide which ports are in the spanning tree:
• B’s root port is part of the spanning tree
• All ports for which B is the designated bridge are part of
the spanning tree.
• B’s ports that are in the spanning tree will forward packets
(=forwarding state)
• B’s ports that are not in the spanning tree will block packets
(=blocking state)
Bridge
• What is the spanning tree? D
LAN 1
R
D
Bridge
D
LAN 3 LAN 4
M. Veeraraghavan (originals by J. Liebeherr)
18
Adapting to Changes
Port 2 Port 3
81.0.81
12.85.47
41.19.125 41.12.111
41.12.315
LAN A
Port 4 Port 1
Bridge 2 Bridge 1
Port 3 Port 2
LAN B
LAN A
Port 2 Port 4 Port 1
Bridge 2 Bridge 1
Port 3 Port 2
LAN B
• Finally, see pg 102 of the spec, section 5.2.5. It states that the
”Two bridge identifiers when compared numerically, the lesser
number shall denote the bridge of the higher priority."