配置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. Python_selenium中类函数模块的简单介绍

    Python_selenium中类函数模块的简单介绍 一.demo1.py的代码如下所示 #coding:utf-8 class ClassA(object): string = "这是一个 ...

  2. 033 调整数组顺序使奇数位于偶数前面(keep it up)

    剑指offer中题目:http://ac.jobdu.com/problem.php?pid=1516 题目描写叙述: 输入一个整数数组,实现一个函数来调整该数组中数字的顺序.使得全部的奇数位于数组的 ...

  3. 深入理解 Java 垃圾回收机制(转)

    一.垃圾回收机制的意义 Java语言中一个显著的特点就是引入了垃圾回收机制,使c++程序员最头疼的内存管理的问题迎刃而解,它使得Java程序员在编写程序的时候不再需要考虑内存管理.由于有个垃圾回收机制 ...

  4. Selenium Firefox 官方Webdriver -- Geckodriver 下载地址

    Selenium Firefox 官方Webdriver -- Geckodriver 下载地址 https://github.com/mozilla/geckodriver/releases

  5. Linux中搭建HTTP服务器

    1.配置IP [root@localhost~]# cat /etc/sysconfig/network-scripts/ifcfg-eth0 DEVICE=eth0 BOOTPROTO=static ...

  6. 巨蟒python全栈开发-第9天 初识函数

    一.今日主要内容总览(重点) 1.什么是函数? f(x)=x+1 y=x+1 函数是对功能或者动作的封装2.函数的语法和定义 def 函数名(): 函数体 调用:函数名()3.关于函数的返回值 ret ...

  7. hdu 1257 最少拦截系统【贪心 || DP——LIS】

    链接: http://acm.hdu.edu.cn/showproblem.php?pid=1257 http://acm.hust.edu.cn/vjudge/contest/view.action ...

  8. Scala 中我们长见到=> 解析下

    =>这符号其实是映射转化的意思,个人理解,可能不准确, var increase = (x: Int) => x + 1 increase(10) res0: Int = 11 意思就是你 ...

  9. ORA-08002: sequence TESTTABLE1_ID_SEQ.CURRVAL is not yet defined in this session (未完全解决)

    说明: 断开连接后 重新连接执行序列号当前值查找 会报错. 解决方法一:先查询序列号下一个值 SELECT testTable1_ID_SEQ.nextval from dual;

  10. Ad Exchange

    品友互动-基于大数据技术的人工智能决策平台 http://www.ipinyou.com.cn/about?flag=milestones