配置HUAWEI交换机S1720、S2700、S5700、S6720等型号设备的snmp v3配置

注:此配置来源自官方配置文档

操作步骤

  1. 配置交换机的接口IP地址,使其和网管站之间路由可达

    (图1)

  2. # 按图1所示,配置交换机的接口IP地址。

    <HUAWEI> system-view
    [HUAWEI] sysname Switch
    [Switch] vlan 100
    [Switch-vlan100] quit
    [Switch] interface gigabitethernet 0/0/1
    [Switch-GigabitEthernet0/0/1] port link-type hybrid
    [Switch-GigabitEthernet0/0/1] port hybrid pvid vlan 100
    [Switch-GigabitEthernet0/0/1] port hybrid untagged vlan 100
    [Switch-GigabitEthernet0/0/1] quit
    [Switch] interface vlanif 100
    [Switch-Vlanif100] ip address 10.1.2.1 24
    [Switch-Vlanif100] quit
  3. 配置交换机的SNMP版本为SNMPv3
    [Switch] snmp-agent sys-info version v3
  4. 配置访问权限

    # 配置ACL,使NMS2可以管理交换机,NMS1不允许管理交换机。

    [Switch] acl 2001
    [Switch-acl-basic-2001] rule 5 permit source 10.1.1.2 0.0.0.0
    [Switch-acl-basic-2001] rule 6 deny source 10.1.1.1 0.0.0.0
    [Switch-acl-basic-2001] quit

    # 配置MIB视图。

    [Switch] snmp-agent mib-view included isoview iso

    # 配置用户组。

    [Switch] snmp-agent group v3 admin privacy write-view isoview acl 2001 

    # 配置用户。

    [Switch] snmp-agent usm-user v3 nms2-admin group admin

    # 对用户的数据进行认证,认证密码为Authe@1234。

    [Switch] snmp-agent usm-user v3 nms2-admin authentication-mode sha
    Please configure the authentication password (8-64)
    Enter Password: //输入认证密码,本例的认证密码为:Authe@1234。
    Confirm Password: //输入认证密码,本例的认证密码为:Authe@1234。

    # 对用户的数据进行加密,加密密码为Priva@1234。

    [Switch] snmp-agent usm-user v3 nms2-admin privacy-mode aes128
    Please configure the privacy password (8-64)
    Enter Password: //输入加密密码,本例的加密密码为:Priva@1234。
    Confirm Password: //输入加密密码,本例的加密密码为:Priva@1234。
  5. 配置告警主机
    [Switch] snmp-agent target-host trap address udp-domain 10.1.1.2 params securityname nms2-admin v3 privacy
  6. 配置设备管理员联系方式
    [Switch] snmp-agent sys-info contact call Operator at 010-12345678
  7. 配置网管站

    在使用SNMPv3版本的NMS上需要设置用户名,选择安全级别。根据不同的安全级别,需要分别设置认证方式、认证密码、加密方式、加密密码等。网管的配置请根据采用的网管产品参考对应的网管配置手册。配置网管站

  8. 验证配置结果

    配置完成后,可以执行下面的命令,检查配置内容是否生效。

    # 查看SNMP版本。
    
    [Switch] display snmp-agent sys-info version
    SNMP version running in the system:
    SNMPv3
    # 查看用户组信息。 [Switch] display snmp-agent group admin
    Group name: admin
    Security model: v3 AuthPriv
    Readview: ViewDefault
    Writeview: isoview
    Notifyview :<no specified>
    Storage-type: nonVolatile
    Acl:2001
    # 查看MIB视图。 [Switch] display snmp-agent mib-view viewname isoview
    View name:isoview
    MIB Subtree:iso
    Subtree mask:FC(Hex)
    Storage-type: nonVolatile
    View Type:included
    View status:active
    # 查看告警的目标主机。 [Switch] display snmp-agent target-host
    Target-host NO. 1
    -----------------------------------------------------------
    IP-address : 10.1.1.2
    Source interface : -
    VPN instance : -
    Security name : nms2-admin
    Port : 162
    Type : trap
    Version : v3
    Level : Privacy
    NMS type : NMS
    With ext-vb : No
    -----------------------------------------------------------
    # 配置设备管理员联系方式。 [Switch] display snmp-agent sys-info contact
    The contact person for this managed node:
    call Operator at 010-12345678

    配置文件

    Switch的配置文件

    #
    sysname Switch
    #
    vlan batch 100
    #
    acl number 2001
    rule 5 permit source 10.1.1.2 0
    rule 6 deny source 10.1.1.1 0
    #
    interface Vlanif100
    ip address 10.1.2.1 255.255.255.0
    #
    interface GigabitEthernet0/0/1
    port link-type hybrid
    port hybrid pvid vlan 100
    port hybrid untagged vlan 100
    #
    snmp-agent
    snmp-agent local-engineid800007DB0300259E0370C3
    snmp-agent sys-info contact call Operator at 010-12345678
    snmp-agent sys-info version v3
    snmp-agent group v3 admin privacy write-view isoview acl 2001
    snmp-agent target-host trap address udp-domain 10.1.1.2 params securityname nms2-admin v3 privacy
    snmp-agent mib-view included isoview iso
    snmp-agent usm-user v3 nms2-admin
    snmp-agent usm-user v3 nms2-admin group admin
    snmp-agent usm-user v3 nms2-admin authentication-mode sha cipher %^%#odaJ7R)/O7k$pwQx0qfD0\`u*'GI1(|;ZQXHtzrN%^%#
    snmp-agent usm-user v3 nms2-admin privacy-mode aes128 cipher %^%#f*K3/|E6d"SJes9)5naXPIqCTpR"}BUC=yW;!(f9%^%#
    #
    return

      

