Bridging Bridging Jean-Yves Le Boudec Fall 2009 1 1 Algorhyme - - PDF document

bridging bridging
SMART_READER_LITE
LIVE PREVIEW

Bridging Bridging Jean-Yves Le Boudec Fall 2009 1 1 Algorhyme - - PDF document

COLE POLYTECHNIQUE FDRALE DE LAUSANNE Bridging Bridging Jean-Yves Le Boudec Fall 2009 1 1 Algorhyme I think that I shall never see a graph more lovely than a tree. h l l th t A tree whose crucial property is loop-free


slide-1
SLIDE 1

1

ÉCOLE POLYTECHNIQUE FÉDÉRALE DE LAUSANNE

Bridging Bridging

Jean-Yves Le Boudec Fall 2009

1

slide-2
SLIDE 2

2

Algorhyme I think that I shall never see h l l th t a graph more lovely than a tree. A tree whose crucial property is loop-free connectivity. A tree that must be sure to span so packet can reach every LAN. First, the root must be selected. By ID, it is elected. Least-cost paths from root are traced. In the tree, these paths are placed. A mesh is made by folks like me, then bridges find a spanning tree.

2

Radia Perlman

slide-3
SLIDE 3

3

Contents Contents

1.Transparent bridging

  • 2. Spanning Tree Protocol (STP)

. Spanning Tree Protocol (STP)

  • a. specification
  • b. an exotic version of Bellman-Ford
  • c. the STP protocol

3

slide-4
SLIDE 4

4

1.

  • 1. Transparent Bridging

Transparent Bridging Bridging in Bridging in General General

Bridges are intermediate systems that forward MAC frames to destinations based on MAC addresses Interconnect systems beyond one LAN segment, keeping main characteristics of LAN

without additional addresses

MAC addresses used to identify end systems

preserve sequence integrity

The LAN segments can be of different nature

Ex: WiFi and Ethernet

There are several possible methods, only one is wide-spread: Transparent Bridging

4

Transparent Bridging

slide-5
SLIDE 5

5

Transparent ansparent Bridging (TB) Bridging (TB)

End systems ignore that there are transparent bridges

bridge is transparent MAC f t h d b b id MAC frames not changed by bridges frames not sent to bridge, but rather: bridge is promiscuous

(listens to all frames)

Bridges are required to be plug and play (i.e. no configuration by system manager)

  • Q. Is an Ethernet hub a bridge or a repeater ? What’s the difference ?

solution solution

hub

5

hub hub

slide-6
SLIDE 6

6

Transparent Br ansparent Bridging ( idging (TB) B)

End systems ignore that there are transparent bridges

bridge is transparent MAC frames not changed by bridges MAC frames not changed by bridges frames not sent to bridge, but rather: bridge is promiscuous

(listens to all frames)

  • Q. Is an Ethernet hub a bridge or a repeater ? What’s the difference ?
  • A. It can be either a bridge or a repeater. “hub” is a product name, not an

architecture name. Modern hubs are bridges. Old ones are repeaters. The difference is: a repeater is a layer 1 intermediate system (acts on bits) whereas a bridge is a layer 2 intermediate system (acts on entire MAC frames). Also: a bridge separates collision domains, a repeater does not back

hub

6

hub hub

slide-7
SLIDE 7

7

Transparent Bridging uses forwar Transparent Bridging uses forwarding ding tables tables

Table maps MAC addresses to port numbers

No IP addresses here !

Forwarding Table A 1 B 2 C 3 Bridge A C port 1 port 2 port 3 Forwarding Table C 3 D 2

7

B D

slide-8
SLIDE 8

8

Bridge port 1 port 3 Dest Port Forwarding Table

Bridges learn addresses by observing Bridges learn addresses by observing traffic traffic

g A B C D port 2 MAC Nb addr A 1 B 2 C 3 2

Repeater

D D 2 How can a bridge build its table ?

No equivalent to routing protocols, we need a plug and play solution

Bridge builds routing table by reading all traffic

8

Bridge builds routing table by reading all traffic

