snmp配置方法哈
网络管理和监控配置指导-SNMP配置

目录1 SNMP配置.........................................................................................................................................1-11.1 SNMP简介.........................................................................................................................................1-11.1.1 SNMP的工作机制...................................................................................................................1-11.1.2 SNMP的协议版本...................................................................................................................1-11.1.3 MIB简介..................................................................................................................................1-21.2 配置SNMP基本参数..........................................................................................................................1-21.3 配置SNMP日志.................................................................................................................................1-41.3.1 SNMP日志介绍.......................................................................................................................1-41.3.2 开启SNMP日志功能...............................................................................................................1-41.4 配置SNMP Trap................................................................................................................................1-51.4.1 开启Trap功能..........................................................................................................................1-51.4.2 配置Trap报文发送参数...........................................................................................................1-61.5 SNMP显示和维护..............................................................................................................................1-71.6 SNMP v1/v2c典型配置举例...............................................................................................................1-81.7 SNMP v3典型配置举例....................................................................................................................1-91.8 SNMP日志典型配置举例.................................................................................................................1-102 MIB风格配置......................................................................................................................................2-12.1 设置MIB风格.....................................................................................................................................2-12.2 MIB显示和维护..................................................................................................................................2-11 SNMP配置1.1 SNMP简介SNMP(Simple Network Management Protocol,简单网络管理协议)是网络中管理设备和被管理设备之间的通信规则,它定义了一系列消息、方法和语法,用于实现管理设备对被管理设备的访问和管理。
SNMP的配置

