switch|怎样快速检测网络环路?( 二 )


[Switch
snmp-agent trap enable feature-name ldttrap //打开Loop Detection的告警开关 , 使设备具有发送Loop Detection Trap报文的功能
配置Loop Detection处理动作为Quitvlan 。
[Switch
interface gigabitethernet 1/0/0
[Switch-GigabitEthernet1/0/0
port link-type hybrid
[Switch-GigabitEthernet1/0/0
stp disable //去使能接口的STP功能
[Switch-GigabitEthernet1/0/0
port hybrid tagged vlan 10 to 20
[Switch-GigabitEthernet1/0/0
loop-detection mode port-quitvlan //配置Loop Detection检测到环路时对接口的处理动作为Quitvlan
[Switch-GigabitEthernet1/0/0
quit
[Switch
interface gigabitethernet 2/0/0
[Switch-GigabitEthernet2/0/0
port link-type hybrid
[Switch-GigabitEthernet2/0/0
stp disable //去使能接口的STP功能
[Switch-GigabitEthernet2/0/0
port hybrid tagged vlan 10 to 20
[Switch-GigabitEthernet2/0/0
loop-detection mode port-quitvlan
[Switch-GigabitEthernet2/0/0
quit
5、配置受控接口的恢复时间
[Switch
interface gigabitethernet 1/0/0
[Switch-GigabitEthernet1/0/0
loop-detection recovery-time 90 //受控接口的恢复时间为90秒
[Switch-GigabitEthernet1/0/0
quit
[Switch
interface gigabitethernet 2/0/0
[Switch-GigabitEthernet2/0/0
loop-detection recovery-time 90
[Switch-GigabitEthernet2/0/0
quit
【switch|怎样快速检测网络环路?】注意 , Loop Detection需要发送大量检测报文来进行环路检测 , 所以 , 肯定会耗费一定的系统资源 , 请在不需要环路检测时及时关闭此功能 。