Professional Documents
Culture Documents
Transparent bridges
A switch has the same characteristics as a
transparent bridge
It must not modify the frames that are forwarded
It learns addresses by listening on a port for the
source address of a device
It forwards broadcasts out all ports,
except for the port that initially
received the broadcast
If the destination address is unknown
to the bridge, it forwards the frame
out all ports, except for the port that
initially received the broadcast
Bridging Loops
Loops may occur in a network for a variety of
reasons
Usually loops in networks are the result of a deliberate
attempt to provide redundancy
Can also occur by configuration error
Two primary reasons loops can be absolutely disastrous in a
bridged network:
. broadcast loops
. bridge-table corruption
Wheres
Host B?
FLOOD
Wheres
Host B?
FLOOD
Uh oh.
BPDUs
Bridges pass ST information between themselves
using bridge protocol data units (BPDUs)
Root ID, Cost of path, Bridge ID, Port ID, STP timer values
Path Cost
Sum of the costs of the links in a path between 2
bridges
Originally:
1000Mbps/BW in Mbps
Bridges use the concept of cost to evaluate how close they are to other bridges.
Port ID
16-bit field composed of two subfields:
Port priority (8 bits):
Configurable parameter
0 255 (Default 128)
STP Convergence
Step 1 Elect one Root Bridge
Cat-A has the lowest Bridge MAC Address, so it wins the Root War!
All 3 switches have the same default Bridge Priority value of 32,768
Root
Bridge
Cost=19
1/1
1/2
Cost=19
Cat-A
1/1
BPDU
BPDU
Cost=0
Cost=0
BPDU
BPDU
Cost=0+19=19
Cost=0+19=19
Cat-B
1/1
Cat-C
1/2
1/2
Cost=19
Step 1
Cat-B receives these BPDUs and adds the Path Cost of Port 1/1 to the
Root Path Cost contained in the BPDU.
Step 2
Cat-B add Root Path Cost 0 PLUS its Port 1/1 cost of 19 = 19
Root
Bridge
Cost=19
1/1
1/2
Cost=19
Cat-A
1/1
BPDU
BPDU
Cost=0
Cost=0
BPDU
BPDU
Cost=19
Cost=19
Cat-B
1/2
BPDU
1/1
Cat-C
BPDU
BPDU
Cost=19
Cost=19
1/2
BPDU
Cost=38 (19=19)
Cost=38 (19=19)
Cost=19
Step 3
Cat-B uses this value of 19 internally and sends BPDUs with a Root
Path Cost of 19 out Port 1/2.
Step 4
Cat-C receives the BPDU from Cat-B, and increased the Root Path
Cost to 38 (19+19). (Same with Cat-C sending to Cat-B.)
Root
Bridge
Cost=19
1/1
1/2
Cost=19
Cat-A
Root Port
1/1
BPDU
BPDU
Cost=0
Cost=0
BPDU
BPDU
Cost=19
Cost=19
Cat-B
1/1
Root Port
Cat-C
1/2
1/2
BPDU
BPDU
Cost=38 (19=19)
Cost=38 (19=19)
Step 5
Cost=19
Cat-B calculates that it can reach the Root Bridge at a cost of 19 via
Port 1/1 as opposed to a cost of 38 via Port 1/2.
Port 1/1 becomes the Root Port for Cat-B, the port closest to the Root
Bridge.
Cat-C goes through a similar calculation. Note: Both Cat-B:1/2 and CatC:1/2 save the best BPDU of 19 (its own).
STP Convergence
Step 3 Elect Designated Ports
Root
Bridge
1/1
Segment 1
Cost=19
Segment 2
Cat-A
Root Port
1/1
Root Port
Cat-B
Cat-C
1/2
1/2
Segment 3
Cost=19
Segment 1: Cat-A:1/1 has a Root Path Cost = 0 (after all it is the Root
Bridge) and Cat-B:1/1 has a Root Path Cost = 19.
Segment 2: Cat-A:1/2 has a Root Path Cost = 0 (after all it is the Root
Bridge) and Cat-C:1/1 has a Root Path Cost = 19.
10
Root
Bridge
1/1
1/2
Segment 1
Cost=19
Segment 2
Cat-A
Designated Port
Designated Port
1/1
Root Port
1/1
Root Port
Cat-B
Cat-C
1/2
1/2
Segment 3
Cost=19
Segment 1
Because Cat-A:1/1 has the lower Root Path Cost it becomes the
Designate Port for Segment 1.
Segment 2
Because Cat-A:1/2 has the lower Root Path Cost it becomes the
Designate Port for Segment 2.
Root
Bridge
1/1
1/2
Segment 1
Cost=19
Segment 2
Cat-A
Designated Port
Designated Port
Root Port
1/1
Root Port
Cat-B
Cat-C
1/2
1/2
Segment 3
Cost=19
Segment 3
Both Cat-B and Cat-C have a Root Path Cost of 19, a tie!
When faced with a tie (or any other determination) STP always uses
the four-step decision process:
1. Lowest Root BID;
11
Root
Bridge
1/1
Segment 1
1/2
Cost=19
Segment 2
Cat-A
Designated Port
Designated Port
1/1
Root Port
Cat-B
1/2
1/1
Root Port
32,768.CC-CC-CC-CC-CC-CC
32,768.BB-BB-BB-BB-BB-BB
Cat-C
1/2
Segment 3 (continued)
1) All three switches agree that Cat-A is the Root Bridge, so this is a tie.
3) The senders BID is lower on Cat-B, than Cat-C, so Cat-B:1/2 becomes the
Designated Port for Segment 3.
12
STP States
State
Purpose
Listening
Blocking
Disabled
Administratively down
STP Timers
Timer
Primary Purpose
Default
Hello
Time
2 Secs
Forward
Delay
15 Secs
Max Age
20 Secs
13
Topology Changes
It can take 30-50 sec. for a network to converge
During this time, physical addresses that can no longer be reached
are still listed in the switch table
The switch will attempt to forward frames to devices it cannot reach
14
Also:
Switch(config-if)# spanning-tree vlan vlan-id priority priority
15
STP Enhancements
Originally, IEEE 802.1D STP standard
convergence in 1 minute was ok
Cisco has added enhancements to
speed up STP alternate path
selection:
PortFast
UplinkFast
BackboneFast
PortFast
Designed to optimize switch access ports connected to
end-station devices
A port enters the Forwarding state immediately
A port bypasses the Listening and Learning states
From DISABLED to FORWARDING
16
UplinkFast
Provides fast convergence after a direct link failure
Accelerates the choice of a new Root Port when a link or switch fails
allows a blocked port to almost immediately begin forwarding when
the switch detects the failure of the forwarding link
The Root Port transitions to the
Forwarding state without going
through the Listening and Learning
states
must have direct knowledge of the
link failure in order to move a
blocked port into a forwarding
state
It is globally configured and it affects all VLANs
Switch(config)# spanning-tree uplinkfast
[max_update_rate pkts-per-sec]
BackboneFast
When a root port or a blocked port on a switch receives
inferior BPDUs from its designated bridge
An inferior BPDU reception means:
A link to which the switch is not directly connected has failed
Designated Bridge has lost connectivity to the Root Bridge
17
Learning
In a stable active topology and during topology
synchronization and changes
It accepts data frames to populate the MAC table
Forwarding
Only in a stable active topology
The forwarding switch ports determine
the topology
18
Root port
Port receiving the best BPDU
Assumes the forwarding state
Designated port
Port that sends the best BPDU on the
connected segment
Only one designated port per segment
Alternate port
port blocked by receiving more useful
BPDUs from another bridge
Offers an alternate path toward the root
bridge
Backup port
port blocked by receiving more useful
BPDUs from the same bridge it is on
Additional port on the designated switch with
a redundant link to the segment
19
Shared
Port operating in Half duplex mode
The port is connected to a shared media where multiple switches
may exist
20
802.1D
Any port state change generates a TCN
When a bridge detects a topology change, it sends TCNs
toward the root bridge
The root bridge sets the TC flag on the outbound BPDUs
When a bridge receives a BPDU with the TC flag set, it reduces
its bridge-table aging time to forward delay seconds
RSTP
Only non-edge ports moving to the forwarding state cause a TC
A port moving to the blocking state doesnt generate a TC BPDU
The originator of the TC directly floods this information through
the network
If the port consistently keeps receiving BPDUs that dont
correspond to the current operating mode for 2*hello time,
the port switches to the mode indicated by the BPDUs
21
MST combines the best aspects from both PVST+ and 802.1Q
Example:
VLANs 1-500 using 1 path, and
VLANs 501-1000 using the other path
Only two ST instances in every switch
MST converges faster than PVST+ (1000 instances)
22
MST regions
802.1Q standard
PVST+
MST
Single MST configuration that consist of 3 attributes
Name
Revision number
VLAN association table: VLAN ST instance
Extended System ID
MST uses the 12-bit Extended System
ID field
The Extended System ID carries the
MST instance number
23
IST connects all the MST switches in the region and any CST
switched domain
24
25
Redundant Links
0/2
0/1
Backup
Active
Etherchannel:
Cisco-propietary technology
Aggregates links into a single logical link
Incremental trunk speeds from 10Mbs to
16Gbps (Full-duplex)
26
Etherchannel
Provides
Very high-bandwidth logical link
Load balances amongst the physical links involved
Fault-tolerant links resiliency
Between routers, switches and servers
27
mode {auto
To verify:
Switch# show etherchannel [channel-group-number] {brief
| detail | load-balance| port | port-channel |
summary}
28
EtherChannel Guidelines
Use the following guidelines to avoid configuration
problems:
29
The End
30