一、在思科的路由器上配置SNMP(启用SNMP代理)、开启SNMP服务5、案例:配置网管工作站接收被管设备的陷阱消息(1)启用陷阱消息接收器----打开162端口(2)配置团体名(3)在snmp代理上配置陷阱消息snmp-server host 192.168.4.231 sdxh #配置陷阱消息的目标snmp-server enable traps config #配置启用trap 配置事件(注:只是其中的一种消息类型,可以配置多个)(4)效果二、在思科交换机上配置SNMP1、配置管理地址三、在思科ASA上启用SNMP1、防火墙只支持只读SNMP2、SNMPv3支持更强的认证:用户名、认证密钥、加密密钥四、在Windows Server上启用SNMP在Linux中启用SNMP五、五、在1、yum仓库的配置(以本地光盘为yum安装源)mount /dev/cdrom /media/cdrom/rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release 导入签名密钥1)、vi /etc/yum.repos.d/rhel6.repo[rhel-source] #仓库的名称name=Red Hat Enterprise Linux $releasever - $basearch - Source #描述baseurl=file:///media/cdrom #位置enabled=1 #启用仓库gpgcheck=1 #启用签名检查gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release #签名密钥3)、相关软件包将snmp服务设为开机自动启动:修改允许查看的MIB库信息87 view all included .1 8091 view mib2 included .dod.internet.mgmt.mib-2 fc 设置团体名的权限(在文件的结尾)snmpwalk -v 2c 192.168.4.213 -c sdxh systemsnmpwalk -v 2c 192.168.4.254 -c sdxh ifDescr.1snmpnetstat -v 2c -c sdxh -Ca -Cp tcp 192.168.4.213 #查看tcp连接启用SNMP-V3:3、【补充】Setting Up SNMPThis HowTo will explain how to install and configure the Net-SNMP agent. At time of writing, the latest version available is 5.4 (published on 12/06/2006).Getting Net-SNMP binariesDepending on your operating system, you'll find packages or tarballs to install Net-SNMP :LinuxUsually every Linux distribution comes with Net-SNMP packages :RedHat / Fedora : install the net-snmp, net-snmp-libs and net-snmp-utils packagesDebian / Ubuntu: install the libsnmp-base, libsnmp5, snmp and snmpd packagesSuSE : install the net-snmp packageGentoo : simply emerge the net-snmp ebuildMandriva : install the libnet-snmp5, net-snmp and net-snmp-utils packages.agentaddress 10.20.30.40:10000You can also make it listens on TCP, which is supported by Cactiagentaddress tcp:161The “tcp” keyword can then be used in Cacti :For those who want some more security, you can use the SNMP version 3 protocol, with MD5 or SHA hashing:createUser frederic MD5 mypassphrase DESgroup groupv3 usm fredericview all included .iso 80access groupv3 "" any auth exact all all allThis creates a user “frederic” whose password is “mypassphrase”. To test it:# snmpget -v 3 -l AuthNoPriv -u frederic -A mypassphrase 10.50.80.45 sysName.0SNMPv2-MIB::sysName.0 = STRING: cyclopesIn Cacti, add your device, choose SNMP version 3, and fill the username and password fields:Now that you're done with access control, add these 2 lines in snmpd.conf to indicate the location and contact name of your device:syslocation Bat. C2syscontact someone@They will then appear in Cacti management interface :Some OIDs return a unit, eg ”-153.1 dBm”.It's a safe idea to turn this off, by adding this to snmpd.conf:dontPrintUnits trueNext step is to graph filesystems in Cacti; the easyest way is to add this line in snmpd.conf:includeAllDisksWhen you'll run the “ucd/net - Get Monitored Partitions” Data Query, all the mounted filesystems will show up:If you want a filesystem not to be listed here, add this line to snmpd.conf:ignoredisk /dev/rdsk/c0t2d0Unfortunatly, some older versions of Net-SNMP do not fully work with the includeAllDisks keywordYou'll then have to list explicitly all filesystems you want to graph:disk /disk /usrdisk /vardisk /oracleYou can also specify NFS mount points.Please note that the Net-SNMP agent can only report filesystems which where mounted before its start.If you manually mount filesystems later, you'll have to reload the Net-SNMP agent (send the HUP signal).You can also graph processes, by adding this to snmpd.conf:proc httpdThe result will be accessible under the ucdavis.prTable.prEntry tree:prCount, number of current processes running with the name in questionprNames, the process name you're counting.In our example, the number of Apache processes will be available under the .1.3.6.1.4.1.2021.2.1.5 OID Some useful mib modules are:mibII/mta_sendmail, to graph MTA (Sendmail, Postfix, etc.) statisticsdiskio, to enable to graph I/O statisticsucd-snmp/lmSensors, for hardware monitoring (Linux and Solaris only)Mib modules can be added like this:$ ./configure --with-mib-modules="module1 module2"To compile Net-SNMP and build a compressed archive, follow these steps:$ ./configure --with-your-options$ make# mkdir /usr/local/dist# make install prefix=/usr/local/dist/usr/local exec_prefix=/usr/local/dist/usr/local# cd /usr/local/dist# tar cvf /tmp/net-snmp-5.3.1-dist.tar usr# gzip /tmp/net-snmp-5.3.1-dist.tar# rm -rf /usr/local/distYou can then copy the /tmp/net-snmp-5.3.1-dist.tar.gz file to other servers, and uncompress it from the root directory (everything will get extracted to /usr/local).Test your configurationOnce Net-SNMP is configured and started, here's how to test it:$ snmpwalk -v 1 -c public localhost .1.3.6.1.2.1.1.1.0SNMPv2-MIB::sysDescr.0 = STRING: Linux cronos 2.4.28 #2 SMP ven jan 14 14:12:01 CET 2005 i686This basic query shows that your Net-SNMP agent is reachable.You can even query which Net-SNMP version is running on a host:$ snmpwalk -v 1 -c public localhost .1.3.6.1.4.1.2021.100.2.0UCD-SNMP-MIB::versionTag.0 = STRING: 5.2.1.2An answer like that one$ snmpwalk -v 1 -c foo localhost .1.3.6.1.2.1.1.1.0Timeout: No Response from localhostindicates that either the agent is not started, or that the community string is incorrect, or that this device is unreachable. Check your community string, add firewall rules if necessary, etc.If using SNMP version 3, specifying an unknown user will result in this error message :$ snmpget -v 3 -l AuthNoPriv -u john -A mypassphrase 10.50.80.45 sysName.0snmpget: Unknown user nameAn incorrect passphrase will result in this error message :$ snmpget -v 3 -l AuthNoPriv -u frederic -A badpassphrase 10.50.80.45 sysName.0snmpget: Authentication failure (incorrect password, community or key)This query will show you what filesystems are mounted:$ snmpwalk -v 1 -c public localhost .1.3.6.1.4.1.2021.9.1.2UCD-SNMP-MIB::dskPath.1 = STRING: /UCD-SNMP-MIB::dskPath.2 = STRING: /BBUCD-SNMP-MIB::dskPath.3 = STRING: /dev/shmIf the answer is empty, usually it means the includeAllDisks is not supported by your Net-SNMP agent (you'll have to list each filesystem you want to graph as explained in previous chapter).Finally, this query will you display your network interfaces:$ snmpwalk -v 1 -c public localhost .1.3.6.1.2.1.2.2.1.2IF-MIB::ifDescr.1 = STRING: loIF-MIB::ifDescr.2 = STRING: eth0IF-MIB::ifDescr.3 = STRING: eth1Extending the SNMP AgentA great functionnality of Net-SNMP is that you can “extend” it.Let's run the /tmp/foo.sh script:$ /tmp/foo.sh -arg1123Now put this in snmpd.conf:exec foo /bin/sh /tmp/foo.sh -arg1The result of your script will be accessible under the ucdavis.extTable.extEntry tree: * output of the script :ucdavis.extTable.extEntry.extOutput * exit status: ucdavis.extTable.extEntry.extResult * command:ucdavis.extTable.extEntry.extCommandYou can check the result with this SNMP query:$ snmpwalk -v 1 -c public localhost .1.3.6.1.4.1.2021.8.1UCD-SNMP-MIB::extIndex.1 = INTEGER: 1UCD-SNMP-MIB::extNames.1 = STRING: fooUCD-SNMP-MIB::extCommand.1 = STRING: /bin/sh /tmp/foo.sh -arg1UCD-SNMP-MIB::extResult.1 = INTEGER: 0UCD-SNMP-MIB::extOutput.1 = STRING: 123UCD-SNMP-MIB::extErrFix.1 = INTEGER: 0UCD-SNMP-MIB::extErrFixCmd.1 = STRING:extOutput translates to .1.3.6.1.4.1.2021.8.1.101 As “foo” is our first exec directive, add .1 at the end of the OID.In Cacti, use the “SNMP - Generic OID Template” like this:Voila! Result of the /tmp/foo.sh script is now graphed in Cacti.Now let's run this second script, which returns more than one result:$ /tmp/bar.sh456789It returns two values, one per line (this is important).Another way to call scripts from snmpd.conf is by specifying an OID, like this:exec .1.3.6.1.4.1.2021.555 /bin/sh /tmp/bar.shRun this query:$ snmpwalk -v 1 -c public localhost .1.3.6.1.4.1.2021.555UCD-SNMP-MIB::ucdavis.555.1.1 = INTEGER: 1UCD-SNMP-MIB::ucdavis.555.2.1 = STRING: "/bin/sh"UCD-SNMP-MIB::ucdavis.555.3.1 = STRING: "/tmp/bar.sh"UCD-SNMP-MIB::ucdavis.555.100.1 = INTEGER: 0UCD-SNMP-MIB::ucdavis.555.101.1 = STRING: "456"UCD-SNMP-MIB::ucdavis.555.101.2 = STRING: "789"UCD-SNMP-MIB::ucdavis.555.102.1 = INTEGER: 0UCD-SNMP-MIB::ucdavis.555.103.1 = ""First line returned by the script will be available at .1.3.6.1.4.1.2021.555.101.1, second one at .1.3.6.1.4.1.2021.555.101.2, and so on.You can then use the “SNMP - Generic OID Template” in Cacti (one Data Source per OID).Let's say you want to count the number of entries in a log file. Add this to snmpd.conf:logmatch cactistats /home/cactiuser/cacti/log/cacti.log 120 SYSTEM STATS* the global count of matches will be available under the .1.3.6.1.4.1.2021.16.2.1.5.1 OID * the “Regex match counter” (which is reset with each file rotation) will be available under the .1.3.6.1.4.1.2021.16.2.1.7.1 OIDTo list all the available variables, use this query:$ snmpwalk -v 1 -c public localhost logMatchUCD-SNMP-MIB::logMatchMaxEntries.0 = INTEGER: 50UCD-SNMP-MIB::logMatchIndex.1 = INTEGER: 1UCD-SNMP-MIB::logMatchName.1 = STRING: cactistatsUCD-SNMP-MIB::logMatchFilename.1 = STRING: /home/cactiuser/cacti/log/cacti.logUCD-SNMP-MIB::logMatchRegEx.1 = STRING: SYSTEM STATSUCD-SNMP-MIB::logMatchGlobalCounter.1 = Counter32: 301634UCD-SNMP-MIB::logMatchGlobalCount.1 = INTEGER: 301634UCD-SNMP-MIB::logMatchCurrentCounter.1 = Counter32: 6692UCD-SNMP-MIB::logMatchCurrentCount.1 = INTEGER: 6692https:///autho/forms/CDClogin.html# 获取端口Index[root@redhat mibs]# snmpwalk -v 2c 192.168.4.254 -c sdxh 1.3.6.1.2.1.2.2.1.1 IF-MIB::ifIndex.1 = INTEGER: 1IF-MIB::ifIndex.2 = INTEGER: 2IF-MIB::ifIndex.3 = INTEGER: 3# 获取端口列表及其描述[root@redhat mibs]# snmpwalk -v 2c 192.168.4.254 -c sdxh 1.3.6.1.2.1.2.2.1.2 IF-MIB::ifDescr.1 = STRING: FastEthernet0/0# 以下为获取交换机第2个端口(INT E GE R: 2)所连接主机的M AC地址操作例子################################### 步骤 1 ##############################snmpwalk -v 2c -c Pub_PCon9-CT 192.168.232.25 1.3.6.1.2.1.17.4.3.1 | grep -w "INTEGER: 2"返回结果:SNMPv2-SMI::mib-2.17.4.3.1.2.0.7.233.63.136.173 = INTEGER: 2################################### 步骤 2 ############################### 从以上步骤1的返回结果获取粗体字"0.7.233.63.136.173" ,并执行以下命令snmpwalk -v 2c -c Pub_PCon9-CT 192.168.232.25 1.3.6.1.2.1.17.4.3.1 | grep "0.7.233.63.136.173" | grep "mib-2.17.4.3.1.1"返回结果:SNMPv2-SMI::mib-2.17.4.3.1.1.0.7.233.63.136.173 = Hex-STRING: 00 07 E9 3F 88 AD00 07 E9 3F 88 AD为交换机的第2口所连接的主机网卡地址################################### 步骤 3 ##############################snmpwalk -v 2c -c Pub_PCon9-CT 192.168.232.25 1.3.6.1.2.1.17.1.4.1.2 | grep -w "SNMPv2-SMI::mib-2.17.1.4.1.2.2"这里的红色2是步骤1的 INTEGER: 2返回结果:SNMPv2-SMI::mib-2.17.1.4.1.2.2 = INTEGER: 2步骤3中获取到的INTEGER: 2才是对应的IfIndexsnmpwalk -v 2c -c Pub_PCon9-CT 192.168.232.41 1.3.6.1.2.1.17.4.3.1.1snmpwalk -v 2c -c Pub_PCon9-CT 192.168.232.41 1.3.6.1.2.1.17.4.3.1.2snmpwalk -v 2c -c Pub_PCon9-CT 192.168.232.41 1.3.6.1.2.1.17.1.4.1.2/en/US/tech/tk648/tk362/technologies_tech_note09186a00801576ff.shtml在华为-H3C设备上启用SNMP服务六、六、在华为在线文档:实验环境:1、开启SNMP-Agent<Huawei> system-view[Huawei]interface g0/0/1[Huawei]acl 2001[Huawei]snmp-agent community write xinhua acl 20013、配置SNMP trap消息[AR2220]snmp-agent target-host trap-hostname mbxb address 192.168.4.231 udp-port 162 trap-paramsname sdxh4、保存配置七、在华为交换机上启用SNMP华为交换机的基本操作:[Huawei]interface vlanif 1[Huawei-Vlanif1]ip address 192.168.1.4 24[Huawei]interface GigabitEthernet0/0/1port link-type access #设置接口的类型-accessport default vlan 1 #设置默认VLANundo shutdown[Huawei]snmp-agent community read xinhua[Huawei]snmp-agent sys-info contact 12345[Huawei]snmp-agent sys-info location jinanshi[Huawei]snmp-agent sys-info version all[Huawei]snmp-agent target-host trap address udp-domain 192.168.1.230 udp-port 162 params securityname xinhua [Huawei]snmp-agent trap enable。
SNMP配置

