SNMP配置手冊_第1頁
SNMP配置手冊_第2頁
SNMP配置手冊_第3頁
SNMP配置手冊_第4頁
SNMP配置手冊_第5頁
已閱讀5頁,還剩23頁未讀, 繼續(xù)免費閱讀

下載本文檔

版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請進行舉報或認領(lǐng)

文檔簡介

1、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配置

2、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系統(tǒng))154.2.1準備工作154.2.2安裝方法154.2.3配置SNMP文件164.2.4啟動SNMP服務164.2.5驗證SNMP服務164.3HP服務器(HP-UX系統(tǒng))164.3.1準備工作164.3.2安裝方法17

3、4.3.3配置SNMP文件174.3.4啟動SNMP服務184.3.5驗證SNMP服務184.4SUN服務器(Solaris系統(tǒng))184.4.1準備工作184.4.2安裝方法184.4.3配置SNMP文件194.4.4啟動SNMP服務194.4.5驗證SNMP服務194.5Windows服務器(WIN2000、WIN2003等系統(tǒng))204.5.1準備工作204.5.2安裝方法204.5.3配置SNMP服務224.5.4啟動SNMP服務235其他部分245.1F5負載均衡245.1.1SNMP配置245.1.2TRAP配置251 交換機部分1.1 Cisco交換機使用以下配置命令前,均需要執(zhí)行以

4、下步驟:1 登陸交換機。(可以使用串口線直接連接,如果交換機配置有管理IP并且允許telnet登陸,則也可以通過telnet進行登陸。)2 輸入enable命令進入特權(quán)模式。3 輸入config terminal進行配置模式。使用完配置命令后,均需要執(zhí)行以下步驟進行保存:1 輸入end命令退出配置模式。2 copy running start保存配置文件。1.1.1 SNMP配置1配置snmp 只讀communitysnmp-server community public ro 配置交換機的只讀community為public2配置snmp 讀寫communitysnmp-server com

5、munity public rw 配置交換機的讀寫community為public1.1.2 TRAP配置1配置交換機允許發(fā)送trapsnmp-server enable traps 2配置交換機接收trap的主機snmp-server host 10.238.18.17 traps public 指定交換機SNMP Trap的接收者為10.238.18.17,發(fā)送Trap時采用public作為字串1.1.3 Syslog配置1打開交換機的syslog功能logging on2. 直接配置相應的syslog發(fā)送到的接收主機,10.90.200.93為該主機的ip地址。logging 10.90

6、.200.933配置發(fā)送syslog的主機格式類型。logging facility local4 4 選擇發(fā)送warning以上級別的log信息。logging trap warnings1.2 華為交換機使用以下配置命令前,均需要執(zhí)行以下步驟:1 登陸交換機。(可以使用串口線直接連接,如果交換機配置有管理IP并且允許telnet登陸,則也可以通過telnet進行登陸。)2 輸入system命令進入配置模式。使用完配置命令后,均需要執(zhí)行以下步驟進行保存:1 輸入return命令退出配置模式。2 Save保存配置文件。1.2.1 SNMP配置1 啟用SNMPsnmp-agent2 配置snmp

7、協(xié)議的版本號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配置交換機允許發(fā)送trapsnmp-agent traps enable 2配置交換機接收trap的主機snmp-agent target-ho

8、st trap address udp-domain 10.199.39.215 params securityname public指定交換機SNMP Trap的接收者為10.199.39.215(一般配置為采集機的IP),發(fā)送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,syslo

9、g的語言為英文。3 選擇發(fā)送warning以上級別的syslog信息。info-center source default channel loghost log level warning1.3 中興交換機使用以下配置命令前,均需要執(zhí)行以下步驟:1.登陸交換機。(可以使用串口線直接連接,如果交換機配置有管理IP并且允許telnet登陸,則也可以通過telnet進行登陸。)2.輸入enable命令進入特權(quán)模式。3.輸入config terminal進行配置模式。使用完配置命令后,均需要執(zhí)行以下步驟進行保存:1.輸入end命令退出配置模式。2.write保存配置文件。1.3.1 SNMP配置1

