Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 44

Bridges

&
Spanning Tree Protocol (STP)

Bhaskar Reddy
bhaskarr@ipinfusion.com

Confidential
© 2010 IP Infusion Inc. All rights reserved.
1
Section: Bridges

 What is a Bridge?
 Bridges on Ethernet
 Switched Ethernet
 Types of Bridges

Confidential
© 2010 IP Infusion Inc. All rights reserved.
2
What is a Bridge?

 A Bridge/Switch interconnects two or more networks at the


Data Link Layer.
 Why not a Repeater/Hub?
 Maximum Distance between two stations should not be exceeded.
 Ethernet or Token Ring : Saturation Point
 Single Collision Domain

Confidential
© 2010 IP Infusion Inc. All rights reserved.
3
Ethernet Switch.

 Ethernet Switches : Multiport Transparent Bridges for


interconnecting stations using Ethernet Links.
 High port-density bridges: Switched LAN

The terms are just a marketing difference creators. (Pre 1990s :


Bridges and after that Switches). But offer the same functionality.

Confidential
© 2010 IP Infusion Inc. All rights reserved.
4
Contd..

Confidential
© 2010 IP Infusion Inc. All rights reserved.
5
Types of Bridges.

 Transparent Bridges: Ethernet LANs


 Translation Bridges: Ethernet <-> Token Ring
 Source Routing Bridges: Token Ring/ FDDI Networks

Confidential
© 2010 IP Infusion Inc. All rights reserved.
6
Transparent Bridging

 Learning
 Flooding
 Filtering
 Forwarding
 Aging

Confidential
© 2010 IP Infusion Inc. All rights reserved.
7
A unicast example

Confidential
© 2010 IP Infusion Inc. All rights reserved.
8
Section: SPT

 What Is Spanning Tree and Why Use Spanning Tree


 Four-Step STP Decision Sequence
 Four-Step STP Decision Sequence
 STP States
 STP Timers
 BPDUs
 Setting the Root Bridge

Confidential
© 2010 IP Infusion Inc. All rights reserved.
9
Scenario (Loops in a Network)

• Unicast frame duplication


• Multicast/Broadcast frame
multiplication(a.k.a Broadcast Storms)
• Address Table non-convergence

Confidential
© 2010 IP Infusion Inc. All rights reserved.
10
Why do we have loops in the first place?

• Deliberate(Redundancy)
• Accident

Confidential
© 2010 IP Infusion Inc. All rights reserved.
11
Roger That (Then lets remove those loops)

 STP : Specified an algorithm that Bridges can use to create a


loop-free logical topology.
 Formal Specification: 802.1D

Confidential
© 2010 IP Infusion Inc. All rights reserved.
12
Entities..

Confidential
© 2010 IP Infusion Inc. All rights reserved.
13
Key Concepts

 Bridge ID (BID)

 Port ID

 Path Cost : Indicates how close they are to other Bridges. The
faster the link, the lower the cost.
 IEE90a: Link Cost= 1000/Data Rate Mb/s
 IEEE98a : Modified Link Cost algrithm

Confidential
© 2010 IP Infusion Inc. All rights reserved.
14
Path cost (contd..)

 The modified link cost algorithm uses a non-linear scale.

Confidential
© 2010 IP Infusion Inc. All rights reserved.
15
The 4-step decision sequence

 Lowest Root BID


 Lowest Path Cost to Root Bridge
 Lowest Sender BID
 Lowest Port ID

Every port will save a copy of the best BPDU seen on that
port. If a new BPDU arrives this four step sequence is used to
decide if the existing BPDU (previously stored) should be
discarded and the new one saved.

Confidential
© 2010 IP Infusion Inc. All rights reserved.
16
Initial STP convergence

 Elect one Root Bridge : Centre of the network


 Elect Root ports: Non-Root Bridge to the Root
 Elect Designated ports (Designated Bridges): Bridge to the
segments

Confidential
© 2010 IP Infusion Inc. All rights reserved.
17
Elect one Root Bridge(Root War)

 Remember, the lowest BID wins.

 Nice. But I did not see any blood being shed! 

Confidential
© 2010 IP Infusion Inc. All rights reserved.
18
Contd..

 BPDUs are special packets that bridges use to exchange


topology and Spanning Tree information with each other, sent
out every 2 seconds (default).

Confidential
© 2010 IP Infusion Inc. All rights reserved.
19
Elect Root Ports

 The war is over. Now you have a King.


 Every non-Root Bridge will select one Root Port.
 Root Port Election Process: Choose the port that offers the
lowest cost to the Root (Root Path Cost).

Confidential
© 2010 IP Infusion Inc. All rights reserved.
20
Elect Designated Ports

 Only one Port(Designated Port) and in turn one


Bridge(Designated Bridge) will be responsible for a segment.
 This will ensure there will be no loops.
 The Four step decision sequence is used.

Confidential
© 2010 IP Infusion Inc. All rights reserved.
21
Review the convergence procedure

 First, the bridged network elects a single Root Bridge. Second,


every non-Root Bridge elects a single Root Port, the port that
is the closest to the Root Bridge. Third, the bridges elect a
single Designated Port for every segment
 The four step decision sequence (Root Bid, Root Path Cost,
Sender Bid, Port ID)
 A port stops transmitting BPDUs if it hears a better BPDU that