SNMP配置58配置SNMP命令58.1配置相关命令SNMP配置包括以下相关命令:●no snmp-server●show snmp●snmp-server chassis-id●snmp-server community●snmp-server contact●snmp-server enable traps●snmp-server host●snmp-server location●snmp-server packetsize●snmp-server queue-length●snmp-server system-shutdown●snmp-server trap-source●snmp-server trap-timeout●snmp-server user●snmp-server group●snmp-server view●snmp-server if-index persist58.1.1no snmp-server要屏蔽设备SNMP代理功能,请执行全局配置命令no snmp-server。
no snmp-server【缺省设置】屏蔽SNMP代理功能【命令模式】全局配置模式【使用指南】该命令关闭设备支持的所有版本SNMP的代理服务。
【举例】下面的示例屏蔽SNMP代理服务:Ruijie(config)# no snmp-server58.1.2snmp-server chassis-id要指定SNMP的系统序列号,请执行全局配置命令snmp-server chassis-id。
该命令的no形式还原为初始值。
snmp-server chassis-id textno snmp-server chassis-id【参数说明】text :系统序列号的文本,可以使数字或字符。
【缺省设置】序列号缺省值是60FF60【命令模式】全局配置模式【使用指南】SNMP系统序列号一般使用机器的序列号,以便对设备进行识别。
锐捷snmp配置-案例

