交换机配置snmp/trap/静态路由/LLDP服务详细步骤/华为交换机忘记登录密码

以华为交换机为例

1、给交换机配置ip:

     <huawei>system-view

    [huawei]sysname switch  //修改名字

     //注:查看端口的状态,确保端口phy和Protocol属性分别为up,up.查看命令: display interface brief 

   /// [huawei]vlan 1

   [switch]interface vlan 1

   [switch-vlan1]ip address 192.168.2.50 255.255.0.0 //给接口添加ip和对应的掩码

   //注:要撤销该端口的ip配置,可执行:undo ip address

   [switch-vlan1]quit

   2、配置snmp

  [switch]snmp-agent sys-info version v1

[switch] acl 2001 //配置访问控制协议

[switch-acl-basic-2001 ]rule 5 permit source any //允许任何ip访问

[switch-acl-basic-2001]quit

[switch]snmp-agent mib-view include iso iso //添加mib节点

[switch]snmp-agent community write admin123 mib-view iso acl 2001 //配置团体名admin123,引用mib-view和acl

3、配置trap

[switch]snmp-agent trap enable

(Warning:All switches of SNMP trap/notification will be open. Continue? [Y/N]:y //打开交换机上所有的Trap开关。缺省情况下仅打开了部分告警开关,可通过display snmp-agent trap all命令查看)

[switch]snmp-agent target-host trap address udp-domain 10.1.2.1 params securityname admin123 //配置报告的主机.

4、查看配置的snmp

[switch]display snmp-agent sys-info version

5、取消配置的snmp命令:

[switch]undo snmp-agent

6、配置交换机的静态路由:用于不同网段的主机访问交换机的ip

[switch]ip route-static 0.0.0.0 0.0.0.0 192.168.121.50   //配置所有网段的ip(目标网址),子网掩码(目标网站的子网掩码),网关(当前交换机的网关)

配置华为交换机snmp也参考:https://support.huawei.com/enterprise/zh/doc/EDOC1100176501/7b5ff146

7、配置交换机的LLDP

[switch]lldp enable

8、查看配置的LLDP

[switch]display lldp neigbor brief

 

注:若要查看某个命令下有什么命令,可输入? 例如:[switch]display lldp ?

端口Vlan配置https://blog.csdn.net/m0_49686750/article/details/111076923

端口的种类:http://www.kstongxin.com/articles/jhjszd.html

数据链路层概述:https://www.kanzhun.com/jiaocheng/555617.html

新华三LLDP配置:http://www.h3c.com/cn/d_201906/1204625_30005_0.htm

新华三SNMP配置:https://www.h3c.com/cn/d_202105/1408171_30005_0.htm

华为交换机LLDP配置:https://support.huawei.com/enterprise/zh/doc/EDOC1000178160/2138220e

锐捷交换机配置:https://blog.csdn.net/weixin_34218579/article/details/93114554

                               https://www.ruijie.com.cn/fw/wt/35627/

LLDP邻居信息的oid:https://blog.csdn.net/NaXieNianWoMenYiQ/article/details/109215425 

                                 https://zhiliao.h3c.com/theme/details/582

华为交换机忘记console密码:https://zhidao.baidu.com/question/349809697.html

  • 3
    点赞
  • 26
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值