[FW1]loopback-detection global enable vlan all //全局开启环路检测,并检测所有VLAN
[FW1]loopback-detection global action shutdown //出现环路时,采取的动作是shutdown
[FW1]loopback-detection interval-time 10 //指定环路检测的时间间隔为10秒
[FW1]int gi 1/0/2
[FW1-GigabitEthernet1/0/2]port link-mode bridge //此指令可忽略,但是接口模式必须为二层接口方可配置环路检测
[FW1-GigabitEthernet1/0/2]loopback-detection enable vlan all //接口开启环路检测,并检测所有VLAN
[FW1-GigabitEthernet1/0/2]loopback-detection action shutdown //出现环路时,采取的动作是shutdown
[FW1-GigabitEthernet1/0/2]quit
[H3C]loopback-detection global enable vlan all //全局开启环路检测,并对所有的VLAN生效
[H3C]loopback-detection interval-time 250 //配置环路检测的时间间隔为250秒
[H3C]int gi 1/0/1
[H3C-GigabitEthernet1/0/1]loopback-detection enable vlan all //接口开启环路检测,并对所有的VLAN生效
[H3C-GigabitEthernet1/0/1]loopback-detection action shutdown //当检测到环路时,环路检测会将此端口关闭
查看环路检测的显示信息:
[H3C]dis loopback-detection
Loopback detection is enabled. //环路检测已开启
Loopback detection interval is 250 second(s). //环路检测的时间间隔为250秒
No loopback is detected. //目前没有检测到环路