一、组网要求网管设备192.168.1.100可以对设备RSR路由器进行管理维护;二、组网拓扑三、配置要点1、配置ip,确保路由器和服务器之间三层可达2、设置认证名(Community)及访问权限(Read 或Write)3、配置SNMP 主机地址,并使能Agent 主动发送Trap 消息的功能4、设备上的共同体和网管设备上的共同体必须一致,才能正常管理设备。
四、配置步骤注意:配置之前建议使用Ruijie#show ip interface brief 查看接口名称,常用接口名称有FastEthernet(百兆)、GigabitEthernet(千兆)和TenGigabitEthernet(万兆)等等,以下配置以百兆接口为例。
步骤一、配置路由器的管理地址Ruijie>enableRuijie#configure terminalRuijie(config)#interface fastEthernet 0/0Ruijie(config-if-FastEthernet 0/0)#ip address 192.168.1.1 255.255.255.0Ruijie(config-if-FastEthernet 0/0)#exit步骤二、设置认证名(Community为ruijie)及访问权限(Write为可读写)Ruijie(config)#snmp community ruijie rw步骤三、配置SNMP 主机地址,并使能Agent 主动发送Trap 消息的功能Ruijie(config)#snmp host 192.168.1.253 traps version 2 ruijie 步骤四、保存配置Ruijie(config)#endRuijie#write ------>确认配置正确,保存配置确认配置正确,保存配置五、验证命令:Ruijie#show snmpChassis: 60FF600 SNMP packets input0 Bad SNMP version errors0 Unknown community name0 Illegal operation for community name supplied0 Encoding errors0 Number of requested variables0 Number of altered variables0 Get-request PDUs0 Get-next PDUs0 Set-request PDUs0 SNMP packets output0 Too big errors (Maximum packet size 1472)0 No such name errors0 Bad values errors0 General errors0 Response PDUs0 Trap PDUsSNMP global trap: disabledSNMP logging: disabledSNMP agent: enabled。
SNMP安装和配置详解

