边缘端口:位于网络边缘的指定端口,边缘端口既不接受配置BPDU报文,也不参与RSTP运算,可以有Disabled 状态直接转到Forwarding状态,且不经历时延,就像在端口上将STP禁用一样。
stp edged-port enable 用来配置交换机的端口为边缘端口,针对某一具体的端口
RSTP 有3中状态
Discarding: 端口不转发也流量也不学习MAC地址
Learning:端口不转发流量但学习MAC地址
Forwarding:端口 转发客户流量和学习MAC地址
RSTP
###在指定端口下执行
stp root-protection 命令 : 根保护功能仅在指定端口上生效,不能配置在边缘端口或 配置了环路保护功能的端口上
##BPDU 保护,在系统视图下执行
[SW3]stp bpdu-protection
##环路保护 ,在接口视图下执行
stp loop-protection
###配置了 root 保护机制的 端口 不能再配置 loop 保护
[SW3-GigabitEthernet0/0/3]stp lo
[SW3-GigabitEthernet0/0/3]stp loop-protection
Error: Failed to enable the loop protection because the root protection is enabl
ed on the port.
[SW3-GigabitEthernet0/0/3]inter g 0/0/2
[SW3-GigabitEthernet0/0/2]stp lo
[SW3-GigabitEthernet0/0/2]stp loop-protection
[SW3-GigabitEthernet0/0/2]