Вы находитесь на странице: 1из 13

NT2640 Unit 9

Activity 1
Handout

NT2640 IP Networking

Page 1

STP Overview
When a host transmits a broadcast Ethernet frame, a switch will forward the broadcast
frame out to every port. In a situation with multiple switches are connected that form a
loop, the second switch will also forward the frame out every port. This continue and
continue as Ethernet does not have a TTL mechanism that IP has to stop packets from
existing forever. This behavior is call a broadcast storm.

The switches continue to propagate broadcast traffic, and very quickly become so
busy processing the broadcast frames that no other traffic has a chance to be
forwarded to its destination.
Switch 1

Switch 2
Flood

Layer 2 Loop

Flood

Flood

Flood
Switch 3

NT2640 IP Networking

Switch 4

Page 2

STP Overview(contd)
A loop avoidance solution was needed for
Ethernet networks that would contain
redundant paths.

Hence Spanning Tree Protocol 802.1d


Switch 1

Switch 2
B

F,D

F,R

F,R = Forwarding and root port

F,R

F,D = Forwarding and designated port


B

Layer 2 STP

= Blocking

F,D

F,D
F,D

Switch 3
(Root Bridge)

NT2640 IP Networking

F,R

Switch 4

Page 3

STP Port States


The goal of STP is to maintain a loop-free network topology.
A loop-free topology is achieved by the switches listening
and detecting a loop and transitions one or more ports into
blocking state automatically.
STP Port States:

Blocking - A port that would cause a switching loop if no action were to be taken. No
data is sent or received. Port may go into forwarding mode if the other links in use
were to fail and the spanning tree algorithm determines the port may transition to the
forwarding state. BPDU data is still received in blocking state.
Listening - The switch receives and processes BPDUs and awaits possible new
information that would cause it to return to the blocking state.
Learning - Port does not yet forward frames but it does learn source addresses from
frames received and adds them to the MAC address table
Forwarding - Normal port state for sending and receiving data. STP still processes
received BPDUs for indication that is should transition the port to blocking state.
Disabled - Administratively disabled, not strictly part of STP

NT2640 IP Networking

Page 4

STP Port States (contd)


STP Port States:
All ports transition thru Blocking -> Forwarding
Default timers of 15 seconds for listening and
learning
State

Forwards Data
Frames?

Learn Source MACs of


incoming Frames

Transitory or End
State

Blocking

No

No

End

Listening

No

No

Transitory

Learning

No

Yes

Transitory

Forwarding

Yes

Yes

End

Disabled

No

No

End

NT2640 IP Networking

Page 5

STP Convergence Process


1. Switches exchange bridge protocol data
units (BPDUs)
2. Root bridge is elected
3. Port role and state are determined
4. Tree is fully converged

NT2640 IP Networking

Page 6

STP Root Bridge Election


Root bridge is elected based on information
contained within the BPDU frames
Criteria used for election:
Lowest Bridge ID
Bridge ID is Composed of Priority +
System ID (Bridge Address)
Lower Priority Always Wins
Equal Priority, Lower Bridge Address Wins

NT2640 IP Networking

Page 7

STP Port Roles


802.1d STP Roles:
Root port
The one port on each switch with the least cost
path back to the root bridge
Designated Port
When multiple switch connect to a segment this is
the switch that will forward the least cost BPDU
hello into the segment
When the cost is tie, the following criteria is followed:
Bridge ID
Port Priority
Port Number
** Numeric Lowest Wins**
NT2640 IP Networking

Page 8

STP Port Roles


Lowest cost path to root bridge determines port role
Port role determines ending port state:
All ports on root bridge assume designated port role and
forwarding state
Root ports on switches are placed in forwarding state and the
root bridge has no root ports
Designated ports on non-root switches are placed into
forwarding state
All other ports are put into blocking state

NT2640 IP Networking

Page 9

STP Link Costs


Shortest path is based on cumulative link
costs
Link costs are based on the speed of the link

Link Speed

Original IEEE Cost

Revised IEEE Cost

10 Mbps

100

100

100 Mbps

10

19

1 Gbps

10 Gbps

NT2640 IP Networking

Page 10

STP Examples - 1
Priority: 32,769
Switch ID: 0400.0000.0001

Switch 1

ge0/1

ge0/0

ge0/1

ge0/0

ge0/1

Switch 2
Priority: 32,769
Switch ID: 0400.000.0008

ge0/0

Switch 3
Priority: 32,769
Switch ID: 0400.0000.0005

What switch will become the root bridge and what are the
port states on all the ports?
NT2640 IP Networking

Page 11

STP Examples - 2
Priority: 32,769
Switch ID: 0400.0000.0001

Switch 1

ge0/1

ge0/0

ge0/1

ge0/0

ge0/1

Switch 2
Priority: 32,769
Switch ID: 0400.000.0008

ge0/0

Switch 3
Priority: 8,192
Switch ID: 0400.0000.0005

What switch will become the root bridge and what are the
port states on all the ports?
NT2640 IP Networking

Page 12

STP Examples - 3
Priority: 32,769
Switch ID: 0400.0000.0001

Switch 1

ge0/1

ge0/0

ge0/1

ge0/0

ge0/1

Switch 2
Priority: 1,024
Switch ID: 0400.000.0008

ge0/0

Switch 3
Priority: 8,192
Switch ID: 0400.0000.0005

What switch will become the root bridge and what are the
port states on all the ports?
NT2640 IP Networking

Page 13

Вам также может понравиться