introduction to computer networks

10
Introduction to Computer Networks Spanning Tree 1

Upload: swaantje-grevink

Post on 30-Dec-2015

21 views

Category:

Documents


0 download

DESCRIPTION

Introduction to Computer Networks. Spanning Tree. Forming a Spanning Tree. Bridges transmit special messages (called configuration message) to each other. A bridge will be elected as the root bridge . - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: Introduction to Computer Networks

Introduction to Computer Networks

Spanning Tree

1

Page 2: Introduction to Computer Networks

Bridges transmit special messages (called configuration message) to each other. A bridge will be elected as the root bridge. Every bridge calculates the distance of the shortest path from itself to the root bridge. For each LAN, select a designated bridge among the bridges residing on the LAN. For each bridge, choose a port (root port) that lead to the root bridge. Ports to be included in a spanning tree are the root ports and the ports on which self has been elected as designated bridge.

Forming a Spanning Tree

2

Page 3: Introduction to Computer Networks

A configuration message is transmitted by a bridge onto a port.

Received by all the other bridges on the LAN attached to the port. It is not forwarded outside the LAN.

Contents: Root ID: ID of the bridge assumed to be the root. Bridge ID: ID of the bridge transmitting this configuration message. Cost: Cost of the shortest path from the transmitting bridge to the root bridge. Port ID: ID of the port from which the configuration message is transmitted.

Forming a Spanning Tree

3

Page 4: Introduction to Computer Networks

Comparing 2 configuration messages: C1 & C2 C1 is better than C2 if the root ID in C1 is lower than that in C2. If the root IDs are equal

C1 is better than C2 if the cost in C1 is lower than that in C2.

If the root ID and cost are equal C1 is better than C2 if its transmitting ID is lower than that in C2.

If the root ID, cost, and transmitting IDs are equal C1 is better than C2 if its port ID is lower than that in C2.

Forming a Spanning Tree - Rules

4

Page 5: Introduction to Computer Networks

Forming a Spanning Tree - Example

5

B91Port 1

Port 2Port 3

Port 4

Port 5

81 0 81 1

41 19 125 3

41 12 315 3

41 12 111 2

41 13 90 1

Best known root – 41 (Root ID)

Cost – 12+1 = 13 (Lowest cost)

Root Port - 4 (Transmitting ID)

Designated Bridge on Ports 1 (root bridge) & 2 (cost)

Blocked Ports 3 & 5 (already connected to root)

Page 6: Introduction to Computer Networks

Spanning Tree - Example

1 B1, 11, B7, 22 B1, 12, B2, 13 B1, 12, B5, 54 B1, 11, B17, 55 B1, 12, B5, 36 B1, 12, B4, 3

Root BridgeCostRoot PortDesignated on PortsBlocked Ports

B112132,4,5,6

B5Port 1

Port 2

Port 3

Port 4 Port 5

Port 6

6

Page 7: Introduction to Computer Networks

Network Analysis

7

B11

B32

B76

B3B15

B48

B12

B14

1 2

3

1

1

1

11

1

1

2 2

2

2

2

2

2

3

3

3

3

4

D D

D

RR

DD

D

D

R

D

R

D

R

DR

DD

D

Page 8: Introduction to Computer Networks

Bridges learn and cache the location of hosts. A host may move / disappear

Important for a bridge to “forget” host locations Unless frequently reassured that information is correct. Done by timing out entries not been recently verified.

Timeout Too long - traffic may not be delivered to the host at the new place. Too short - wastes a lot of network bandwidth

Solution A long value (e.g., 15 seconds) - used in the usual case, to reduce wasted network bandwidth. A shorter value (e.g., forward delay) - used following a reconfiguration of the spanning tree algorithm

Cache & Topology Changes

8

Page 9: Introduction to Computer Networks

A bridge that detects a topology change will send a message to its parent.

This message will in turn be forwarded to the root bridge.

The root bridge set the topology change flag bit in its configuration messages

Sent (every hello time) downstream the spanning tree. For a period that is forward delay + max age.

The bridges that receive this type of messages use the shorter timeout value for their caches

Until the flag is no longer set.

Cache & Topology Changes

9

Page 10: Introduction to Computer Networks

Network Analysis – Topology Change

B11

B32

B76

B3

B15

B48

B12

B14

1 2

3

1

1

1

1

1

1

2

2

2

2

2

2

3

3

3

4

D D

D

R 2R

DD

3 D

1D

R

D

R

D

R

DR

DD

D

D

RD

10