10、配置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.配置交換機允許發(fā)送trapsnmp-

11、server enable trap2配置交換機接收trap的主機snmp-server host 192.168.2.74 trap version 2c public 指定交換機SNMP Trap的接收者為192.168.2.74,發(fā)送Trap時采用public作為字串1.3.3 Syslog配置1打開交換機的syslog功能syslog on2. 直接配置相應的syslog發(fā)送到的接收主機,192.168.2.74為該主機的ip地址。syslog server 192.168.2.743.選擇發(fā)送warning以上級別的log信息。syslog level warnings2 路由器部分

12、在HP-UX 11i操作系統(tǒng)上,一般情況下,配置SNMP服務時,將需要修改SNMP團體名,不建議使用操作系統(tǒng)缺省的SNMP團體名。2.1 Cisco路由器使用以下配置命令前,均需要執(zhí)行以下步驟:1 登陸路由器。(可以使用串口線直接連接,如果交換機配置有管理IP并且允許telnet登陸,則也可以通過telnet進行登陸。)2 輸入enable命令進入特權(quán)模式。3 輸入config terminal進行配置模式。使用完配置命令后,均需要執(zhí)行以下步驟進行保存:1 輸入end命令退出配置模式。2 copy running start保存配置文件。2.1.1 SNMP配置1配置snmp 只讀commun

13、itysnmp-server community public ro 配置路由器的只讀community為public2配置snmp 讀寫communitysnmp-server community public rw 配置路由器的讀寫community為public2.1.2 TRAP配置1配置路由器允許發(fā)送trapsnmp-server enable traps 2配置路由器接收trap的主機snmp-server host 10.238.18.17 traps public 指定路由器SNMP Trap的接收者為10.238.18.17,發(fā)送Trap時采用public作為字串2.1.3

14、Syslog配置1打開路由器的syslog功能logging on2. 直接配置相應的syslog發(fā)送到的接收主機,10.90.200.93為該主機的ip地址。logging 10.90.200.933配置發(fā)送syslog的主機格式類型。logging facility local4 4 選擇發(fā)送warning以上級別的log信息。logging trap warnings2.2 華為路由器使用以下配置命令前,均需要執(zhí)行以下步驟:1 登陸路由器。(可以使用串口線直接連接,如果交換機配置有管理IP并且允許telnet登陸,則也可以通過telnet進行登陸。)2 輸入system命令進入配置模式。

15、使用完配置命令后,均需要執(zhí)行以下步驟進行保存:1 輸入return命令退出配置模式。2 Save保存配置文件。2.2.1 SNMP配置1 啟用SNMPsnmp-agent2 配置snmp協(xié)議的版本號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配置路由器的讀寫communit

16、y為public2.2.2 TRAP配置1配置路由器允許發(fā)送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),發(fā)送Trap時采用public作為字串2.2.3 Syslog配置1啟用路由器的syslog功能info-center enable2. 指定接收syslog的主機,10.90.200.9

17、3為該主機的ip地址。info-center loghost 10.90.200.93 language English以上命令是配置10.90.200.93接收syslog,syslog的語言為英文。3 選擇發(fā)送warning以上級別的syslog信息。info-center source default channel loghost log level warning3 防火墻部分3.1 Netscreen防火墻由于Netscreen防火墻的配置界面是以web方式進行的,故下面均以截圖作為講解基礎,另外netscreen防火墻的單項配置如果一選擇“APPLY“,則配置自動保存并且運行!3

18、.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防火墻使用以下配置命令前,均需要執(zhí)行以下步驟:1 登陸防火墻。(可以使用串口線直接連接,如果交

19、換機配置有管理IP并且允許telnet登陸,則也可以通過telnet進行登陸。)2 輸入enable命令進入特權(quán)模式。3 輸入config terminal進行配置模式。使用完配置命令后,均需要執(zhí)行以下步驟進行保存: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-serve

20、r host <if_name> 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配置路由器允許發(fā)送trapsnmp-server enable traps 2配置交換機接收trap的主機snmp-server host 10.238.18.17 traps指定交換機SNMP Trap的接收者為10.238.18.17,發(fā)送Trap時采用public作為字串3.2.3 Syslog配置1打開交換機的syslog功能log

