0% found this document useful (0 votes)
18 views

2.5 STP

The document discusses Spanning Tree Protocol (STP) which is used to prevent loops in switched networks. It describes key STP terms like BPDUs, bridge ID, path cost, root bridge, root port, designated port, and non-designated port. It also covers STP timers, topology change, faster convergence techniques like portfast, uplinkfast, and backbonefast. The document outlines STP security features like root guard and BPDU guard. It concludes by describing different STP variants like CST, PVST, and PVST+.

Uploaded by

Saurav Singh
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
18 views

2.5 STP

The document discusses Spanning Tree Protocol (STP) which is used to prevent loops in switched networks. It describes key STP terms like BPDUs, bridge ID, path cost, root bridge, root port, designated port, and non-designated port. It also covers STP timers, topology change, faster convergence techniques like portfast, uplinkfast, and backbonefast. The document outlines STP security features like root guard and BPDU guard. It concludes by describing different STP variants like CST, PVST, and PVST+.

Uploaded by

Saurav Singh
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 20

STP (Spanning Tree Protocol)

- It is used to prevent loop.


- Enabled by default, but may be disabled.
- Standard = IEEE 802.1D
- Algorithm = STA (Spanning Tree Algorithm).

STP Terms
1. BPDU (Bridge Protocol Data Unit)
- It is a message exchanged between switches to share topology information and to elect root bridge.
- Hello Time = 2sec & Maximum Age = 20sec
- Destination is defined as the multicast address 0180.c200.0000

2. Bridge ID
- It is an unique identity of a switch in network.
- BID (8 Byte) = MAC Add (6 Byte) + Bridge Priority (2 Byte)
- By default bridge priority is 32768 & Range = 0 to 65535
- Priority is change in increment of 4096
3. Path Cost Bandwidth Cost
10 mbps 100
- It is a value assigned to each interface according to their speed.
100 mbps 19
- Higher the bandwidth lower the cost is.
1000 mbps 4
- It is used to select best route to reach root bridge.
10,000 mbps 2
20+ gbps 1

4. Root Bridge
- The Root bridge (switch) is a special bridge at the top of the Spanning Tree (inverted tree).
- Bridge having lower priority become Root Bridge.
- If priority match, then lower mac address win.
- If you want one particular switch to be the Root Bridge (Switch), change the priority to a lower value
than 32,768
5. Root Port
- Every non root bridge have one RP.
- Port having lower cost to reach root bridge become RP.
- If cost match, port which receive lower BID from its neighbor.
- If BID match, then the port which receive lower port ID become RP.
PID = Priority + Port No.
- Default Port Priority = 128 & Range = 0 to 240
- If PID match, then local port ID win.
- Port priority is changed in the increment of 16.
- If you want one particular switchport to be the RP, change the priority.

6. Designated Port
- Every segment have on DP.
- All ports of RB are DP.
- Port opposite to RP always DP.
- Port which transmit superior BPDU.
7. Non-designated Port (NDP)
- Port which are neither RP nor DP.
- NDP ports are always put into blocking mode.

Inferior BPDU & Superior BPDU


- BPDU having higher BID is inferior BPDU.
- If a switch receive inferior BPDU, advertise its own BPDU
- BPDU having higher BID is inferior BPDU.
- If a switch receive superior BPDU, advertise this superior BPDU.
- How to identify Superior BPDU
- Lowest Root Bridge ID
- Lowest Cost
- Lowest Designate Bridge-ID
- Lowest Designate Port-ID
- Lowest Receiver Port-ID
Types of BPDU

Configuration BPDU
- Originated by Root Bridge
- Message Type = 0x00

TCN (Topology Change Notification)


- Generated by RP of NRB.
- Flow towards RB to alert
that active topology has changed.
- Message Type = 0x80

TCA (Topology Change Acknowledgement)


- Sent regarding TCN along with TCN BPDU by making TCA bit on.
Port State
BPDU Data
State Mac Add Learn
Receive Send Receive Send

Disabled No No No No No

Blocking Yes No No No No

Listening (15sec) Yes Yes No No No

Learning (15 sec) Yes Yes No No Yes