it would transmit itself.

Confidential
© 2010 IP Infusion Inc. All rights reserved.
22
Port Roles

 Root Port (Forwarding state)


 Designated Port (Forwarding state)
 Non-Designated Port (Blocking state)

Confidential
© 2010 IP Infusion Inc. All rights reserved.
23
Five Port states

Confidential
© 2010 IP Infusion Inc. All rights reserved.
24
Example..

Confidential
© 2010 IP Infusion Inc. All rights reserved.
25
Steady State..

 Once every Hello Time, Root Bridge send outs BPDUs through
the desginated ports.
 The Designated Bridges after receiving these BPDUs, update
them (modify Root Path cost, Bridge ID, Port ID) and send out
them on their Designated Ports. (Goes upto the leaf Bridges).
 All the Bridges receive these BPDUs.

 The ingress BPDU is checked against the best known BPDU


known on that port using the Priority vector(the 4 step
decision sequence).
Ingress BPDUs priority vector:
 Better : Configuration Update
 Same : Hold on to the state
 Worse: Reply with its BPDU

Confidential
© 2010 IP Infusion Inc. All rights reserved.
26
Configuration Update

 Elect the root bridge


 Select one of its ports as the root port
 For each port, identify the designated bridge and designated
port for the LAN to which the port belongs
Needed every time something changes in the
network that may require a change in the topology.
Instances:
 A port is either enabled or disabled.
 A port's Message Age timer expires. In this case, the port is
restarted (i.e., assigned the designated role).
 The local configuration of a bridge changes.
 A bridge port receives a configuration BPDU with a superior
priority vector compared to the one previously received on the
same port.
Confidential
© 2010 IP Infusion Inc. All rights reserved.
27
Contd..

Confidential
© 2010 IP Infusion Inc. All rights reserved.
28
Three STP timers

Confidential
© 2010 IP Infusion Inc. All rights reserved.
29
Two Types of BPDUs

 Configuration BPDUs : Root -> Designated Bridges


(Downstream)
 Topology Change Notification (TCN) BPDUs : Designated
Bridges -> Root indicating a change in Topology (Upstream)

Confidential
© 2010 IP Infusion Inc. All rights reserved.
30
Configuraton BPDU

Confidential
© 2010 IP Infusion Inc. All rights reserved.
31
Fields..

Confidential
© 2010 IP Infusion Inc. All rights reserved.
32
TCN BPDU

 Used to indicate a change in the Topology


 Has only the first three fields of the BPDU
 Type field:
 0x00 (Binary: 0000 0000) Configuration BPDU
 0x80 (Binary: 1000 0000) Topology Change Notification (TCN)
BPDU

Confidential
© 2010 IP Infusion Inc. All rights reserved.
33
Topology Change Process

Life without TCN BPDUs. (Come on dude…..)

Confidential
© 2010 IP Infusion Inc. All rights reserved.
34
Lets appreciate TCN BPDUs

Confidential
© 2010 IP Infusion Inc. All rights reserved.
35
Yeah…Awesome..

 When the TC (Topology Change) flag is set by the Root, all the
bridges have to change their ageing time from
300seconds(default) to 15seconds.
 The TCN BPDU reduced the failover time from 5 minutes to 50
seconds. (How?)

Confidential
© 2010 IP Infusion Inc. All rights reserved.
36
When is a TCN BPDU transmitted?

 A non-forwarding bridge port (Blocking) changes state to


forwarding, or vice versa
 The root bridge ID changes
 A TCN topology change is received on a bridge port

Protocol recap:
 The bridge notifies the root bridge of the spanning tree.
 The root bridge "broadcasts" the information into the whole
network.

 Very important:
TCNs are a consequence of topology change, not a cause.

Confidential
© 2010 IP Infusion Inc. All rights reserved.
37
A Real world network example

Confidential
© 2010 IP Infusion Inc. All rights reserved.
38
Active Topology and N/W Admin

Confidential
© 2010 IP Infusion Inc. All rights reserved.
39
Extensions.

 Rapid Spanning Tree Protocol (RSTP)


 Per-VLAN Spanning Tree (PVST) : Cisco
 Multiple Spanning Tree Protocol (MSTP)
 Rapid Per-VLAN Spanning Tree (R-PVST) : Cisco

Confidential
© 2010 IP Infusion Inc. All rights reserved.
40
Questions.. 

Confidential
© 2010 IP Infusion Inc. All rights reserved.
41
References

 Cisco LAN Switching by Kennedy Clark http://


www.iphelp.ru/faq/24/toc.html
 The All New Switch Book by Rich Seifert
 http://
book.chinaunix.net/special/ebook/oreilly/Understanding_Linu
x_Network_Internals/0596002556/understandlni-PART-IV.ht
ml

Confidential
© 2010 IP Infusion Inc. All rights reserved.
42
Videos

 http://www.youtube.com/watch?v=ihF_78oIaDI : Root Election


 http://
www.youtube.com/watch?v=Ew-bLQZCngs&feature=fvw :
Topology Change Process

Confidential
© 2010 IP Infusion Inc. All rights reserved.
43
Thank you. 

Confidential
© 2010 IP Infusion Inc. All rights reserved.
44

You might also like