• 全部
  • 经验案例
  • 典型配置
  • 技术公告
  • FAQ
  • 漏洞说明
  • 全部
  • 全部
  • 大数据引擎
  • 知了引擎
产品线
搜索
取消
案例类型
发布者
是否解决
是否官方
时间
搜索引擎
匹配模式
高级搜索

接入交换机环路检测

2021-05-21提问
  • 1关注
  • 1收藏,2503浏览
粉丝:0人 关注:1人

问题描述:

不用生成树,怎么在接入交换机上配置环路检测,当接入交换机某几个端口环路后直接down掉。

组网及组网描述:


最佳答案

粉丝:0人 关注:1人

1.5  环路检测典型配置举例

1. 组网需求

·            三台设备Device A、Device B和Device C组成一个物理上的环形网络。

·            通过在Device A上配置环路检测功能,使系统能够自动关闭Device A上出现环路的端口,并通过打印日志信息来通知用户检查网络。

2. 组网图

图1-3 环路检测典型组网图

3. 配置步骤

(1)       配置Device A

# 创建VLAN 100,并全局开启该VLAN内的环路检测功能。

<DeviceA> system-view

[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

(2)       配置Device B

# 创建VLAN 100。

<DeviceB> system-view

[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

(3)       配置Device C

# 创建VLAN 100。

<DeviceC> system-view

[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

4. 验证配置

当配置完成后,系统在一个环路检测时间间隔内在Device A的端口GigabitEthernet1/0/1和GigabitEthernet1/0/2上都检测到了环路,于是将这两个端口自动关闭,并打印了如下日志信息:

[DeviceA]

%Feb 24 15:04:29:663 2013 DeviceA LPDT/4/LPDT_LOOPED:  A loop was detected on GigabitEthernet1/0/1.

%Feb 24 15:04:29:664 2013 DeviceA LPDT/4/LPDT_VLAN_LOOPED: A loop was detected on GigabitEthernet1/0/1 in VLAN 100.

%Feb 24 15:04:29:667 2013 DeviceA LPDT/4/LPDT_LOOPED: A loop was detected on GigabitEthernet1/0/2.

%Feb 24 15:04:29:668 2013 DeviceA LPDT/4/LPDT_VLAN_LOOPED: A loop was detected on GigabitEthernet1/0/2 in VLAN 100.

%Feb 24 15:04:44:243 2013 DeviceA LPDT/5/LPDT_VLAN_RECOVERED: A loop was removed on GigabitEthernet1/0/1 in VLAN 100.

%Feb 24 15:04:44:243 2013 DeviceA LPDT/5/LPDT_RECOVERED: All loops were removed on GigabitEthernet1/0/1.

%Feb 24 15:04:44:248 2013 DeviceA LPDT/5/LPDT_VLAN_RECOVERED: A loop was removed on GigabitEthernet1/0/2 in VLAN 100.

%Feb 24 15:04:44:248 2013 DeviceA LPDT/5/LPDT_RECOVERED: All loops were removed on GigabitEthernet1/0/2.

使用display loopback-detection命令可以查看Device A上环路检测的配置和运行情况:

# 显示Device A上环路检测的配置和运行情况。

[DeviceA] display loopback-detection

Loop detection is enabled.

Loop detection interval is 35 second(s).

Loop is detected on following interfaces:

 Interface                    Action mode     VLANs

 GigabitEthernet1/0/1         Shutdown        100

 GigabitEthernet1/0/2         Shutdown        100

由此可见,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均已被环路检测模块自动关闭。

4 个回答
佚名 九段
粉丝:21人 关注:0人

loopback detection接口下配置

那是不是每个端口都要配置?可以全局模式配置么?

一营长大彪 发表时间:2021-05-21

可以全局配置

佚名 发表时间:2021-05-24
Xcheng 九段
粉丝:121人 关注:3人

要看具体型号,可配置环路检测功能来实现。

但这个功能不是所有设备都支持。


由于没产品和软件版本信息,请参考S7500系列v7环路检测配置指导文档

09-环路检测配置-新华三集团-H3C

粉丝:219人 关注:0人

您好,参考

 loopback-detection enable 

 loopback-detection action shutdown

粉丝:124人 关注:6人

您好,请知:

以下是环路检测配置的参考命令和配置举例:

[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.   //目前没有检测到环路


1. 组网需求

·            三台设备Device A、Device B和Device C组成一个物理上的环形网络。

·            通过在Device A上配置环路检测功能,使系统能够自动关闭Device A上出现环路的端口,并通过打印日志信息来通知用户检查网络。

2. 组网图

图1-3 环路检测典型组网图

3. 配置步骤

(1)       配置Device A

# 创建VLAN 100,并全局开启该VLAN内的环路检测功能。

<DeviceA> system-view

[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

(2)       配置Device B

# 创建VLAN 100。

<DeviceB> system-view

[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

(3)       配置Device C

# 创建VLAN 100。

<DeviceC> system-view

[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

4. 验证配置

当配置完成后,系统在一个环路检测时间间隔内在Device A的端口GigabitEthernet1/0/1和GigabitEthernet1/0/2上都检测到了环路,于是将这两个端口自动关闭,并打印了如下日志信息:

[DeviceA]

%Feb 24 15:04:29:663 2013 DeviceA LPDT/4/LPDT_LOOPED:  A loop was detected on GigabitEthernet1/0/1.

%Feb 24 15:04:29:664 2013 DeviceA LPDT/4/LPDT_VLAN_LOOPED: A loop was detected on GigabitEthernet1/0/1 in VLAN 100.

%Feb 24 15:04:29:667 2013 DeviceA LPDT/4/LPDT_LOOPED: A loop was detected on GigabitEthernet1/0/2.

%Feb 24 15:04:29:668 2013 DeviceA LPDT/4/LPDT_VLAN_LOOPED: A loop was detected on GigabitEthernet1/0/2 in VLAN 100.

%Feb 24 15:04:44:243 2013 DeviceA LPDT/5/LPDT_VLAN_RECOVERED: A loop was removed on GigabitEthernet1/0/1 in VLAN 100.

%Feb 24 15:04:44:243 2013 DeviceA LPDT/5/LPDT_RECOVERED: All loops were removed on GigabitEthernet1/0/1.

%Feb 24 15:04:44:248 2013 DeviceA LPDT/5/LPDT_VLAN_RECOVERED: A loop was removed on GigabitEthernet1/0/2 in VLAN 100.

%Feb 24 15:04:44:248 2013 DeviceA LPDT/5/LPDT_RECOVERED: All loops were removed on GigabitEthernet1/0/2.

使用display loopback-detection命令可以查看Device A上环路检测的配置和运行情况:

# 显示Device A上环路检测的配置和运行情况。

[DeviceA] display loopback-detection

Loop detection is enabled.

Loop detection interval is 35 second(s).

Loop is detected on following interfaces:

 Interface                    Action mode     VLANs

 GigabitEthernet1/0/1         Shutdown        100

 GigabitEthernet1/0/2         Shutdown        100

由此可见,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)

编辑答案

你正在编辑答案

如果你要对问题或其他回答进行点评或询问,请使用评论功能。

分享扩散:

提出建议

    +

亲~登录后才可以操作哦!

确定

亲~检测到您登陆的账号未在http://hclhub.h3c.com进行注册

注册后可访问此模块

跳转hclhub

你的邮箱还未认证,请认证邮箱或绑定手机后进行当前操作

举报

×

侵犯我的权益 >
对根叔社区有害的内容 >
辱骂、歧视、挑衅等(不友善)

侵犯我的权益

×

泄露了我的隐私 >
侵犯了我企业的权益 >
抄袭了我的内容 >
诽谤我 >
辱骂、歧视、挑衅等(不友善)
骚扰我

泄露了我的隐私

×

您好,当您发现根叔知了上有泄漏您隐私的内容时,您可以向根叔知了进行举报。 请您把以下内容通过邮件发送到zhiliao@h3c.com 邮箱,我们会尽快处理。
  • 1. 您认为哪些内容泄露了您的隐私?(请在邮件中列出您举报的内容、链接地址,并给出简短的说明)
  • 2. 您是谁?(身份证明材料,可以是身份证或护照等证件)

侵犯了我企业的权益

×

您好,当您发现根叔知了上有关于您企业的造谣与诽谤、商业侵权等内容时,您可以向根叔知了进行举报。 请您把以下内容通过邮件发送到 zhiliao@h3c.com 邮箱,我们会在审核后尽快给您答复。
  • 1. 您举报的内容是什么?(请在邮件中列出您举报的内容和链接地址)
  • 2. 您是谁?(身份证明材料,可以是身份证或护照等证件)
  • 3. 是哪家企业?(营业执照,单位登记证明等证件)
  • 4. 您与该企业的关系是?(您是企业法人或被授权人,需提供企业委托授权书)
我们认为知名企业应该坦然接受公众讨论,对于答案中不准确的部分,我们欢迎您以正式或非正式身份在根叔知了上进行澄清。

抄袭了我的内容

×

原文链接或出处

诽谤我

×

您好,当您发现根叔知了上有诽谤您的内容时,您可以向根叔知了进行举报。 请您把以下内容通过邮件发送到zhiliao@h3c.com 邮箱,我们会尽快处理。
  • 1. 您举报的内容以及侵犯了您什么权益?(请在邮件中列出您举报的内容、链接地址,并给出简短的说明)
  • 2. 您是谁?(身份证明材料,可以是身份证或护照等证件)
我们认为知名企业应该坦然接受公众讨论,对于答案中不准确的部分,我们欢迎您以正式或非正式身份在根叔知了上进行澄清。

对根叔社区有害的内容

×

垃圾广告信息
色情、暴力、血腥等违反法律法规的内容
政治敏感
不规范转载 >
辱骂、歧视、挑衅等(不友善)
骚扰我
诱导投票

不规范转载

×

举报说明