Data link layer (Spanning tree protocol)
Spanning tree protocol
CCNA, Data link layer
Spanning tree protocol (stp 802.id)
Between Pc1 and Pc2 two paths:-
- Switch1 to switch2 to switch4
- Switch1 to switch3 to switch4
Because all this looping the spanning tree protocol will shut down redundant
When switches powered up its start sending spanning tree protocol by default called (BPDU)
(BPDU) bridge protocol data unit: - send every two seconds out all ports.
To stop looping some links need to shut down throw spanning tree protocol steps:-
- Elect 1 Root bridge (switch) per layer 2 domain.
- Elect 1 Root port per Non Root Switch.
- Elect 1 designated port per segment.
Segment:-is the link (bridge) between two switches.
For each one of these steps we are going to follow (spanning tree protocol decision process) and stop at process right for role:-
- Lowest bridge id
Bridge id = priority + MAC address
Priority field for cisco device is set to 32768 (Static)
Then the lowest MAC Address switch will become the ROOT Bridge, because all switches will have the same priority.(cisco switches)
- Lowest root path cost
Like distance (speed)
10 mbps -> 100 cost
100 mbps -> 19 cost (Fast Ethernet)
1000 mbps -> 100 cost
Fast Ethernet -> 19
3. Lowest sender bridge id
4. Lowest sender port id
(BPDU) bridge protocol data unit have four fields:-
- Root bridge id
- Root path cost
- Send bridge id
- Sender port id
Spanning tree protocol port states:-
- Blocking :- when switch powered up all ports are in blocked state for 20 sec
- Listening :- your Root bridge election and root port election is happening (15 sec)
- Learning :- no data traffic flowing but switch still populating the switch mac address table (15 sec)
- Forwarding :- start forwarding data traffic, here putting designated port and root port
Alternate port :- is non-designated port and non-root path port (shutdown ports).
© 2020 PyOdoo.