Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
Recitation 3
Bridges & Spanning trees
Bridges
Link layer device
stores and forwards Ethernet frames
examines frame header and selectively
forwards frame based on MAC dest address
when frame is to be forwarded on segment,
uses CSMA/CD to access segment
transparent
hosts are unaware of presence of bridges
plug-and-play, self-learning
bridges do not need to be configured
Some bridge features
Isolates collision domains resulting in higher total
max throughput
limitless number of nodes and geographical
coverage
Can connect different Ethernet types
Transparent (plug-and-play): no configuration
necessary
Bridges: traffic isolation
Bridge installation breaks LAN into LAN segments
bridges filter packets:
same-LAN-segment frames not usually
forwarded onto other LAN segments
segments become separate collision domains
1
a b Bridge B1 = {1,a};{1,f};{2,b} c
2
1
d e Bridge B2 = {1,f};{1,c};{2,b}
2
f g
Find all errors in the table and explain
why?
Bridge name Error in table Explain
All Errors
1
a b Bridge B1 = {1,a};{1,f};{2,b} c
2
1
d e Bridge B2 = {1,f};{1,c};{2,b}
2
f g
Does a message reaches
destination?
From C to G
From A to F
From F to A
1
a b Bridge B1 = {1,a};{1,f};{2,b}{1,c} c
2
1
d e Bridge B2 = {1,f};{1,c};{2,b}
2
f g
From A to F
1
a b Bridge B1 = {1,a};{1,f};{2,b} c
2
1
d e Bridge B2 = {1,f};{1,c};{2,b}
2
f g
From F to A
1
a b Bridge B1 = {1,a};{12,f};{2,b} c
2
1
d e Bridge B2 = {12,f};{1,c};{2,b}
2
1
f g
2
Loop Resolving
The simple learning mechanism described fails in
presence of loops in the LAN
Loops may be present by mistake, or deliberately
provided for redundency
This problem is resolved by running a distributed
spanning tree algorithm
Spanning Tree Algorithm
Creates a logical, or active topology that
behaves like a spanning tree
Makes alternate bridges redundant
Is run periodically, so will discover failures and
use alternate bridges if necessary
Spanning tree
Think of the LAN as a graph that possibly has
loops (LAN segments as nodes, bridges as edges)
(a) (b)
Spanning tree algorithm
Spanning tree algorithm is a protocol used by a
set of bridges to agree upon a spanning tree for
a particular extended LAN.
Essentially, this means that each bridge decides
the ports over which it is and is not willing to
forward packets.
Some ports (or even entire bridges) may not
participate in a spanning tree
How does the bridge select the ports to include
(/exclude)?
Spanning Tree Algorithm
Working: Bridges regularly exchange frames known as
Bridge Protocol Data Units (BPDUs). This exchange does
the following:
1. Each bridge has a unique Identifier
2. Bridge with highest priority and smallest ID is selected as
root bridge.
3. Each bridge determines for each port, the least cost path
from root bridge to this port. This is the Root Path Cost
(RPC) for this port.
a) Select the port which has the least RPC and designate it as
the Root Port (RP). This is the port which will be used for
communicating with the root.
Algorithm...
B1
B1 B5 and B7 are both
GG HH
connected to LAN B,
but B5 is the
B6
B6 B4
B4 designated port due to
II
JJ
smaller ID (equal
distance).
Topology Initialization
BPDUs are sent to a broadcast MAC address of all bridges on
the LAN
All bridges initially assume they are the root bridge
Each BPDU contains (self ID, root ID, transmitting port ID, RPC
of this port)
A bridge updates its own info if it receives an update which
identifies a root with smaller id or
identifies a root with equal id but with shorter distance
the root id and distance are equal, but the sending bridge
has a smaller id
The bridge adds 1 to the received RPC in the above update and
saves this info.
Designated port / Root Port
And A
What are these
B
B3
C
B5
D B7
B2 K
E F
B6
B4
J
STP Run Find Root B3 sends BPDU
A
B
B2 sends BPDU
123 B3
C B1 sends BPDU
B5
135
D 17 B7 B4, B2 sends BPDU
2212 B2 K
E F
B8 sends BPDU
19 B9
1 B1
L
G H
16 B6
14 B4 18
I B8
J M
Proof sketch
if there is a bridge which has a different
value THEN There is a segment on which one
bridge has the correct minimum and the
other a larger value.
B6
B4
I B8
J M
Data Laptop B
A
B
B3
Message A
B to
to B
A
C B5
D B7
B2 K
E F
B9
B1
L
G H
B6
B4
I B8
J M
Laptop A