Sau đây, là phần tóm tắt một số ý chính về phần STP (SV cố gắng dich các thuật ngữ tiếng anh phổ biến liên quan môn học)STP
Hoạt động của STP:
1. Elects one root bridge
2. Select one root port per nonroot bridge
3. Select one designated port on each network segment
1. Elects one root bridge
A fun thing is that when turned on, each switch claims itself as the root bridge immediately and starts sending out multicast frames called Bridge Protocol Data Units (BPDUs), which are used to exchange STP information between switches.
In the initial stage, each switch claims itself as a root bridge so the bridge ID of the root bridge and the bridge ID of the transmitting bridge are the same.
The Bridge ID is composed of the bridge priority value (0-65535, 2 bytes) and the bridge MAC address (6 bytes).
Bridge ID = Bridge Priority + MAC Address
2. Select one root port per nonroot bridge
Root port is the port that is closest to the root bridge, which means it is the port that receiving the lowest-cost BPDU from the root.
Every non-root bridge must have a root port. All root ports are placed in forwarding state.
3. Select one designated port on each network segment
STP selects one designated port per segment to forward traffic. Other switch ports on the segment typically become nondesignated ports and are blocked. Therefore interface fa0/0 of SwA will become nondesignated port (blocking state). In blocking state, although switches cannot send data traffic but can still receive BPDUs.
STP switch port states
When STP is enabled, every switch in the network goes through the blocking state and the transitory states of listening and learning. The ports then stabilize to the forwarding or blocking state.
* Blocking – no user data is sent or received but it may go into forwarding mode if the other links in use fail and the spanning tree algorithm determines the port may transition to the forwarding state. BPDU data is still received in blocking state but discards frames, does not learn MAC address.
* Listening – The switch processes BPDUs and awaits possible new information that would cause it to return to the blocking state, discards frames and MAC address.
* Learning – receives and transmits BPDUs and learns MAC addresses but does not yet forward frames.
* Forwarding – receives and sends data, normal operation, learns MAC address, receives and transmits BPDUs.