SNMP安装和配置详解以前公司的服务器没有好的监控,于是最近计划搞出来一个。
查了相关的资料之后,几乎所有的东西都要用到snmp协议。
由于网上的资料不是很全面,最后还是勉强原生的配置看懂的(这里不得不汗颜一下,英文太差坑自己啊!英文如果好的话就直接看配置吧),所以自己在这里总结一下,希望大家有所收获。
1.安装安装非常的简单yum install net-snmp*接着就是一路y,debian系列的用户请另寻方法2.配置默认的配置文件应该是etc下面的snmpd.conf这个文件一条简单的配置rocommunity public这就行了,接着就是启动命令,大家都懂得/etc/init.d/snmpd start方便下次开机也能启动chkconfig snmpd on如何测试安装成功呢1.看端口netstat -anp | grep snmp应该有相应的端口2.测试配置是否成功snmpwalk -v1 -cpublic localhost -m all这条命令如果说有相应的输出那么证明你配置成功了命令解释Snmpwalk用于获取所有的mib信息库(也就是主机的所有可获取的信息)-v1 表示snmp 版本1 版本2的话为2c-c public 表示共同体名(可以理解为密码)-m all 获取所有如果在其他的机子上获取的话就将localhost改为相应的ip地址,当然前提是要安装net-snmp-utils这个工具包,没有安装的话是找不到命令的。
以上就是一个简单的配置,但是这个配置很不明确,我不知道权限是怎么样分配的,如果是实现的话还行,但是要是作为生产环境的话不是很安全。
于是下面我做一个详细的配置上文件,并附上注释。
# source communitycom2sec notConfigUser localhost publiccom2sec notConfigUser 192.168.137.0/24 public#communityTosecrity 说白了就是映射将public映射到notConfigUser#localhost就是数据源localhost就是允许本机也可以写成ip网段,default表示全允许# groupName securityModel securityNamegroup notConfigGroup v1 notConfigUsergroup notConfigGroup v2c notConfigUser#将别名放大一个组里面(方面分配权限),中间指定snmp的版本# name incl/excl subtree mask(optional)view systemview included .1.3.6.1.2.1.1view systemview included .1.3.6.1.2.1.25.1.1#定义view组systemview include/exclude 包含或者是排除subtree 掩码Ps:关于苏北tree的概念你应该去查询一下linux OID的相关概念,如果你看了这里你应该明白,掩码的概念就和ip地址的的掩码概念差不多# group context sec.model sec.level prefix read write notif access notConfigGroup "" any noauth exact systemview none none 这里是授权的一个操作设置为只读模式write noif为写和更改前面的read为读选项至于其他的参数,我查了hen就也没有找到相应的结果。
如何配置windows下的snmp服务

