SNMP配置手册.doc_第1页
SNMP配置手册.doc_第2页
SNMP配置手册.doc_第3页
SNMP配置手册.doc_第4页
SNMP配置手册.doc_第5页
已阅读5页,还剩23页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

SNMP配置手册SNMP配置手册目 录1交换机部分11.1Cisco交换机11.1.1SNMP配置11.1.2TRAP配置11.1.3Syslog配置21.2华为交换机21.2.1SNMP配置21.2.2TRAP配置31.2.3Syslog配置31.3中兴交换机31.3.1SNMP配置41.3.2TRAP配置41.3.3Syslog配置42路由器部分52.1Cisco路由器52.1.1SNMP配置52.1.2TRAP配置52.1.3Syslog配置62.2华为路由器62.2.1SNMP配置62.2.2TRAP配置72.2.3Syslog配置73防火墙部分83.1Netscreen防火墙83.1.1SNMP配置83.1.2TRAP配置93.1.3Syslog配置103.2Cisco PIX防火墙103.2.1SNMP配置103.2.2TRAP配置113.2.3Syslog配置114服务器部分124.1LINUX服务器124.1.1准备工作124.1.2安装方法124.1.3配置SNMP文件124.1.4启动SNMP服务154.1.5验证SNMP服务154.2IBM服务器(AIX系统)154.2.1准备工作154.2.2安装方法154.2.3配置SNMP文件164.2.4启动SNMP服务164.2.5验证SNMP服务164.3HP服务器(HP-UX系统)164.3.1准备工作164.3.2安装方法174.3.3配置SNMP文件174.3.4启动SNMP服务184.3.5验证SNMP服务184.4SUN服务器(Solaris系统)184.4.1准备工作184.4.2安装方法184.4.3配置SNMP文件194.4.4启动SNMP服务194.4.5验证SNMP服务194.5Windows服务器(WIN2000、WIN2003等系统)204.5.1准备工作204.5.2安装方法204.5.3配置SNMP服务224.5.4启动SNMP服务235其他部分245.1F5负载均衡245.1.1SNMP配置245.1.2TRAP配置2525辽宁电力数据网网管SNMP配置手册1 交换机部分1.1 Cisco交换机使用以下配置命令前,均需要执行以下步骤:1 登陆交换机。(可以使用串口线直接连接,如果交换机配置有管理IP并且允许telnet登陆,则也可以通过telnet进行登陆。)2 输入enable命令进入特权模式。3 输入config terminal进行配置模式。使用完配置命令后,均需要执行以下步骤进行保存:1 输入end命令退出配置模式。2 copy running start保存配置文件。1.1.1 SNMP配置1配置snmp 只读communitysnmp-server community public ro 配置交换机的只读community为public2配置snmp 读写communitysnmp-server community public rw 配置交换机的读写community为public1.1.2 TRAP配置1配置交换机允许发送trapsnmp-server enable traps 2配置交换机接收trap的主机snmp-server host 10.238.18.17 traps public 指定交换机SNMP Trap的接收者为10.238.18.17,发送Trap时采用public作为字串1.1.3 Syslog配置1打开交换机的syslog功能logging on2. 直接配置相应的syslog发送到的接收主机,10.90.200.93为该主机的ip地址。logging 10.90.200.933配置发送syslog的主机格式类型。logging facility local4 4 选择发送warning以上级别的log信息。logging trap warnings1.2 华为交换机使用以下配置命令前,均需要执行以下步骤:1 登陆交换机。(可以使用串口线直接连接,如果交换机配置有管理IP并且允许telnet登陆,则也可以通过telnet进行登陆。)2 输入system命令进入配置模式。使用完配置命令后,均需要执行以下步骤进行保存:1 输入return命令退出配置模式。2 Save保存配置文件。1.2.1 SNMP配置1 启用SNMPsnmp-agent2 配置snmp协议的版本号snmp-agent sys-info version all上面的命令是指对SNMP V1、V2C、 V3都支持。3 配置snmp只读communitysnmp-agent community read public配置交换机的只读community为public4 配置snmp读写communitysnmp-agent community write public配置交换机的读写community为public1.2.2 TRAP配置1配置交换机允许发送trapsnmp-agent traps enable 2配置交换机接收trap的主机snmp-agent target-host trap address udp-domain 10.199.39.215 params securityname public指定交换机SNMP Trap的接收者为10.199.39.215(一般配置为采集机的IP),发送Trap时采用public作为字串1.2.3 Syslog配置1启用交换机的syslog功能info-center enable2. 指定接收syslog的主机,10.90.200.93为该主机的ip地址。info-center loghost 10.90.200.93 language English以上命令是配置10.90.200.93接收syslog,syslog的语言为英文。3 选择发送warning以上级别的syslog信息。info-center source default channel loghost log level warning1.3 中兴交换机使用以下配置命令前,均需要执行以下步骤:1.登陆交换机。(可以使用串口线直接连接,如果交换机配置有管理IP并且允许telnet登陆,则也可以通过telnet进行登陆。)2.输入enable命令进入特权模式。3.输入config terminal进行配置模式。使用完配置命令后,均需要执行以下步骤进行保存:1.输入end命令退出配置模式。2.write保存配置文件。1.3.1 SNMP配置1 配置snmp 的只读community snmp-server community public view test rosnmp-server view DefaultView system included snmp-server view AllView internet included snmp-server view test zxr10IPAddrTable included snmp-server view test zte included snmp-server view test mib-2 included1.3.2 TRAP配置1.配置交换机允许发送trapsnmp-server enable trap2配置交换机接收trap的主机snmp-server host 192.168.2.74 trap version 2c public 指定交换机SNMP Trap的接收者为192.168.2.74,发送Trap时采用public作为字串1.3.3 Syslog配置1打开交换机的syslog功能syslog on2. 直接配置相应的syslog发送到的接收主机,192.168.2.74为该主机的ip地址。syslog server 192.168.2.743.选择发送warning以上级别的log信息。syslog level warnings2 路由器部分在HP-UX 11i操作系统上,一般情况下,配置SNMP服务时,将需要修改SNMP团体名,不建议使用操作系统缺省的SNMP团体名。2.1 Cisco路由器使用以下配置命令前,均需要执行以下步骤:1 登陆路由器。(可以使用串口线直接连接,如果交换机配置有管理IP并且允许telnet登陆,则也可以通过telnet进行登陆。)2 输入enable命令进入特权模式。3 输入config terminal进行配置模式。使用完配置命令后,均需要执行以下步骤进行保存:1 输入end命令退出配置模式。2 copy running start保存配置文件。2.1.1 SNMP配置1配置snmp 只读communitysnmp-server community public ro 配置路由器的只读community为public2配置snmp 读写communitysnmp-server community public rw 配置路由器的读写community为public2.1.2 TRAP配置1配置路由器允许发送trapsnmp-server enable traps 2配置路由器接收trap的主机snmp-server host 10.238.18.17 traps public 指定路由器SNMP Trap的接收者为10.238.18.17,发送Trap时采用public作为字串2.1.3 Syslog配置1打开路由器的syslog功能logging on2. 直接配置相应的syslog发送到的接收主机,10.90.200.93为该主机的ip地址。logging 10.90.200.933配置发送syslog的主机格式类型。logging facility local4 4 选择发送warning以上级别的log信息。logging trap warnings2.2 华为路由器使用以下配置命令前,均需要执行以下步骤:1 登陆路由器。(可以使用串口线直接连接,如果交换机配置有管理IP并且允许telnet登陆,则也可以通过telnet进行登陆。)2 输入system命令进入配置模式。使用完配置命令后,均需要执行以下步骤进行保存:1 输入return命令退出配置模式。2 Save保存配置文件。2.2.1 SNMP配置1 启用SNMPsnmp-agent2 配置snmp协议的版本号snmp-agent sys-info version all上面的命令是指对SNMP V1、V2C、 V3都支持。3 配置snmp只读communitysnmp-agent community read public配置路由器的只读community为public4 配置snmp读写communitysnmp-agent community write public配置路由器的读写community为public2.2.2 TRAP配置1配置路由器允许发送trapsnmp-agent traps enable 2配置路由器接收trap的主机snmp-agent target-host trap address udp-domain 10.199.39.215 params securityname public指定路由器SNMP Trap的接收者为10.199.39.215(一般配置为采集机的IP),发送Trap时采用public作为字串2.2.3 Syslog配置1启用路由器的syslog功能info-center enable2. 指定接收syslog的主机,10.90.200.93为该主机的ip地址。info-center loghost 10.90.200.93 language English以上命令是配置10.90.200.93接收syslog,syslog的语言为英文。3 选择发送warning以上级别的syslog信息。info-center source default channel loghost log level warning3 防火墙部分3.1 Netscreen防火墙由于Netscreen防火墙的配置界面是以web方式进行的,故下面均以截图作为讲解基础,另外netscreen防火墙的单项配置如果一选择“APPLY“,则配置自动保存并且运行!3.1.1 SNMP配置选择ConfigurationReport SettingsSNMP点击“New Community”按钮,配置SNMP的只读community及接收主机。3.1.2 TRAP配置点击“Edit“,在Permissions选中”trap”3.1.3 Syslog配置选中SYSLOG,选中“Enable syslog messages”,输入接收主机的IP地址,选中“Event Log”复选框,选中前面的“enable”复选框,最后点击“Apply”按钮。3.2 Cisco PIX防火墙使用以下配置命令前,均需要执行以下步骤:1 登陆防火墙。(可以使用串口线直接连接,如果交换机配置有管理IP并且允许telnet登陆,则也可以通过telnet进行登陆。)2 输入enable命令进入特权模式。3 输入config terminal进行配置模式。使用完配置命令后,均需要执行以下步骤进行保存:3 输入end命令退出配置模式。4 copy running start保存配置文件。3.2.1 SNMP配置1配置snmp 只读communitysnmp-server community public ro 配置防火墙的只读community为public注:PIX防火墙只支持只读community,不支持读写读写community。2配置轮询SNMP的主机snmp-server host 10.199.39.111 poll注:以上为PIX OS 6。0以上版本命令。snmp-server host 10.199.39.111注:以上为PIX OS 6.0以下版本命令。3.2.2 TRAP配置1配置路由器允许发送trapsnmp-server enable traps 2配置交换机接收trap的主机snmp-server host 10.238.18.17 traps指定交换机SNMP Trap的接收者为10.238.18.17,发送Trap时采用public作为字串3.2.3 Syslog配置1打开交换机的syslog功能log logging on2. 直接配置相应的syslog发送到的接收主机,10.90.200.93为该主机的ip地址。logging host interface_name 10.90.200.933 选择发送warning以上级别的log信息。logging trap severity_level 54 服务器部分4.1 LINUX服务器4.1.1 准备工作linux安装系统盘或下载的软件包net-snmp-5.4.3.tar.gz4.1.2 安装方法安装SNMP相关软件包:net-snmp-5.4.3.tar.gz安装SNMP软件:# tar -zxvf /winshare/ net-snmp-5.4.3.tar.gz# cd ./ net-snmp-5.4.3#./configure prefix=/usr/local/snmp /配置 指定安装目录安装过程中,询问信息可直接回车,默认即可。# make# make install4.1.3 配置SNMP文件安装完成后,执行:# /usr/local/bin/snmpconfI can create the following types of configuration files for you.Select the file type you wish to create:(you can create more than one as you run this program) 1: snmpd.conf 2: snmptrapd.conf 3: snmp.confOther options: quitSelect File: 1在出现菜单中,选择1The configuration information which can be put into snmpd.conf is dividedinto sections. Select a configuration section for snmpd.confthat you wish to create: 1: Monitor Various Aspects of the Running Host 2: Agent Operating Mode 3: Extending the Agent 4: Access Control Setup 5: Trap Destinations 6: System Information SetupOther options: finishedSelect section: 4在出现菜单中,选择4Section: Access Control SetupDescription: This section defines who is allowed to talk to your running snmp agent.Select from: 1: a SNMPv3 read-write user 2: a SNMPv3 read-only user 3: a SNMPv1/SNMPv2c read-only access community name 4: a SNMPv1/SNMPv2c read-write access community nameOther options: finished, listSelect section: 3在出现菜单中,选择3,配置v1和v2c版本的只读community字。Configuring: rocommunityDescription: a SNMPv1/SNMPv2c read-only access community name arguments: community default|hostname|network/bits oidThe community name to add read-only access for: public提示输入只读community字,这里输入public。The hostname or network address to accept this community name from RETURN for all: 提示通过此community字访问设备的网段及主机地址,这里可以直接输入回车确认,表示全部。The OID that this community should be restricted to RETURN for no-restriction: 提示可以访问的OID范围,这里直接回车确认,表示全部OID。Finished Output: rocommunity public配置后返回菜单,输入finished,退到上一级菜单,在顶级菜单输入quit,提示配置文件建立成功:I can create the following types of configuration files for you.Select the file type you wish to create:(you can create more than one as you run this program) 1: snmpd.conf 2: snmptrapd.conf 3: snmp.confOther options: quitSelect File: quitThe following files were created: snmpd.conf 4.1.4 启动SNMP服务# /usr/local/sbin/snmpd -c /usr/bin/snmpd.conf4.1.5 验证SNMP服务# ps ef|grep snmproot 6827 1 0 02:38 ? 00:00:00 /usr/local/sbin/snmpd -c /usr/bin/snmpd.confroot 6829 21311 76 02:38 pts/2 00:00:00 grep snmp客户端可以使用SolarWinds Engineers Edition,检测liunx系统的各项参数。4.2 IBM服务器(AIX系统)4.2.1 准备工作AIX安装系统盘 或下载的软件包net-snmp-5.4.1.tar.gz4.2.2 安装方法安装SNMP相关软件包gcc-3.3.2-5.aix5.3.ppc.rpmopenssl-0.9.7-1.src.rpm net-snmp-5.4.1.tar.gz安装GCC编译环境:# rpm -U gcc-3.3.2-5.aix5.3.ppc.rpmgcc will be installed by default安装SNMP软件:Type the following: (using the sample above)# cd /opt# uncompress *.Z# cp net-snmp-5.4.1.tar.gz /# tar -zxvf net-snmp-5.4.1.tar.gz#./configure prefix=/usr/local/snmp /配置 指定安装目录安装过程中,询问信息可直接回车,默认即可。# make# make install4.2.3 配置SNMP文件命令如下:cd /usr/local/bin./snmpconf根据“7.1.3配置SNMP文件”步骤,进行相关项配置即可。4.2.4 启动SNMP服务# lssrc -s snmpd /查看# startsrc -s snmpd /启动4.2.5 验证SNMP服务# ps ef|grep snmp会看到类似这样的信息:root 5996 4176 0 22:31:35 - 0:00 /usr/sbin/snmpdroot 7250 4176 0 22:31:41 - 0:0 /usr/sbin/snmpmibd客户端可以使用SolarWinds Engineers Edition,检测liunx系统的各项参数。4.3 HP服务器(HP-UX系统)4.3.1 准备工作HP-UX11i安装系统盘涉及的相关文件有/usr/sbin/snmpd/usr/sbin/snmpdm/usr/sbin/mib2agt/usr/sbin/hp_unixagt/usr/sbin/trapdestagt/etc/SnmpAgent.d/snmpd.conf/var/adm/snmpd.log/opt/OV/snmp_mibs/sbin/SnmpAgtStart.d/4.3.2 安装方法安装SNMP相关软件包OVSNMPAgent 安装命令是#swinstall s OVSNMPAgent验证已安装了软件包#swlist -l product|grep -i SUNWsadmi4.3.3 配置SNMP文件命令如下:#cd /etc/SnmpAgent.d#cp snmpd.conf snmpd.conf.ori#vi snmpd.confget-community-name: public/可以把public修改其他字符串,例如metarnet,注意用snmp前端工具登陆是也要制定community 为metarnet.若只为测试可不用修改trap-dest: localhost/接受snmp告警信息的主机,如123.45.67.89也采用默认值.4.3.4 启动SNMP服务# /usr/sbin/snmpd4.3.5 验证SNMP服务#ps ef|grep snmp会看到类似这样的信息. root 9468 1 0 14:27:34 ? 0:00 /usr/sbin/snmpdm 客户端可以使用SolarWinds Engineers Edition,检测liunx系统的各项参数。4.4 SUN服务器(Solaris系统)4.4.1 准备工作Solaris安装系统盘或下载的软件包net-snmp-5.4.3.tar.gz及其它版本4.4.2 安装方法安装SNMP相关软件包:gcc-3.4.6-sol10-x86-local.gzlibiconv-1.13.1-sol10-x86-local.gzlibintl-3.4.0-sol10-x86-local.gzmake-3.82-sol10-x86-local.gznet-snmp-5.4.3.tar.gz安装GCC等编译工具:# gzip -d /tmp/gcc-3.4.6-sol10-x86-local.gz# pkgadd -d gcc-3.4.6-sol10-x86-local安装SNMP软件:# gzip -d /tmp/net-snmp-5.4.3.tar.gz# tar -xvf /tmp/ net-snmp-5.4.3.tar.gz# cd ./ net-snmp-5.4.3#./configure prefix=/usr/snmp /配置 指定安装目录安装过程中,询问信息可直接回车,默认即可。# make# make install4.4.3 配置SNMP文件命令如下:# cd /usr/sfw/bin# ./snmpconf根据“7.1.3配置SNMP文件”步骤,进行相关项配置即可。Solaris 10自带net-snmp配置方法:# vi /etc/sma/snmp/snmpd.confrocommunity public修改只读Community为public,保存退出。4.4.4 启动SNMP服务# /usr/sfw/sbin/snmpd4.4.5 验证SNMP服务#ps ef|grep snmp会看到类似这样的信息. bash-3.00# ps -ef |grep snmp root

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论