Spanning Tree Protocol
STP is use to avoid loop create in the n/w.
In STP BPDU is performing every 2sec to check data message
transmitted across a local area n/w & also to detect a loop in the n/w, BPDU is maintain STP.
In STP there is election perform between the
switches, Who is become Root Bridge & Non-Root Bridge.
Lower MAC address become RB & Higher MAC become
NRB, but all Bridge priority is same i.e 32768.
We can change bridge prority, Lower bridge value can
be RB & Higher bridge value can be NRB.
One more step is Root Port, The
root port of each switch has the lowest root path cost to get to the RB.
Path cost is a cumulative cost to the Root Bridge.
Bandwidth
|
Cost
|
4 Mbps
|
250
|
10 Mbps
|
100
|
16 Mbps
|
62
|
45 Mbps
|
39
|
100 Mbps
|
19
|
155 Mbps
|
14
|
1 Gbps
|
4
|
10 Gbps
|
2
|
STP
Operation
The Root Port is NRB, mean it can communicate with
to other Switch.
Non-Designated Port in NRB, mean it cannot
communicate with to other Switch, it block the traffic.
Designated Port is in RB, mean it can communicate
with to other Switch.
STP port
state
Blocking
↓
Listening
↓
Learning
↓
Forwarding
Blocking state-
will not forward frames or learn MAC addresses & will still listen for BPDUs from other switches, to learn about changes to the switching topology till 20sec.
will not forward frames or learn MAC addresses & will still listen for BPDUs from other switches, to learn about changes to the switching topology till 20sec.
Listening state-
Only a root or designated port will move to the listening state. The non-designated port will stay in the blocking state.
No data transmission occurs at this state for 15 seconds just to make sure the topology doesn’t change in the meantime. After the listening state we move to the learning state.
Only a root or designated port will move to the listening state. The non-designated port will stay in the blocking state.
No data transmission occurs at this state for 15 seconds just to make sure the topology doesn’t change in the meantime. After the listening state we move to the learning state.
Learning state-
At this moment the interface will process Ethernet frames by looking at the source MAC address to fill the mac-address-table.
Ethernet frames however are not forwarded to the destination. It takes 15 seconds to move to the next state called the forwarding state.
At this moment the interface will process Ethernet frames by looking at the source MAC address to fill the mac-address-table.
Ethernet frames however are not forwarded to the destination. It takes 15 seconds to move to the next state called the forwarding state.
Forwarding state:
This is the final state of the interface and finally the interface will forward Ethernet frames so that we have data transmission.
This is the final state of the interface and finally the interface will forward Ethernet frames so that we have data transmission.
This means that it takes 20 (blocking) + 15
(listening) + 15 (learning) = 50 seconds before the interface is in the
forwarding state.
Rapid
Spanning Tree Protocol (RSTP)
RSTP is a fast converged & work similarly STP,
RSTP has 4 port.
Root Port is the port on a switch that is the
closest way (Lowest Cost) to the Root Bridge.
Designated Port is the port, that can send the best
BPDU on its segment.
Alternate Port is a blocking port that receives
better BPDU from another switch. It is the backup of Root Port.
Backup Port is a blocking port that receives better
BPDU from the same switch. It is the backup of Designated Port.
RSTP has 3 port state-
Discarding
Learning
Forwarding
It take 3 - 30sec to make port up. RSTP
works by adding an alternative port and a backup port compared to STP.
Note: RSTP is backward compatible with legacy STP
802.1D. If a RSTP enabled port receives a (legacy) 802.1d BPDU, it will
automatically configure itself to behave like a legacy port. It sends and
receives 802.1d BPDUs only.
Multiple Spanning
Tree Protocol(MSTP or MST)
MSTP mapped multiple Vlan into Spanning tree
instance.
Each MST instance (MSTI) builds its own RSTP
topology database, including electing its own Root Bridge. A VLAN can only be
assigned to one instance.
MSTP instance range is 0 to 15, by default all Vlan
belong to instance 0.
The Internal Spanning Tree (IST) is responsible for
maintaining the topology for the entire region and all of the MSTIs.
Only the IST can send and receive BPDUs, and encapsulates the MSTI information within a BPDU as an MST record.The IST is always mapped to instance 0.
Only the IST can send and receive BPDUs, and encapsulates the MSTI information within a BPDU as an MST record.The IST is always mapped to instance 0.
Per-VLAN Spanning Tree (PVST)
The delay in receiving BPDUs can cause problems like
convergence time problems.
Per-VLAN Spanning Tree (PVST) is a solution for these problems.
Per-VLAN Spanning Tree (PVST) is a solution for these problems.
Per-VLAN
Spanning Tree (PVST) is a Cisco proprietary Spanning Tree Protocol (STP) which
operates a separate instance of Spanning Tree Protocol (STP) for each
individual VLAN.
A separate instance of Spanning Tree Protocol (STP)
for each VLAN helps VLAN to be configured independently and also can perform
better. Per-VLAN Spanning Tree (PVST) requires Inter-Switch Link (ISL).
Per-VLAN Spanning Tree+ (PVST+)
Its an extension of the PVST standard. Per-VLAN
Spanning Tree+ (PVST+) allows interoperability between CST and PVST in Cisco
switches and support the IEEE 802.1Q standard.