Forwarding Yes Yes Yes Yes Yes

Port Role
- Root Port
- Designated Port
- Alternate Port
STP Timers

1. Hello Timer
- It indicate how often a switch send BPDU.
- Default = 2sec & Range = 1sec to 10sec
2. Forward Delay
- It indicate delay between listening and learning a port.
- Default = 15sec & Range = 4sec to 30sec
3. Maximum Age
- It indicate how long a switch keep BPDU information from a
neghboring switch before discarding it.
- Default = 20sec & Range = 6sec to 40sec
STP Topology Change

It happens :
- If port transitioning to forwarding state.
- If any link fail
- If switch fail

There are three types of topology change in STP


1. Insignificant Topology Change
2. Direct Topology Change
3. Indirect Topology Change
Insignificant Topology Change

- It happens when access port


goes down.
- SW2 generate TCN BPDU & make type
field bit on.
- Send to RB through RP
- Now RB will generate configuration BPDU
make TC & TCA bit on in flag field.
- And all switch that receive TCN, set their
mac aging time equal to forward delay
time i.e. 15sec.
- This causes recently idle entries to be flushed.
- Solution = Enable portfast
Direct Topology Change
Indirect Topology Change
Faster Convergence

1. Portfast
- Only interface connected to end device act as portfast.
- Interface immediately move into forwarding mode.
- Do not generate TCN BPDU
- Can be configured in two ways.

Globally
SW(config)#spanning-tree portfast edge default

Interface Basis

SW(config)#interface fa0/0
#spanning-tree portfast

Verification
#show spanning-tree
2. Uplinkfast

- It is used to make blocked link into forwarding state when a direct link to
the root bridge goes down.
- Root bridge can not have uplinkfast enabled.
- It is configured globally for all vlan on switch.
- When a switch is configured for UplinkFast,
- Bridge Priority is changed to become 49,152 (default is 32768)
- All of its port costs are increased by 3000.

Configuration
SW(config)#spanning-tree uplinkfast
3. Backbonefast

- It is used to find an alternate path when an indirect link to the root


bridge goes down.
- It allow a switch to bypass the maximum age timer.
- It is configured globally on switch and should be implemented in the
network.

Configuration
sw(config)#spanning-tree backbonefast
STP Security

1. Root Guard
- It prevent an unauthorized switch from advertising
as a root bridge.
- If receive superior BPDU, port goes into
root-inconsistent state.

Configuration
sw(config)#interface fa0/1
#spanning-tree guard root
2. BPDU Guard

Can be implemented in two ways :

1. Global Configuration Mode


- Only works on the port which are enabled with portfast configuration
- If a port receives any BPDU on portfast enabled interface,
the interface goes into err-disable state
Switch(config)#spanning-tree portfast edge bpdugaurd default

2. Interface Mode
- Works on all interface (Portfast feature need not to be configured)
- If receives any BPDU, port goes into err-disable state
Switch(config)#interface fa0/0
#spanning-tree bpduguard enable
3. BPDU Filter

Can be implemented in two ways

1. Global Configuration Mode


- Only works on the port which are enabled with portfast
- If a If a port receives any BPDU on portfast enabled interface
it simply remove the portfast status & behave like a normal port
Switch(config)#spanning-tree portfast bpduguard default

2. Interface Mode
- Works on all interface (Portfast feature need not to be configured)
- If receives any BPDU, port goes into err-disable state
Switch(config)#interface fa0/0
spanning-tree bpduguard enable
Types of STP

1. CST (Common Spanning Tree_


- It is open standard protocol (IEEE 802.1d)
- Run a single instance of STP for all Vlan
- Does not support load balancing
- CPU utilization is very low
2. PVST (Per VLAN Spanning Tree)
- Cisco proprietary protocol
- Run separate STP process for each Vlan
- Support load balancing
- CPU utilization is high
2. PVST+ ((Per VLAN Spanning Tree Plus)
- Cisco proprietary protocol
- By default enabled on cisco switches
- Compatible with non cisco switches
- Run separate STP process for each Vlan
- Support load balancing
- CPU utilization is high

You might also like