如何配置windows下的snmp服务
Windows 系统下的snmp 服务配置分为两步,第一步是安装snmp 协议,第二步是指定snmp 团体名称和权限。
1 安装snmp 协议(以windows 2003 为例)
打开开始‐‐‐设置‐‐‐控制面板‐‐‐添加删除程序选择安装删除windows 组件
选择管理和监视工具,然后点击详细信息,选择简单网络管理协议
然后点确定进行安装即可。
2 配置团体名和权限
打开计算机管理‐‐‐服务‐‐‐选择snmp service 双击
在安全标签中点击添加,在团体权限中选择需要的权限,一般solarwinds 使用只读就可以了。
在团体名称中输入团体名称,这个团体名称就是snmp 安全连接字符串。
然后选择接受来自
任何主机的snmp 数据包即可(如果出于安全性考虑,可以手工添加solarwinds 服务器地址到这个列表)。
snmp协议security name

snmp协议security nameSNMP协议安全名SNMP(Simple Network Management Protocol)是一种网络管理协议,用于监控和管理网络设备。
它通过发送和接收消息来获取设备的状态信息和执行管理操作。
在SNMP协议中,安全名(security name)是用于身份验证和访问控制的重要参数。
本文将介绍SNMP协议中安全名的作用、常见的安全名的类型以及安全名的配置方法。
一、安全名的作用在SNMP协议中,安全名用于标识网络管理系统和被管理设备之间的身份。
它类似于用户名,用于验证管理系统对被管理设备的访问权限。
安全名的作用主要包括以下几个方面:1. 身份验证:管理系统在与被管理设备进行通信时,需要提供正确的安全名进行身份验证。
只有通过身份验证的管理系统才能获取设备的状态信息和执行管理操作。
2. 访问控制:被管理设备可以配置访问控制列表(ACL),来限制允许访问设备的管理系统。
设备会根据管理系统提供的安全名进行匹配,从而决定是否允许该管理系统进行访问。
3. 安全性保障:使用安全名可以增加SNMP协议的安全性。
通过合理配置安全名,可以防止未经授权的管理系统对设备进行非法操作,提高网络的安全性。
二、常见的安全名类型SNMP协议中常见的安全名类型包括:community字符串、用户安全参数(USM)和基于角色的安全名。
下面分别介绍这几种类型的安全名:1. community字符串:community字符串是一种简单的安全名类型,常用于早期版本的SNMP协议。
它是一个类似于密码的字符串,用于进行身份验证和访问控制。
但是,community字符串的安全性较低,容易被破解,因此在实际应用中逐渐不再使用。
2. 用户安全参数(USM):USM是较新版本的SNMP协议引入的安全机制,它使用用户名和密码进行身份验证。
用户名类似于安全名,而密码用于加密和解密消息。
USM提供了更高的安全性,广泛应用于现代的SNMP管理系统中。
华为设备SNMP网管配置