Cisco、HUAWEI、H3c、Firewall等设备配置snmp的更多相关文章

  1. CISCO、H3C、华为三层交换机端口二三层切换命令对比

    很多人都在问H3C是否有像CISCO三层端口切换类似的命令 switchport . 答案是肯定的.有.很多人都不知道. 其实无论是思科还是H3C还是华为他们都有这样的命令.但是在H3C和华为中不经常 ...

  2. cisco和h3c网络设备中一次性打印全部配置信息

    cisco的是全页打印配置信息的命令: #terminal length 0 #show run 华为和h3c的是: >screen-length 0 temporary >display ...

  3. HUAWEI,H3C 三层交换机 常用命令

    <HUAWEI> display ip interface brief,命令全局模式下可以查看所有端口下的ip地址及物理状态display this interface,命令用来显示当前接 ...

  4. H3C SNMP配置解析

    华为交换机snmp配置 snmp-agent                                           /使能snmp服务/snmp-agent local-engineid ...

  5. PatentTips - SNMP firewall

    BACKGROUND OF THE INVENTION [0001] The present invention relates to communications and, more particu ...

  6. snmp默认团体名/弱口令漏洞及安全加固

    0x00基础知识 简单网络管理协议(SNMP)被广泛用于计算机操作系统设备.网络设备等领域监测连接到网络上的设备是否有任何引起管理上关注的情况.在运行SNMP服务的设备上,若管理员配置不当运行默认团体 ...

  7. cisco和华为的设备如何设置命令不分页显示

    作者:邓聪聪 为了登陆设备查看信息没有分页,cisco和华为的设备上可以设置不分页显示 Cisco: > terminal length HUAWEI / H3C: > user-inte ...

  8. 关于cisco日志的配置

    实例: en conf t clock timezone GMT+8  #设置北京时间 exit clock set HH:MM:SS DAY MONTH YEAR  #设置当前时间 service ...

  9. Cisco interview

    A.  1. Self-introduction I am Yanlin He . I am a master degree candidate of school of infomation sci ...

随机推荐

  1. double类型转化成string

    public static void main(String[] args) { double priceWithFreight = 1200.5698d; System.out.println(pr ...

  2. django 之 常用命令

    Django 基本命令 本节主要是为了让您了解一些django最基本的命令,请尝试着记住它们,并且多多练习下 1. 新建一个 django project django-admin.py startp ...

  3. golang 热更新技巧 负载均衡才是正道啊

    golang plugin热更新尝试 - 呵大官人的鱼塘 - 开源中国 https://my.oschina.net/scgywx/blog/1796358 golang plugin热更新尝试 发布 ...

  4. 第12章—整合Redis

    spring boot 系列学习记录:http://www.cnblogs.com/jinxiaohang/p/8111057.html 码云源码地址:https://gitee.com/jinxia ...

  5. django博客项目7

    ................

  6. Django框架错误处理

    错误处理 在一些网站开发中.经常会需要捕获一些错误,然后将这些错误返回比较优美的界面,或者是将这个错误的请求做一些日志保存.那么我们本节就来讲讲如何实现. 常用的错误码: 404:服务器没有指定的ur ...

  7. MySQL数据库(5)- pymysql的使用、索引

    一.pymysql模块的使用 1.pymysql的下载和使用 之前我们都是通过MySQL自带的命令行客户端工具mysql来操作数据库,那如何在python程序中操作数据库呢?这就需要用到pymysql ...

  8. OpenSSL和https原理

    https原理: 浏览器请求服务端的公钥证书,server将注冊的证书发送给client. client向办法机构验证证书的合法性,证书 包含公钥,server网址及一些信息. 验证完成,client ...

  9. TimeQuest学习总结

    1. 基本时钟约束:creat_clock 2. 生成时钟约束:creat_generated_clock 3. I/O输入输出约束:(1)纯组合逻辑:set_max_delay & set_ ...

  10. vue生命周期以及vue的计算属性

    一.Vue生命周期(vue实例从创建到销毁的过程,称为生命周期,共有八个阶段) 1.beforeCreate :在实例初始化之后,数据观测 (data observer) 和 event/watche ...