配置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. python3----练习题(过滑块验证)

    # 导入模块 from selenium import webdriver from selenium.webdriver import ActionChains from selenium.webd ...

  2. 报错 findMergedAnnotation activemq

    springmvc 集成activemq引入activemq-all-5.14.4有冲突 springmvc 4.2.9集成activemq-5.14.4时报错,错误信息如下 NoSuchMethod ...

  3. ASP.NET MVC 数据库依赖缓存

    ASP.NET MVC 数据库依赖缓存   问题背景 最近做一个非常简单的功能,就是使用ajax请求的方式从服务端请求一段下拉表的数据. 以前也有做过这个功能,只不过这次做这个功能的时候冒出了一个想法 ...

  4. Linux shell 脚本中, $@ 和$# 分别是什么意思?

    转自:https://zhidao.baidu.com/question/412833470.html $@:表示所有脚本参数的内容 $#:表示返回所有脚本参数的个数. 示例:编写如下shell脚本, ...

  5. cannot be cast to javax.servletFilter

    java.lang.ClassCastException: org.springframework.web.filter.CharacterEncodingFilter cannot be cast ...

  6. python中的URL编码和解码

    python中的URL编码和解码:test.py # 引入urllib的request模块 import urllib.request url = 'https://www.douban.com/j/ ...

  7. Python迭代对象与迭代器

    一.迭代对象 1.概念 迭代对象:可以直接作用于for循环的对象统称为可迭代对象:Iterable. 2.可以直接作用于for循环的数据类型 (1)集合类数据类型,如list, tuple, dict ...

  8. Linux(1)- 服务器核心知识、Linux入门、VMware与centeos安装、远程连接linux、linux基本命令使用

    一.服务器核心知识 1.电脑和电脑的硬件组成 现在的人们几乎无时无刻不在使用着电脑!不管是桌上型电脑(桌机).笔记型电脑(笔电).平板电脑,还是智慧型手机等等,这些东西都算是电脑.虽然接触这么多,但是 ...

  9. JavaScript-4.2函数,变量作用域---ShinePans

    <html> <head> <meta http-equiv="content-type" content="text/html;chars ...

  10. 003-主流区块链技术特点及Hyperledger Fabric V1.0版本特点

    一.Hyperledger fabric V1.0 架构 1.逻辑架构: 2.区块链网络 3.运行时架构 二.架构总结 1.架构要点 分拆Peer的功能,将Blockchain的数据维护和共识服务进行 ...