table built by learni learning ng from SA field in MAC frame learnt addresses times out if not re-learnt

If destination address not in table broadcast to all ports

same for group addresses

slide-9
SLIDE 9

9

Can this Can this method of method of learning addresses be learning addresses be extended to extended to a a network of network of bridges? bridges?

On this example, yes. On this example, yes.

  • Q. How does B2 see the network?

solution B1 A Y port 1 port 2 B2 port 1 port 2 C B X Z

9

A Y C B X Z

slide-10
SLIDE 10

10

Can this Can this method of method of learning addresses be learning addresses be extended to extended to a a network of network of bridges? bridges?

On this example, yes. On this example, yes.

  • Q. How does B2 see the network?
  • A. B2 sees that A, X, B and Y are on port 1 (B1 is transparent !)

Its forwarding table is A 1 B 1 A Y B2 port 1 port 2 C B X Z B 1 C 2 X 1 Y 1 Z 2

10

A Y C B X Z back B2

slide-11
SLIDE 11

11

The method of learning does not The method of learning does not work if work if there are loops in there are loops in the the topology topology

Q Wh h h A d f B?

  • Q. What happens when A send a frame to B?

assume empty forwarding tables at the beginning solution

port 1 port 2 B1 port 1 port 2 B2 port 1 port 2 B3

11

A Y C B X Z

slide-12
SLIDE 12

12

The method of learning does not The method of learning does not work if work if there are loops in there are loops in the the topology topology

  • Q. What happens when A send a frame to B?

assume empty forwarding tables at the beginning assume empty forwarding tables at the beginning

  • A. frame is sent by B1 to ports 2 and 3. B1 learns that A is on port 1.

B3 sends it to port 2. B2 sends it to ports 1 and 2. B1 now learns that A is on port 2. B1 sends frame to ports 1 and 3 etc… the frame is multiplied a number of times B receives several copies is multiplied a number of times. B receives several copies back

port 1 port 2 B3

12

B1 A Y port 1 port 2 B2 port 1 port 2 C B X Z port 3

slide-13
SLIDE 13

13

Transparent Bridges force the Transparent Bridges force the Active Active Topology to Topology to be loop-fre be loop-free

Learning bridge works well if there is no loop in the topology

The topology can be represented as a bidirectional graph where vertex = bridge, edge = connection through collision domains (called here: LAN) for such graphs : Loop- free and and connected ≡ tree On a tree, there is only one path from one host to one bridge. Therefore a bridge sees a host on exactly one port Therefore, a bridge sees a host on exactly one port.

A network of bridges may have redundant connections (as in previous example). This is good for reliability, but this causes loops in the topology. The solution adopted by transparent bridges is: maintain an active topology that is loop-free

13

p gy p

i.e. decide that some ports are blocked This should be done automatically, without configuration (plug and play)

slide-14
SLIDE 14

14

The Spanning Tree Protocol The Spanning Tree Protocol

What does it do ?

Prevent loops in the active topology p p gy Decide which ports should be blocked or opened

ports that are allowed to forward frames are said to be “in the forwarding state” or called “forwarding ports”

Adapt to changes in the physical topology

How does it work ?

S t ti See next section

14

slide-15
SLIDE 15

15

Summary: what a transparent bridge Summary: what a transparent bridge does does

Copy all frames on all forwarding ports Frame received on port i -> /* port i is forwarding */ Individual PDU forwarding If DA is unicast, is in forwarding table with port j and j is a forwarding port then copy to port j else flood all forwarding ports ≠ i Update forwarding table with (i, SA) Control Method

15

Run the Spanning Tree Protocol Control Method

slide-16
SLIDE 16

16

  • 2. The Spanning Tree Protocol
  • 2. The Spanning Tree Protocol

We present the Spanning Tree Protocol in 4 steps :

(a) Specification (b) Design of main algorithm (c) Main Protocol (d) Topology Changes and Synchronization with Packet Forwarding

16

slide-17
SLIDE 17

17

(a) Specification (a) Specification

