SlideShare a Scribd company logo
Bridges
Bridges
 Spanning Tree Algorithm,
Extended LAN is represented by a graph.
 Spanning Tree– sub graph that covers all the vertices, but
contains no cycles.
– Spanning tree keeps all the vertices of the original graph
but throws out some of the edges
Bridges
Fig. (a) a cyclic graph; (b) a corresponding spanning tree.
Bridges
Algorithm,
 Each bridge has a unique identifier
 B1, B2, B3…and so on.
 Elect the bridge with the smallest id as the root of the
spanning tree .
 The root bridge always forwards frames out over all of its
ports
Bridges
 Each bridge computes the shortest path to the root and
notes which of its ports is on this path
 This port is selected as the bridge’s preferred path to the
root
 Finally, all the bridges connected to a given LAN elect a
single designated bridge that will be responsible for
forwarding frames toward the root bridge.
Bridges
Bridges
Spanning tree for the above mentioned
Extended LAN graph
Bridges
 Bridges in an extended LAN are not able to see the
topology of the entire network.
 So to choose a root, each node has to exchange the
configuration messages with each other.
 Configuration message contain three piece of
information,
1. The ID for the bridge that is sending the message.
2. ID for what the sending bridge believes to be the root
bridge.
Bridges
3. The distance measured in hops, from the
sending bridge to the root bridge.
 Each bridge records the current best
configuration message it has seen on each of its
ports. (it includes the message transmitted by
itself)
Bridges
Steps,
 Initially each bridge thinks it is the root, so it sends
a configuration message on each of its ports
identifying itself as the root and giving a distance to
the root of 0.
 Upon receiving a configuration message over a
particular port, the bridge checks to see if the new
message is better than the current best
configuration message recorded for that port
Bridges
 The new configuration is better than the currently
recorded information if,
 It identifies a root with a smaller id (or)
 It identifies a root with an equal id but with a shorter
distance (or)
 The root id and distance are equal, but the sending
bridge has a smaller id
Bridges
 If the new message is better than the currently recorded
one,
 The bridge discards the old information and saves the
new information.
 It first adds 1 to the distance-to-root field.
 When a bridge receives a configuration message
indicating that it is not the root bridge (that is, a
message from a bridge with smaller id)
Bridges
 The bridge stops generating configuration messages on
its own.
 Only forwards configuration messages from other bridges
after 1 adding to the distance field.
 The bridge stops sending configuration messages over
that port, when a bridge receives a configuration
message that indicates it is not the designated bridge for
that port
Bridges
 When the system stabilizes,
 Only the root bridge is still generating configuration
messages.
 Other bridges are forwarding these messages only over
ports for which they are the designated bridge.
 Configuration Message,
(Y,d,X)
Y – Root node
d – Distance to root node from sending node
X – Sending node
Bridges
Activity at node B3,
 B3 receives (B2, 0, B2)
 Since 2 < 3, B3 accepts B2 as root
 B3 adds 1 to the distance advertised by B2 and
sends (B2, 1, B3) to B5
 Meanwhile B2 accepts B1 as root because it has
the lower id and it sends (B1, 1, B2) toward B3
Bridges
 B5 accepts B1 as root and sends (B1, 1, B5) to B3
 B3 accepts B1 as root and it notes that both B2
and B5 are closer to the root than it is.
 Thus B3 stops forwarding messages on both its
interfaces
 This leaves B3 with both ports not selected

More Related Content

Bridges

  • 2. Bridges  Spanning Tree Algorithm, Extended LAN is represented by a graph.  Spanning Tree– sub graph that covers all the vertices, but contains no cycles. – Spanning tree keeps all the vertices of the original graph but throws out some of the edges
  • 3. Bridges Fig. (a) a cyclic graph; (b) a corresponding spanning tree.
  • 4. Bridges Algorithm,  Each bridge has a unique identifier  B1, B2, B3…and so on.  Elect the bridge with the smallest id as the root of the spanning tree .  The root bridge always forwards frames out over all of its ports
  • 5. Bridges  Each bridge computes the shortest path to the root and notes which of its ports is on this path  This port is selected as the bridge’s preferred path to the root  Finally, all the bridges connected to a given LAN elect a single designated bridge that will be responsible for forwarding frames toward the root bridge.
  • 7. Bridges Spanning tree for the above mentioned Extended LAN graph
  • 8. Bridges  Bridges in an extended LAN are not able to see the topology of the entire network.  So to choose a root, each node has to exchange the configuration messages with each other.  Configuration message contain three piece of information, 1. The ID for the bridge that is sending the message. 2. ID for what the sending bridge believes to be the root bridge.
  • 9. Bridges 3. The distance measured in hops, from the sending bridge to the root bridge.  Each bridge records the current best configuration message it has seen on each of its ports. (it includes the message transmitted by itself)
  • 10. Bridges Steps,  Initially each bridge thinks it is the root, so it sends a configuration message on each of its ports identifying itself as the root and giving a distance to the root of 0.  Upon receiving a configuration message over a particular port, the bridge checks to see if the new message is better than the current best configuration message recorded for that port
  • 11. Bridges  The new configuration is better than the currently recorded information if,  It identifies a root with a smaller id (or)  It identifies a root with an equal id but with a shorter distance (or)  The root id and distance are equal, but the sending bridge has a smaller id
  • 12. Bridges  If the new message is better than the currently recorded one,  The bridge discards the old information and saves the new information.  It first adds 1 to the distance-to-root field.  When a bridge receives a configuration message indicating that it is not the root bridge (that is, a message from a bridge with smaller id)
  • 13. Bridges  The bridge stops generating configuration messages on its own.  Only forwards configuration messages from other bridges after 1 adding to the distance field.  The bridge stops sending configuration messages over that port, when a bridge receives a configuration message that indicates it is not the designated bridge for that port
  • 14. Bridges  When the system stabilizes,  Only the root bridge is still generating configuration messages.  Other bridges are forwarding these messages only over ports for which they are the designated bridge.  Configuration Message, (Y,d,X) Y – Root node d – Distance to root node from sending node X – Sending node
  • 15. Bridges Activity at node B3,  B3 receives (B2, 0, B2)  Since 2 < 3, B3 accepts B2 as root  B3 adds 1 to the distance advertised by B2 and sends (B2, 1, B3) to B5  Meanwhile B2 accepts B1 as root because it has the lower id and it sends (B1, 1, B2) toward B3
  • 16. Bridges  B5 accepts B1 as root and sends (B1, 1, B5) to B3  B3 accepts B1 as root and it notes that both B2 and B5 are closer to the root than it is.  Thus B3 stops forwarding messages on both its interfaces  This leaves B3 with both ports not selected