STP notes

STP principle (Layer 2): Spanning Tree Protocol
① ② to improve the reliability of anti-cyclic
ring causes hazards: ① ② broadcast storm duplicate data frame address table ③MAC shock
switch roles: bridge 2. a non-root bridge.
Port role: 1. RP ports (root ports) 2.DP port (designated port)

The BPDU: two kinds of bridge protocol data unit: BPDU 0x00 Configuration [1] [2] TCN-BPDU 0x80
[1]:
the PID PVI the BPDU the Type-ID-the Flags the RPC // Root Bridge Port-ID-the Message-ID // Max Age the Hello-Time-Fwd-AGE Delay
1. protocol ID (2 bytes 00) of the type 2 protocol version 3.BPDU 4.Flags bit (8 bits 10000001)
the root bridge ID (8 bytes)
6. root path [reach all cost and the link cost of the root bridge]
7. designated bridge ID (8 bytes): 32768 default priority level, the range of 0-61440, in steps 4096] + MAC address is preferably small
8. ports default priority level ID 128, 0-255, steps 16 and port number]
[time] mechanism
9. each switch has experienced a +1 (root bridge 0)
10. The 20S (when Message-age> Max- age, the BPDU is discarded) (20S not receive the BPDU that the root bridge linked)
11. each 2s transmitting a BPDU
12. the 15s (the port status requires forwarding mechanism)

Root port selection process: [[] small large bridge, the root port]
1. Comparative root bridge ID
2. Comparison of the RPC (root path cost)
3. Compare the designated bridge ID (non-local)
4. Comparison of the bridge is connected port ID (non-local)
5. Compare the local ID

Port state transition
1.disabled // disable
2.blocking // blocked
3.listening // listening
4.learning // learning
5.forwarding // forward
3 → 4,4 → 5 each require 15s (avoid temporary loops)

Role: to avoid a temporary loop

MAC learning state BPDU forwarding data transceiver
disabled 1 ---- - ----
2 closes the receive-only - ----
. 3 listener admission, - ----
. 4 study admission, learning
5 forward to close , hair learning forward

Direct link failure, need 30s
are not directly connected link failure, need 50s

[2] the topology change notification (the TCN) the BPDU:
1.RP port 2. Failure to forwarding state does not forward
the PID PVI-the BPDU the Type
1. Protocol ID (00 2 bytes) 2. Protocol version 3.BPDU type (0x00 )

[3] a topology change acknowledgment (TCA) BPDU
[4] Topology Change (TC) BPDU: starting only the root bridge, the aging time from another forwarding 300s → 15s

RSTP Rapid Spanning Tree Protocol (0x02):
[1.] to increase the role of the port blocked ports (AP root, BP specified)
[2] port state to reduce
Discarding not forward without learning
Learning is not forwarded to learn
Forwarding Forwarding learning
[3] occurs BPDU change (protocol version id)
[4] Flags bits have been changed (8 bits are used)
Flages:
bit7 bit6 bit5 bit4 bit3 \ 2 bit1 bit0
TCA agreement Learning port Forwarding Role Proposal TC
PortRole: 00- 01- uncertain blocked ports 10- 11- root port designated port
[5] increases faster convergence mechanism
①EP opening edge port
edge port (EP port)
is connected to a, and the terminal device, power that is forwarded (without waiting)
two, from P / a Effect
III calculation of the spanning tree BPDU received
four from TC-BPDU affect
five wins to prevent the root
six,
② P / A handshake: prevent temporary loops [] point to point full duplex
send P bit - ask rapid convergence
synchronization ( In addition to full receiver RP Discarding) - temporary loops to prevent
a low priority bit A hair
quickly switch root port ③
[6] increased protection
[With] protection function ensures that the designated port of the root bridge will not change because of some network problems port role
stp root-protection - with protection (DP port)
[protection] loop: loop-protection root port configuration stp

[TC-BPDU protection]

] [BPDU protection edge port receives the BPDU, an edge port is closed immediately, the need to manually open
stp bpdu-protection --BPDU protection
interface:
STP-edged enable Port - a port opening edge
[7] BPDU port aging time 6s
[ 8. The process flow different topology change]

Backward compatible with STP RSTP

[MSTP] (0x03) 802.1S Multiple Spanning Tree:
single spanning defects:
1. VLAN path portion nowhere
2. suboptimal paths Layer
3 can not be achieved traffic sharing
features:
1. Start MSTP are
2 have the same domain
3. have the same VLAN to MSTI mapping between
4 have the same revision level
configuration:
STP STP domain to enter Region configuration-
region-name HW configuration domain
revision-level 1 configuration revision level
instance 1 vlan 10 example of configuration mapping VLAN relationship
instance 20 is VLAN 2
Active Region Configuration-activation domain
Here Insert Picture Description

Here Insert Picture Description
Here Insert Picture Description
Here Insert Picture DescriptionHere Insert Picture Description

Here Insert Picture Description

Released six original articles · won praise 0 · Views 44

Guess you like

Origin blog.csdn.net/qq_39496169/article/details/104445096