(a) We now specify the STP method (ie what what it does, in more details than before, not how how) There are many ways to build a tree on a graph.

Minimum Spanning Tree (Kruskal or Prim’s algorithms) The STP chose to use the set of shortest paths towards some selected vertex.

Each bridge has a bridge label, based on MAC address + configurable

  • ffset. Bridge with smallest label is selected and called “root”.

E h LAN b t b id h t b d f lt d i f ti f Each LAN between bridges has a cost, by default, decreasing function of bit rate:

Port Type Duplex Cost 100BASE-TX / 100BASE-FX (VLT) Full 5 Half 12

17

What: The STP computes a tree of shortest paths to the root bridge

10BASE-T Full 6 Half 700

slide-18
SLIDE 18

18

Specification of STP (cont’d) Specification of STP (cont’d)

STP gives a role to all ports

Root or designated (ports on spanning tree) Blocked (ports not on spanning tree) Blocked (ports not on spanning tree)

Root ports

One per bridge := port towards root along shortest path in case of equal costs, lowest port id chosen

Designated ports Designated ports

On every LAN (≡ collision domain), choose one designated bridge all ports on LAN for which the bridge is designated are designated ports Designated bridge

  • ne per LAN

18

defined by : it has the shortest path to root possibly root itself

Ports other than root or designated are blocking

slide-19
SLIDE 19

19

Understanding the Specification Understanding the Specification

  • Q1. find the root, root ports, designated bridges, designated ports

and blocking ports

  • Q2. find the forwarding table at all bridges
  • Q2. find the forwarding table at all bridges

solution

B41 B81 cost = 3 cost = 1 1 X 1 2 B90 B41 B81 B84 cost = 3 cost = 3 2 3 Z T 1 2 2 3 1

19

B92 B99 cost = 3 cost = 1 Y 1 1 2 2

slide-20
SLIDE 20

20

Understanding the Specification Understanding the Specification

cost = 3 cost = 1 1 X 1 2 B90 B41 B81 B84 cost = 3 cost 1 2 Z T 1 2 2 3 1

X X

B92 B99 cost = 3 cost = 3 cost = 1 3 Y 1 1 2 2 2

X

back

20 Forwarding Tables: B41 1X 2YZ 3T B81 1XYZT B84 1XYZT B90 2XZT 3Y B92 1XZT 2Y B99 1XZT 2Y

root port

X

blocking port designated port back

slide-21
SLIDE 21

21

(b) STP: design of main algorithm (b) STP: design of main algorithm

STP uses a variant of the Bellman-Ford algorithm (see dv.ppt), which we call the Bellman-Ford algorithm for Bridges Like the original Bellman-Ford algorithm, it is a distributed algorithm, but it is easier to understand it by studying first the centralized version

21

slide-22
SLIDE 22

22

The Centralized Bellman Ford Algorithm for The Centralized Bellman Ford Algorithm for Bridges uses Special Link Bridges uses Special Link and Path and Path Attributes Attributes

Represent the network by a graph, where a vertex is a bridge. For this algorithm, we treat the graph as directed. We are given link costs c(i,j) (costs of LANs, see later for default values)

We assume c(i, j) > 0 and c(i,j) = ∝ when i and j are not connected.