21、logging on2. 直接配置相應的syslog發(fā)送到的接收主機,10.90.200.93為該主機的ip地址。logging host interface_name 10.90.200.933 選擇發(fā)送warning以上級別的log信息。logging trap severity_level 54 服務器部分4.1 LINUX服務器4.1.1 準備工作linux安裝系統(tǒng)盤或下載的軟件包net-snmp-5.4.3.tar.gz4.1.2 安裝方法安裝SNMP相關(guān)軟件包:net-snmp-5.4.3.tar.gz安裝SNMP軟件:# tar -zxvf /winshare/ net-snmp

22、-5.4.3.tar.gz# cd ./ net-snmp-5.4.3#./configure prefix=/usr/local/snmp /配置 指定安裝目錄安裝過程中,詢問信息可直接回車,默認即可。# make# make install4.1.3 配置SNMP文件安裝完成后,執(zhí)行:# /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

23、one as you run this program) 1: snmpd.conf 2: snmptrapd.conf 3: snmp.confOther options: quitSelect File: 1在出現(xiàn)菜單中,選擇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

24、 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在出現(xiàn)菜單中,選擇4Section: Access Control SetupDescription: This section defines who is allowed to talk to your running snmp age

25、nt.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在出現(xiàn)菜單中,選擇3,配置v1和v2c版本的只讀community字。Configuring: rocommunityDescription: a SNMPv

26、1/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字訪問設備的網(wǎng)段及主機地址,這里可以直接輸入回車確

27、認,表示全部。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 cr

28、eate:(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

29、: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系統(tǒng)的各項參數(shù)。4.2 IBM服務器(AIX系統(tǒng))4.2.1 準備工作AIX安裝系統(tǒng)盤 或下載的軟件包net-snmp-5.4.1.tar.gz4.2.2 安裝方法安裝SNMP相關(guān)軟件包gcc-3.3.2-5.aix5.3.ppc.rpmopenssl-0.9.7-1.src.rpm net-snmp-5.4.1

30、.tar.gz安裝GCC編譯環(huán)境:# 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# ma

31、ke install4.2.3 配置SNMP文件命令如下:cd /usr/local/bin./snmpconf根據(jù)“7.1.3配置SNMP文件”步驟,進行相關(guān)項配置即可。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

32、 Engineers Edition,檢測liunx系統(tǒng)的各項參數(shù)。4.3 HP服務器(HP-UX系統(tǒng))4.3.1 準備工作HP-UX11i安裝系統(tǒng)盤涉及的相關(guān)文件有/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相關(guān)軟件包OVSNMPAgent 安裝命令是#swinst

33、all 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也采用默認

34、值.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系統(tǒng)的各項參數(shù)。4.4 SUN服務器(Solaris系統(tǒng))4.4.1 準備工作Solaris安裝系統(tǒng)盤或下載的軟件包net-snmp-5.4.3.tar.gz及其它版本4.4.2 安裝方法安裝SNMP相關(guān)軟件包:gcc-3.4.6-sol10-x86-local.gzl

35、ibiconv-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-

36、snmp-5.4.3#./configure prefix=/usr/snmp /配置 指定安裝目錄安裝過程中,詢問信息可直接回車,默認即可。# make# make install4.4.3 配置SNMP文件命令如下:# cd /usr/sfw/bin# ./snmpconf根據(jù)“7.1.3配置SNMP文件”步驟,進行相關(guān)項配置即可。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. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
  • 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會有圖紙預覽,若沒有圖紙預覽就沒有圖紙。
  • 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
  • 5. 人人文庫網(wǎng)僅提供信息存儲空間,僅對用戶上傳內(nèi)容的表現(xiàn)方式做保護處理,對用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對任何下載內(nèi)容負責。
  • 6. 下載文件中如有侵權(quán)或不適當內(nèi)容,請與我們聯(lián)系,我們立即糾正。
  • 7. 本站不保證下載資源的準確性、安全性和完整性, 同時也不承擔用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。

評論

0/150

提交評論