当前位置:网站首页>【案例分享】网络环路检测基本功能配置
【案例分享】网络环路检测基本功能配置
2022-07-06 17:21:00 【微思xmws】
配置需求
三台设备Device A、Device B和Device C组成一个物理上的环形网络。
通过在Device A上配置环路检测功能,使系统能够自动关闭Device A上出现环路的端口,并通过打印日志信息来通知用户检查网络。
组网图
图1-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 3
(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] qui
(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] qui
验证配置
当配置完成后,系统在一个环路检测时间间隔内在Device A的端口GigabitEthernet1/0/1和GigabitEthernet1/0/2上都检测到了环路,于是将这两个端口自动关闭,并打印了如下日志信息:
[DeviceA]
%Feb 24 15:04:29:663 2013 DeviceA LPDT/4/LPDT_LOOPED: Loopback exists on GigabitEthernet1/0/1.
%Feb 24 15:04:29:665 2013 DeviceA LPDT/4/LPDT_VLAN_LOOPED: Loopback exists on GigabitEthernet1/0/1 in VLAN 100.
%Feb 24 15:04:29:667 2013 DeviceA LPDT/4/LPDT_LOOPED: Loopback exists on GigabitEthernet1/0/2.
%Feb 24 15:04:29:669 2013 DeviceA LPDT/4/LPDT_VLAN_LOOPED: Loopback exists on GigabitEthernet1/0/2 in VLAN 100.
%Feb 24 15:04:44:240 2013 DeviceA LPDT/5/LPDT_RECOVERED: Loopback on GigabitEthernet1/0/1 in VLAN 100 recovered.
%Feb 24 15:04:44:243 2013 DeviceA LPDT/5/LPDT_RECOVERED: Loopback on GigabitEthernet1/0/1 recovered.
%Feb 24 15:04:44:245 2013 DeviceA LPDT/5/LPDT_RECOVERED: Loopback on GigabitEthernet1/0/2 in VLAN 100 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均已被环路检测模块自动关闭。
end
边栏推荐
- 一行代码实现地址信息解析
- 【批處理DOS-CMD命令-匯總和小結】-字符串搜索、查找、篩選命令(find、findstr),Find和findstr的區別和辨析
- C9高校,博士生一作发Nature!
- Chapter 5 DML data operation
- Set (generic & list & Set & custom sort)
- ActiveReportsJS 3.1中文版|||ActiveReportsJS 3.1英文版
- Address information parsing in one line of code
- Zabbix 5.0:通过LLD方式自动化监控阿里云RDS
- Telerik UI 2022 R2 SP1 Retail-Not Crack
- 第五篇,STM32系统定时器和通用定时器编程
猜你喜欢
[software reverse automation] complete collection of reverse tools
随时随地查看远程试验数据与记录——IPEhub2与IPEmotion APP
《安富莱嵌入式周报》第272期:2022.06.27--2022.07.03
批量获取中国所有行政区域经边界纬度坐标(到县区级别)
Dr selection of OSPF configuration for Huawei devices
C9 colleges and universities, doctoral students make a statement of nature!
动态规划思想《从入门到放弃》
.class文件的字节码结构
「精致店主理人」青年创业孵化营·首期顺德场圆满结束!
Build your own website (17)
随机推荐
Provincial and urban level three coordinate boundary data CSV to JSON
OSPF configuration command of Huawei equipment
[Batch dos - cmd Command - Summary and Summary] - String search, find, Filter Commands (FIND, findstr), differentiation and Analysis of Find and findstr
[batch dos-cmd command - summary and summary] - string search, search, and filter commands (find, findstr), and the difference and discrimination between find and findstr
Threejs image deformation enlarge full screen animation JS special effect
mysql: error while loading shared libraries: libtinfo. so. 5: cannot open shared object file: No such
5种不同的代码相似性检测,以及代码相似性检测的发展趋势
mongodb客户端操作(MongoRepository)
动态规划思想《从入门到放弃》
Stm32f407 ------- SPI communication
Js+svg love diffusion animation JS special effects
Dell Notebook Periodic Flash Screen Fault
[Niuke classic question 01] bit operation
Activereportsjs 3.1 Chinese version | | | activereportsjs 3.1 English version
通过串口实现printf函数,中断实现串口数据接收
Data processing of deep learning
Attention SLAM:一种从人类注意中学习的视觉单目SLAM
New feature of Oracle 19C: automatic DML redirection of ADG, enhanced read-write separation -- ADG_ REDIRECT_ DML
pyflink的安装和测试
第七篇,STM32串口通信编程