华为交换机telnet配置和端口防环网

telnet server en/部分交换机用这个telnet server-source all-intface

user-interface vty 0 4
protocol inbound all
authentication-mode password
set authentication password cipher admin@123
user privilege level 15

华为交换机防环

1 stp mode stp 配置交换设备的STP工作模式
2 stp pathcost-standard legacy

# 配置端口路径开销计算方法为华为计算方法。

  stp bpdu-protection

配置SwitchB的BPDU保护功能。

interface gigabitethernet 0/0/2
[SwitchB-GigabitEthernet0/0/2] stp edged-port enable

配置端口为边缘端口。

4 interface gigabitethernet 0/0/2
loopback-detect enable
使能接口的Loopback Detection功能
 
5 配置Loopback Detection处理动作和环路消失后接口的自动恢复时间

interface gigabitethernet 0/0/2

loopback-detect action block

loopback-detect recovery-time 30

6查看配置结果

display loopback-detect

[SwitchA] display loopback-detect
Loopback-detect sending-packet interval: 5                                     
                                                                                
(A): Auto Loopback-detect                                                                                                           
-----------------------------------------------------------------                                                                   
Interface                     RecoverTime  Action     Status                                                                        
-----------------------------------------------------------------
GigabitEthernet0/0/1          30           block      NORMAL
-----------------------------------------------------------------

上述显示信息表明配置成功。

 

posted @ 2021-08-13 13:17  IT_农民  阅读(1633)  评论(0编辑  收藏  举报