API Guide

BPDU 防护
OS10(config)# interface ethernet 1/1/4
OS10(conf-if-eth1/1/4)# spanning-tree bpduguard enable
OS10(conf-if-eth1/1/4)# do show spanning-tree interface ethernet 1/1/4
ethernet1/1/4 of vlan1 is designated Blocking
Edge port:no (default) port guard :none (default)
Link type is point-to-point (auto)
Boundary: NO bpdu filter : Enable bpdu guard : bpduguard shutdown-on-
violation :enable RootGuard: enable LoopGuard disable
Bpdus (MRecords) sent 134, received 138
Interface Designated
Name PortID Prio Cost Sts Cost Bridge ID PortID
------------------------------------------------------------------
ethernet1/1/4 128.272 128 500 BLK 500 32769 90b1.1cf4.a911 128.272
环路防护
OS10(config)# interface ethernet 1/1/4
OS10(conf-if-eth1/1/4)# spanning-tree guard loop
OS10(conf-if-eth1/1/4)# do show spanning-tree interface ethernet 1/1/4
ethernet1/1/4 of vlan1 is root Forwarding
Edge port:no (default) port guard :none (default)
Link type is point-to-point (auto)
Boundary: NO bpdu filter : bpdu guard : bpduguard shutdown-on-
violation :disable RootGuard: disable LoopGuard enable
Bpdus (MRecords) sent 7, received 20
Interface Designated
Name PortID Prio Cost Sts Cost Bridge ID PortID
-------------------------------------------------------------------------
ethernet1/1/4 128.272 128 500 FWD 0 32769 90b1.1cf4.9d3b 128.272
根防护
OS10(conf-if-eth1/1/4)# spanning-tree guard root
OS10(conf-if-eth1/1/4)# do show spanning-tree interface ethernet 1/1/4
ethernet1/1/4 of vlan1 is root Forwarding
Edge port:no (default) port guard :none (default)
Link type is point-to-point (auto)
Boundary: NO bpdu filter : bpdu guard : bpduguard shutdown-on-
violation :disable RootGuard: enable LoopGuard disable
Bpdus (MRecords) sent 7, received 33
Interface Designated
Name PortID Prio Cost Sts Cost Bridge ID PortID
-------------------------------------------------------------------
ethernet1/1/4 128.272 128 500 BLK 500 32769 90b1.1cf4.a911 128.272
Identifier
GUID-16D058B2-B946-4ADE-82E4-06236752B0F6
Version 2
Status Translation approved
BPDU 防护违规中恢复
1. 当某个端口上存在 BPDU 防护违规时OS10 将关闭该端口或将其移至 BLOCKED 状态。在 CONFIGURATION 模式下使用以下命
令关闭端口。命令的 no 版本将端口移至 BLOCKED 状态。
errdisable detect cause bpduguard
2. CONFIGURATION 模式下使用以下命令来恢复端口使其因检测到 BPDU 防护违规而关闭。当恢复选项启用时该端口将在
恢复计时器到期后启动。默认恢复计时器值为 60 秒。当恢复选项处于禁用状态时该端口将保持无限期关闭。您必须使用 no
shutdown 命令手动启动端口。
errdisable recovery cause bpduguard
命令的 no 版本将禁用恢复选项。
436 2