We are also given vertex labels l(i)(concatenation of bridge priority g ( )( g p y and serial number, set by manufaturer) Def Defini niti tion: : a link attribute is

A(i,j) := [l(j), c(i,j)]

concatenation of attributes:

[l,c] ⊕ [l’, c’] = [min(l,l’), c+c’] the attribute of a path i1 i2 … ik is the concatenation of the attributes of the

22

the attribute of a path i1 i2 … ik is the concatenation of the attributes of the links – i.e.: [minimum label, sum of costs]

comparison of attributes

lexicographic: [l, c] ≤ [l’ c’] iff [(l < l’ ) or (l = l’ and c ≤ c’)] a total order on N N x [0, ∝]

A path p is better than p’ if attribute of p ≤ attribute of p’

slide-23
SLIDE 23

23

Examples of Path Attributes Examples of Path Attributes

  • Q. Q. What are the attribute of the following paths ? Which one is

best ? 30 → 50 → 40 30 → 20 → 10 → 40 30 → 20 → 10 30 → 50 → 40 → 10 30 20 10 6 1 2 1 3 3 solution 40 50 1

23

slide-24
SLIDE 24

24

Examples of Path Attributes Examples of Path Attributes

  • Q. What are the attribute of the following paths ?

30 → 50 → 40 [40, 2] [ , ] 30 → 20 → 10 → 40 [10, 9] 30 → 20 → 10 [10, 7] 30 → 50 → 40 → 10 [10, 4] The best path is the last. 30 20 10 6 1 2 1 3 3 p back 40 50 1

24

slide-25
SLIDE 25

25

What are “Best Paths” in this Setting ? What are “Best Paths” in this Setting ?

Assume

the graph is fully connected; g p y ; all vertex labels are different; all link costs are > 0

A path p that starts at i is best (among all paths that start at i) iff

It goes through the vertex i0 that has the smallest label in the graph (the minimum label is reached at only one vertex, by hypothesis) It stops at i0 It is a shortest path from i to i0

Thus: the best paths in this graph are the shortest paths to the node with the smallest label

25

slide-26
SLIDE 26

26 What What: Given a directed graph with links attributes as above, computes one tree of best paths from any vertex let A(i,j):= attribute of link (i,j) =[l(j), c(i,j)]

The Centralized Bellman The Centralized Bellman-Ford Algorithm

  • Ford Algorithm for Bridge

for Bridges s

How How: Define pk(i) as the cost of the best path from i to anywhere in at most k hops.

Theor Theorem

  • 1. If the graph is fully connected, the algorithm stops at the latest at

26

g p y , g p k=number of vertices ; at the end, pk(i) is the attribute of a best path

  • 2. A best path from i is obtained by letting pred(i) = the index (j or i) that

achieves the minimum in (1)

If the min is achieved by the term [l(i),0] then pred[i]=i; this happens only when vertex i has the smallest label

slide-27
SLIDE 27

27

The algorithm is the same as the classical Bellman-Ford algorithm [dv.ppt], with the following modifications

Exotic algebra instead of usual algebra: costs are replaced by attributes; addition of costs is replaced by concatenation (⊕) and comparison by the lexicographic order. All paths instead of paths to a specific node: add a virtual node 0 such that A(i,0)=[l(i), 0] and A(0,i)=[∞, ∞]. Apply the classical Bellman-Ford to compute the “shortest” (i.e. best) paths from all nodes i to node 0. Remove the final edge from these paths and obtain the best paths we are looking for. Indeed, with these modifications, the classical Bellman-Ford becomes O il th t (2) i i l t t (1) i th t t

k 1(0) t [

0] d th t 27 One can easily see that (2) is equivalent to (1), given that we set pk-1(0) to [∞, 0], and that the impact of the initialization for p0(i) disappears after one step.

Note: in the algorithm, “min” is the lexicographic min (derived from the comparison of attributes) The proof of the algorithm is similar to the classical case. It relies on the fact that ⊕ is associative.

slide-28
SLIDE 28

28

Run the Centralized Bellman Ford Run the Centralized Bellman Ford Algorithm for Bridges on Algorithm for Bridges on this this Example Example

  • Q. Write pk(i), pred(i) and draw the spanning tree.

solution 30 20 10 6 1 20 10 40 50 2 1 1 3 3

28

slide-29
SLIDE 29

29

Run the Centralized Bellman Ford Run the Centralized Bellman Ford Algorithm for Bridges on Algorithm for Bridges on this this Example Example

30 30 20 10 40 50 6 1 2 1 1 3

pk( i ) : ( f or m at : ( l abel , cost ) ) k \ i 10 20 30 40 50 0 10, 0 20, 0 30, 0 40, 0 50, 0 1 10, 0 10, 1 20, 6 10, 2 20, 3 2 10, 0 10, 1 10, 7 10, 2 10, 3 3

3

3 10, 0 10, 1 10, 4 10, 2 10, 3 i 10 20 30 40 50 pr ed( i ) 10 10 50 10 40

29

pr ed( i ) 10 10 50 10 40

back

slide-30
SLIDE 30

30

Impact of Initial Impact of Initial Conditions on Conditions on the Bellman- the Bellman- Ford Algorithm for Bridges Ford Algorithm for Bridges

The classical Bellman-Ford algorithm continues to work if we take different initial conditions

but the interpretation that pk(i) is the distance from i to 1 in at most k hops is no longer true

Does this still hold for the Bellman-Ford algorithm for Bridges ?

  • Q. write pk(i), pred(i) and draw the spanning tree, with initial conditions as shown. The

dotted link does not exist in the current configuration It existed before and explains dotted link does not exist in the current configuration. It existed before, and explains why node 30 starts with these initial conditions. solution

30 6 1

pk( i ) : ( f or m at : l abel , cost ) k \ i 10 20 30 40 50 0 10, 0 20, 0 09, 2

40, 0 50, 0

1

09 2

30

20 10 40 50 1 2 1 1 3 3

2 3

slide-31
SLIDE 31

31

Impact of Initial Impact of Initial Conditions on Conditions on the Bellman- the Bellman- Ford Algorithm for Bridges Ford Algorithm for Bridges

  • Q. write pk(i), pred(i) and draw the spanning tree, with initial conditions as shown. The

dotted links do not exist in the current configuration. They existed before, and explain why nodes 30 and starts with these initial conditions why nodes 30 and starts with these initial conditions.

  • A. no, it does not work.

After a few steps, all nodes believe the best label is 09, and start computing the best path towards 09. Then they start a count to infinity ( we are computing the usual distance to 09, which is infinite). The algorithm does not converge. back

30 6 1 09 2

pk( i ) : ( f or m at : l abel , cost ) k \ i 10 20 30 40 50 0 10, 0 20, 0 09, 2

40, 0 50, 0

1 10, 0 09, 8

20, 6 10, 2 09, 3

31

20 10 40 50 1 2 1 1 3 3

2 09, 9 09, 6 09, 4 09, 4 09, 11 3 09, 16 09, 7 09, 12 09, 9 09, 10 4 09, 8 09, 12 09, 11 09, 10 09, 10 5 09, 12 09, 9 09, 11 09, 10 09, 10 6 09, 10 09, 13 09, 11 09, 11 09, 11

slide-32
SLIDE 32

32

The Bellman-Ford Algorithm for Bridges is The Bellman-Ford Algorithm for Bridges is sensitive to sensitive to initial initial conditions conditions

Theorem Theorem If the initial conditions in the centralized Bellman-Ford Algorithm for Bridges satisfy: ∀ i : p0(i)=(mi, ci) with mi ≥ minj l(j) the algorithm converges to the correct value else the algorithm diverges

with limk→ ∞ pk(i)=(m0,∞) where m0=mini mi

Pr Proof

  • of: first show that the label converges to the minimum of all initial conditions (it can only decrease).

Then use the property of Bellman-Ford in the usual algebra (see chapter “distance vector”) Comm Comment: the convergence may be much longer than with the initial conditions in theorem ““All-path” variant of Bellman Ford”

32

variant of Bellman Ford” Note that there is a condition on the initial label, not on the initial cost.

slide-33
SLIDE 33

33

  • Q. write pk(i), pred(i) and draw the spanning tree, with initial conditions as
  • shown. The dotted link does not exist in the current configuration.

It existed before and explains why node 30 starts with these initial

Example Example

It existed before, and explains why node 30 starts with these initial conditions. Does the algorithm converge to the correct values ?

30 20 10 6 1

pk( i ) : ( f or m at : ( l abel , cost ) ) k \ i 10 20 30 40 50

1 20 10 40 50 2 1 1 3 3

0 10, 0 20, 0 10, 1 40, 0 50, 0 1 2 3

33

solution

slide-34
SLIDE 34

34

  • Q. write pk(i), pred(i) and draw the spanning tree, with initial conditions as
  • shown. The dotted link does not exist in the current configuration.

It existed before and explains why node 30 starts with these initial

Example Example

It existed before, and explains why node 30 starts with these initial conditions.

  • A. The algorithm converges since the initial labels are not below the

smallest one.

30 20 10 6 1

pk( i ) : ( f or m at : ( l abel , cost ) ) k \ i 10 20 30 40 50

1 20 10 40 50 2 1 1 3 3

0 10, 0 20, 0 10, 1 40, 0 50, 0 1 10, 0 10, 1 20, 6 10, 2 10, 2 2 10, 0 10, 1 10, 3 10, 2 10, 3 3 10, 0 10, 1 10, 4 10, 2 10, 3 4 10, 0 10, 1 10, 4 10, 2 10, 3

34

back

slide-35
SLIDE 35

35 Like the classical Bellman-Ford (i.e. BFD2 in dv.ppt), the Bellman-Ford Algorithm for Bridges can be distributed: It is the algorithm used by STP

Distributed Distributed Bellman-Fo Bellman-Ford Algorithm Algorithm for Bridges for Bridges

every node, say i, maintains an estimate q(i) of p(i), the attribute of a best path from i and of pred(i), the next node on a best path; initially q(i)=[l(i),0] and pred(i)=i from time to time, i sends its value q(i) to all its neighbours when node i receives a value q(j0) from any neighbour j0, it sets q(j0) to the received value and updates q(i) by recomputing eq (3) if if j0 == pred(i) then then q(i):=min { A(i,j0)⊕ q(j0), [l(i),0] } else else q(i) := min{A(i,j0)⊕ q(j0), q(i) }

35

if eq (3) causes q(i) to be modified, pred(i) is set to j0 if A(i,pred(i)) changes (including if pred(i) stops being a neighbour ) then q(i) is set to [l(i),0] and pred(i) is set to i.

slide-36
SLIDE 36

36

Sample Sample Run of the Distributed Run of the Distributed Bellman- Bellman- Ford Algorithm for Bridges Ford Algorithm for Bridges

A possible run : 30 20 10 6 1 i 10 20 30 40 50

10, 0 20, 0 30, 0 40, 0 50, 0 10, 1 10, 1 10, 4 10 7 10 - > 20 50 - > 20 20 - > 50 20 - > 30

20 10 40 50 2 1 1 3 3

10, 7 10, 5 10, 4 10, 2 10, 3 10, 4

50 does as i f r ecei ved q( 40) = ( ∝, ∝); pr ed( 50) =40 t hus 50 does q( 50) =( 50, 0) ;

20 > 30 50 - > 40 20 - > 40 10 - > 40 40 - > 50 50 - > 20 50 - > 30 l i nk br eaks 36

si m i l ar l y 40 does a new com put at i on but t hi s does not change 40

10, 2 50, 0 30, 0 10, 4 10, 5 50 - > 30 20 - > 50 50 - > 30

slide-37
SLIDE 37

37

The Di The Distributed Bel stributed Bellman-Ford Al lman-Ford Algorithm for gorithm for Bridg Bridges may need to be s may need to be reset reset

Like the centralized algorithm, the distributed algorithm is robust to changes in configuration as long as the node with the smallest label changes in configuration as long as the node with the smallest label (called “root bridge”) is still present and reachable from all bridges. If this is not true, the algorithm does not converge to a true value. It needs to be reset by some additional mechanism. needs to be reset by some additional mechanism.

  • Q. Compare to the classical distributed Bellman-Ford algorithm.

solution

37

slide-38
SLIDE 38

38

The Di The Distributed Bel stributed Bellman-Ford Al lman-Ford Algorithm for gorithm for Bridg Bridges may need to be s may need to be reset reset

Like the centralized algorithm, the distributed algorithm is robust to changes in configuration as long as the node with the smallest label changes in configuration as long as the node with the smallest label (called “root bridge”) is still present and reachable from all bridges. If this is not true, the algorithm does not converge to a true value. It needs to be reset by some additional mechanism. needs to be reset by some additional mechanism.

  • Q. Compare to the classical distributed Bellman-Ford algorithm.

back

  • A. It does not need to be reset, since it always converges to the true value.

38

slide-39
SLIDE 39

39

(c) STP – (c) STP – Main Protocol ain Protocol

Standardized by IEEE 802.1D All bridges run it Implements the Distributed Bellman Ford Algorithm for Bridges

Bridge keeps best values received on all ports Bridge periodically sends its values to neighbours, and whenever a change occurs

39

slide-40
SLIDE 40

40

Topology changes Topology changes

T l h d t Topology changes occur due to

changes in configuration failures, recoveries

It changes occur, the behaviour depends on whether the root bridge is still reachable from all bridges

if so let distributed Bellman Ford do the job if so, let distributed Bellman Ford do the job else, we need some additional mechanism: STP uses root monitoring for this:

root refreshes validity of STP by periodically sending a refresh message every HelloTime (2s) the refresh message is propagated along the spanning tree a bridge that does not receive refresh message for MaxAge restarts STP

40

a bridge that does not receive refresh message for MaxAge restarts STP basic procedure from fresh initial conditions (= reset)

slide-41
SLIDE 41

41

A A Topol Topology gy Chan Change That is Handl ge That is Handled by Bellm d by Bellman an-Fo

  • Ford

B99 crashes; focus on B90

B90 detects absence of B99 (absence of hello, or other mechanism); this is equivalent to receiving (in Bellman-Ford’s algorithm) a state information: “from B99: best attribute (∝, ∝) B90 ll l i d f ll t B90 compares all values received so far on all ports

Port 1: best = B41, 3; port 2 = ∝, ∝ port 3: best = B90,6 Bellman ford finds new best value: B41, 3 on port 1

cost = 3 cost = 1 X B90 B41 B81 B84 cost = 3 t 3 1 2 3 Z T

X X

B92 B99 cost = 3 cost = 3 cost = 1 3 Y U

X

slide-42
SLIDE 42

42

A A Topology Change That is Topology Change That is not not Handled By Handled By Bellman-Fo Bellman-Ford

Q: If B41 dies, what happens ? A: root monitoring at all bridges detect that B41 does not send A: root monitoring at all bridges detect that 41 does not send a refresh message anymore all bridges start the STP procedure from fresh initial conditions and converge to a new spanning tree rooted at B81

42

slide-43
SLIDE 43

43

Other Bells and Whistles Other Bells and Whistles

Bridges wait for some time after any topology change before d l i th t Optimizations of STP (called « Rapid STP », RSTP) avoid the ti i f t declaring the port as « forwarding » (15--45 secs)

To avoid loops during transients

timers in some frequent cases

Detects that the change cannot cause a loop See « Rapid Spanning Tree » on www.cisco.com

43

slide-44
SLIDE 44

44

Ef Efficiency ? ciency ?

Algorhyme I think that I shall never see a graph more lovely than a tree. A tree whose crucial property is loop-free connectivity. A tree that must be sure to span so packet can reach every LAN. First, the root must be selected.

X

By ID, it is elected. Least-cost paths from root are traced. In the tree, these paths are placed. A mesh is made by folks like me, then bridges find a spanning tree. Radia Perlman 44

No loops, but paths may be not optimal

All frames go through the spanning tree

slide-45
SLIDE 45

45

Conclusions Conclusions

Bridges use STP to remove loops from the active topology An example of bio-like software

All bridges have the same code, only one becomes root No central intervention, plug and play

The Bellman Ford algorithm of Bridges repairs any failures except The Bellman Ford algorithm of Bridges repairs any failures except loss of root

Handled by a separate keep-alife mechanism; loss of root causes a global reset

RSTP is an optimization to speed up impact of topology changes

The active topology is the same as with STP

To know more:

Radia Perlman, « Interconnections, Bridges and Routers » CISCO RSTP White Paper

45