一、STP
1、两种BPDU格式
2、选举比较顺序
■ Root Bridge ID (RBID)
■ Root Path Cost (RPC)
■ Sender Bridge ID (SBID)
■ Sender Port ID (SPID)
■ Receiver Port ID (RPID; not included in the BPDU, evaluated locally)
3、选举过程
①、Elect the root switch,通常把靠近核心的地方作为根交换机,把优先级配置最低即可。
The switch with the lowest bridge ID; the standard bridge ID is 2-byte priority followed by a MAC address unique to that switch.
②Determine each switch’s Root Port
The one port on each nonroot switch that receives the superior resulting BPDU from among all received BPDUs on all its ports.
在非根交换机上收到较高级别的BPDU的为ROOT PORT。较高级别BPDU根据Root Path Cost(RPC)来计算。
③Determine the Designated Port for each segment
A converged STP topology results in only one switch forwarding Hellos onto each LAN
segment. The switch that forwards Hellos onto a LAN segment is called the designated
switch for that segment, and the port that it uses to forward frames onto that segment is
called the Designated Port (DP)
每个段发送较高级别BPDU的为DP。
④All ports that are neither Root Ports nor Designated Ports are superfluous in an
active topology and will be put into the Blocking state.
其他端口将被阻塞。
注:
1、Configuration BPDUs are sent out only from Designated Ports. Root and Non-Designated ports do not emit Configuration BPDUs because they would be inferior to BPDUs of a Designated Port on this segment and hence ignored.
2、Each port stores the best (that is, superior) BPDU it has received or sent itself.
Designated Ports store the BPDU they send; Root and Blocking ports store the best BPDU they receive. The stored BPDU determines the role of the port and is used for
comparisons.
4、接口状态
二、PVST+和CST协同工作
1、在CST生成树中,其不知道任何vlan信息,所以其一个STP拓扑会用于所有vlan;对于PVST+其在trunk上使用vlan1和CST进行融合操作;在PVST+的其他vlan分别有各自的PVST+实例。