华为设备SNMP网管配置配置需求现有网络中网管NMS1和NMS2对网络中的设备进行监管。
由于网络规模较小,安全性较高等因素,在规划时配置设备使用SNMPv1版本于网管进行通信。
现在由于扩容需要,新增一台路由器,并由网管对其进行监管。
用户希望通过利用现有的网络资源对路由器进行监管。
为了使路由器出现故障时网管管理员能快速联系上被管理设备管理员,以便对故障进行定位和排除,故要求在设备上配置设备管理员的联系方法。
根据用户业务需要,限制网管仅可以管理路由器上的DNS节点。
图1 配置使用SNMPv1与网管通信组网图配置思路考虑到用户所在网络安全性较高,网络规模较小等因素,因此新增设备依然使用SNMPv1版本。
为减轻网管站的负担,选取NMS2来监管路由器,NMS1不监管路由器。
采用如下的配置思路:1.配置路由器的SNMP版本为SNMPv1。
2.配置用户访问权限,使NMS2可以管理路由器上DNS节点。
3.配置路由器的Trap功能,使路由器产生的告警能够发送至NMS2。
为了方便对告警信息进行定位,避免过多的无用告警对处理问题造成干扰,仅允许缺省打开的模块可以发送告警。
4.配置路由器管理员的联系方法,以便路由器出现故障时网管管理员能快速联系上就近的设备管理员,以便对故障进行快速定位和排除。
5.配置网管站(仅NMS2)。
配置方法1.配置路由器的IP地址和路由,使和网管站之间路由可达2.<Huawei> system-view3.[Huawei] sysname Router4.[Router] interface gigabitethernet 0/0/05.[Router-GigabitEthernet0/0/0] ip address 10.1.2.1 246.[Router-GigabitEthernet0/0/0] quit7.[Router] ospf8.[Router-ospf-1] area 09.[Router-ospf-1-area-0.0.0.0] network 10.1.2.0 0.0.0.25510.[Router-ospf-1-area-0.0.0.0] quit11.[Router-ospf-1] quit12.使能SNMP Agent13.[Router] snmp-agent14.配置Router的SNMP版本为SNMPv115.[Router] snmp-agent sys-info version v116.配置网管站的访问权限# 配置ACL,使NMS2可以管理Router,NMS1不允许管理Router。
- 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
- 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
- 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
SNMP服务器搭建
1 服务器端配置
本111服务器搭建基于Windows Server 2008 R2操作系统。
1.1 角色添加
打开服务器的“服务器管理器”,在“功能”选项里面点击“添加功能”,如图1 所示。在
弹出的“添加功能向导”对话框里面选择SNMP服务,单击下一步。后续操作按照默认选项即
可安装成功,为服务器添加了SNMP服务功能。
图1
1.2 服务器端SNMP服务设置
添加好SNMP服务功能后需要对服务器的SNMP服务进行一些配置才能正常使用,配置
SNMP服务参数是通过对“服务器管理器” “配置” “服务”选项里面的SNMP Service服务
进行设置来完成的。如图2。
图2
服务器的SNMP Service属性设置见图2所示。需要添加接受的社区名称与权限,并勾
选“接受来自任何主机的SNMP数据包”,如果只想让某一个客户端登录也可以手动指定接收
到主机列表。编辑完此项后服务器端配置完成。
2 客户机配置
客户端需要安装相应的SNMP软件才能连接SNMP服务器,下面演示在Windows 7中使
用Mib Browser软件来完成SNMP配置。
在SNMP协议属性设置中必须指定读写团体字(Read/Set community)设置,如图3。
其中,public与private为Mib Browser软件的默认设置,要求服务器端必须有这两个用户,
如果服务器端是其他用户名,则需要手动修改此参数。
图3
Windows Server 2008 R2使用10.205.60.150 IP地址,客户端连接后对其进行Walk操作
即可验证SNMP环境是否搭建成功,图4演示了Walk的结果,从获取的服务器主机名可以
看出,客户端已经成功获取了服务器的名称。
图4
图5中查询了服务器端的相应参数,说明客户端获取的信息是此服务器对应的内容,到
此基本的SNMP服务器与客户端配置完成。