[H3C]dis
[H3C]display cu
[H3C]display current-configuration
#
version 5.20, Release 2108P01
#
sysname H3C
#
irf mac-address persistent timer
irf auto-update enable
undo irf link-delay
#
domain default enable system
#
loopback-detection enable
loopback-detection interval-time 10
#
undo ip http enable
#
password-recovery enable
#
vlan 1
#
domain system
access-limit disable
state active
idle-cut disable
self-service-url disable
#
user-group system
group-attribute allow-guest
#
stp enable
#
interface NULL0
#
interface Vlan-interface1
ip address dhcp-alloc client-identifier mac Vlan-interface1
#
interface Ethernet1/0/1
port link-mode bridge
port link-type hybrid
port hybrid vlan 1 untagged
loopback-detection enable
loopback-detection per-vlan enable
loopback-detection action shutdown
#
interface Ethernet1/0/2
port link-mode bridge
port link-type hybrid
port hybrid vlan 1 untagged
loopback-detection enable
loopback-detection per-vlan enable
loopback-detection action shutdown
#
interface Ethernet1/0/3
port link-mode bridge
port link-type hybrid
port hybrid vlan 1 untagged
loopback-detection enable
loopback-detection per-vlan enable
loopback-detection action shutdown
#
interface Ethernet1/0/4
port link-mode bridge
port link-type hybrid
port hybrid vlan 1 untagged
loopback-detection enable
loopback-detection per-vlan enable
loopback-detection action shutdown
#
interface Ethernet1/0/5
port link-mode bridge
port link-type hybrid
port hybrid vlan 1 untagged
loopback-detection enable
loopback-detection per-vlan enable
loopback-detection action shutdown
#
interface Ethernet1/0/6
port link-mode bridge
port link-type hybrid
port hybrid vlan 1 untagged
loopback-detection enable
loopback-detection per-vlan enable
loopback-detection action shutdown
#
interface Ethernet1/0/7
port link-mode bridge
port link-type hybrid
port hybrid vlan 1 untagged
loopback-detection enable
loopback-detection per-vlan enable
loopback-detection action shutdown
#
interface Ethernet1/0/8
port link-mode bridge
port link-type hybrid
port hybrid vlan 1 untagged
loopback-detection enable
loopback-detection per-vlan enable
loopback-detection action shutdown
#
interface Ethernet1/0/9
port link-mode bridge
port link-type hybrid
port hybrid vlan 1 untagged
loopback-detection enable
loopback-detection per-vlan enable
loopback-detection action shutdown
#
interface Ethernet1/0/10
port link-mode bridge
port link-type hybrid
port hybrid vlan 1 untagged
loopback-detection enable
loopback-detection per-vlan enable
loopback-detection action shutdown
#
interface Ethernet1/0/11
port link-mode bridge
port link-type hybrid
port hybrid vlan 1 untagged
loopback-detection enable
loopback-detection per-vlan enable
loopback-detection action shutdown
#
interface Ethernet1/0/12
port link-mode bridge
port link-type hybrid
port hybrid vlan 1 untagged
loopback-detection enable
loopback-detection per-vlan enable
loopback-detection action shutdown
#
interface Ethernet1/0/13
port link-mode bridge
port link-type hybrid
port hybrid vlan 1 untagged
loopback-detection enable
loopback-detection per-vlan enable
loopback-detection action shutdown
#
interface Ethernet1/0/14
port link-mode bridge
port link-type hybrid
port hybrid vlan 1 untagged
loopback-detection enable
loopback-detection per-vlan enable
loopback-detection action shutdown
#
interface Ethernet1/0/15
port link-mode bridge
port link-type hybrid
port hybrid vlan 1 untagged
loopback-detection enable
loopback-detection per-vlan enable
loopback-detection action shutdown
#
interface Ethernet1/0/16
port link-mode bridge
port link-type hybrid
port hybrid vlan 1 untagged
loopback-detection enable
loopback-detection per-vlan enable
loopback-detection action shutdown
#
interface Ethernet1/0/17
port link-mode bridge
port link-type hybrid
port hybrid vlan 1 untagged
loopback-detection enable
loopback-detection per-vlan enable
loopback-detection action shutdown
#
interface Ethernet1/0/18
port link-mode bridge
port link-type hybrid
port hybrid vlan 1 untagged
loopback-detection enable
loopback-detection per-vlan enable
loopback-detection action shutdown
#
interface Ethernet1/0/19
port link-mode bridge
port link-type hybrid
port hybrid vlan 1 untagged
loopback-detection enable
loopback-detection per-vlan enable
loopback-detection action shutdown
#
interface Ethernet1/0/20
port link-mode bridge
port link-type hybrid
port hybrid vlan 1 untagged
loopback-detection enable
loopback-detection per-vlan enable
loopback-detection action shutdown
#
interface Ethernet1/0/21
port link-mode bridge
port link-type hybrid
port hybrid vlan 1 untagged
loopback-detection enable
loopback-detection per-vlan enable
loopback-detection action shutdown
#
interface Ethernet1/0/22
port link-mode bridge
port link-type hybrid
port hybrid vlan 1 untagged
loopback-detection enable
loopback-detection per-vlan enable
loopback-detection action shutdown
#
interface Ethernet1/0/23
port link-mode bridge
port link-type hybrid
port hybrid vlan 1 untagged
loopback-detection enable
loopback-detection per-vlan enable
loopback-detection action shutdown
#
interface Ethernet1/0/24
port link-mode bridge
port link-type hybrid
port hybrid vlan 1 untagged
loopback-detection enable
loopback-detection per-vlan enable
loopback-detection action shutdown
#
interface GigabitEthernet1/0/25
port link-mode bridge
#
interface GigabitEthernet1/0/26
port link-mode bridge
#
interface GigabitEthernet1/0/27
port link-mode bridge
#
interface GigabitEthernet1/0/28
port link-mode bridge
#
load xml-configuration
#
load tr069-configuration
#
user-interface aux 0
user-interface vty 0 15
#
return
[H3C]
[H3C]
(0)
最佳答案
参考案例
· 三台设备Device A、Device B和Device C组成一个物理上的环形网络。
· 通过在Device A上配置环路检测功能,使系统能够自动关闭Device A上出现环路的端口,并通过打印日志信息来通知用户检查网络。
# 创建VLAN 100,并全局使能该VLAN内的环路检测功能。
[DeviceA] vlan 100
[DeviceA–vlan100] quit
[DeviceA] loopback-detection global enable vlan 100
# 配置端口GigabitEthernet1/0/1和GigabitEthernet1/0/2为Trunk类型,并允许VLAN 100通过。
[DeviceA] interface gigabitethernet 1/0/1
[DeviceA-GigabitEthernet1/0/1] port link-type trunk
[DeviceA-GigabitEthernet1/0/1] port trunk permit vlan 100
[DeviceA-GigabitEthernet1/0/1] quit
[DeviceA] interface gigabitethernet 1/0/2
[DeviceA-GigabitEthernet1/0/2] port link-type trunk
[DeviceA-GigabitEthernet1/0/2] port trunk permit vlan 100
[DeviceA-GigabitEthernet1/0/2] quit
# 全局配置环路检测的处理模式为Shutdown模式。
[DeviceA] loopback-detection global action shutdown
# 配置环路检测的时间间隔为35秒。
[DeviceA] loopback-detection interval-time 35
# 创建VLAN 100。
[DeviceB] vlan 100
[DeviceB–vlan100] quit
# 配置端口GigabitEthernet1/0/1和GigabitEthernet1/0/2为Trunk类型,并允许VLAN 100通过。
[DeviceB] interface gigabitethernet 1/0/1
[DeviceB-GigabitEthernet1/0/1] port link-type trunk
[DeviceB-GigabitEthernet1/0/1] port trunk permit vlan 100
[DeviceB-GigabitEthernet1/0/1] quit
[DeviceB] interface gigabitethernet 1/0/2
[DeviceB-GigabitEthernet1/0/2] port link-type trunk
[DeviceB-GigabitEthernet1/0/2] port trunk permit vlan 100
[DeviceB-GigabitEthernet1/0/2] quit
# 创建VLAN 100。
[DeviceC] vlan 100
[DeviceC–vlan100] quit
# 配置端口GigabitEthernet1/0/1和GigabitEthernet1/0/2为Trunk类型,并允许VLAN 100通过。
[DeviceC] interface gigabitethernet 1/0/1
[DeviceC-GigabitEthernet1/0/1] port link-type trunk
[DeviceC-GigabitEthernet1/0/1] port trunk permit vlan 100
[DeviceC-GigabitEthernet1/0/1] quit
[DeviceC] interface gigabitethernet 1/0/2
[DeviceC-GigabitEthernet1/0/2] port link-type trunk
[DeviceC-GigabitEthernet1/0/2] port trunk permit vlan 100
[DeviceC-GigabitEthernet1/0/2] quit
当配置完成后,系统在一个环路检测时间间隔内在Device A的端口GigabitEthernet1/0/1和GigabitEthernet1/0/2上都检测到了环路,于是将这两个端口自动关闭,并打印了如下日志信息:
%Feb 24 15:04:29:663 2013 DeviceA LPDT/4/LPDT_LOOPED: Loopback exists on GigabitEthernet1/0/1.
%Feb 24 15:04:29:667 2013 DeviceA LPDT/4/LPDT_LOOPED: Loopback exists on GigabitEthernet1/0/2.
%Feb 24 15:04:44:243 2013 DeviceA LPDT/5/LPDT_RECOVERED: Loopback on GigabitEthernet1/0/1 recovered.
%Feb 24 15:04:44:248 2013 DeviceA LPDT/5/LPDT_RECOVERED: Loopback on GigabitEthernet1/0/2 recovered.
使用display loopback-detection命令可以查看Device A上环路检测的配置和运行情况:
# 显示Device A上环路检测的配置和运行情况。
[DeviceA] display loopback-detection
Loopback detection is enabled.
Loopback detection interval is 35 second(s).
No loopback is detected.
由此可见,Device A上并未显示在端口GigabitEthernet1/0/1和GigabitEthernet1/0/2上检测到环路,这是由于环路检测功能运行在Shutdown模式下,端口GigabitEthernet1/0/1和GigabitEthernet1/0/2上出现环路后均已被自动关闭,因此这两个端口上的环路已消除。此时,使用display interface命令分别查看Device A上端口GigabitEthernet1/0/1和GigabitEthernet1/0/2的状态信息:
# 显示Device A上端口GigabitEthernet1/0/1的状态信息。
[DeviceA] display interface gigabitethernet 1/0/1
GigabitEthernet1/0/1 current state: DOWN (Loopback detection down)
...
# 显示Device A上端口GigabitEthernet1/0/2的状态信息。
[DeviceA] display interface gigabitethernet 1/0/2
GigabitEthernet1/0/2 current state: DOWN (Loopback detection down)
...
由此可见,端口GigabitEthernet1/0/1和GigabitEthernet1/0/2均已被环路检测模块自动关闭。
(0)
这边我命令没有这条loopback-detection global enable vlan 100 只有loopback-detection enable
您好,升级下版本再看看
(0)
我这的命令和知了社区的命令不一样没有globle
我这的命令和知了社区的命令不一样没有globle
环路检测和stp功能只能开启其中一个
(0)
你这发的配置STP是开启的呀
关了,全局关了无效,我把1口和2口短接。这边还是UP的
你这发的配置STP是开启的呀
亲~登录后才可以操作哦!
确定你的邮箱还未认证,请认证邮箱或绑定手机后进行当前操作
举报
×
侵犯我的权益
×
侵犯了我企业的权益
×
抄袭了我的内容
×
原文链接或出处
诽谤我
×
对根叔社区有害的内容
×
不规范转载
×
举报说明
这边我命令没有这条loopback-detection global enable vlan 100 只有loopback-detection enable