免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 6839 | 回复: 7
打印 上一主题 下一主题

请教 solaris下如何配置(自带的)snmp [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2008-04-15 17:48 |只看该作者 |倒序浏览
现在用户要求在一台solaris 9和solaris 10上配置snmp以便监控机器状态,要求用solaris自带的snmp,请问是否有人做过.以前没配置过snmp,不知道/etc/snmp/conf/snmpd.conf下的参数是什么意思.麻烦各位帮忙

论坛徽章:
0
2 [报告]
发表于 2008-04-15 23:16 |只看该作者
no,是/etc/sma/snmp/snmpd.conf,是这个文件,这个就是net-snmp,freeware,各个系统通用,
只要修改该文件中的#DISABLE=YES,为#DISABLE=NO;然后svcadm enable sma && svcs sma就可以了。
默认是启动在161端口监听。

评分

参与人数 1可用积分 +3 收起 理由
yuhuohu + 3 我很赞同

查看全部评分

论坛徽章:
0
3 [报告]
发表于 2008-06-03 15:24 |只看该作者
我通过mrtg获得solaris snmp的数据不对,一个网卡都不能获得数据

论坛徽章:
0
4 [报告]
发表于 2008-06-03 23:32 |只看该作者
下面的这篇文档,可以参考一下。
A) Configuration :
1) snmp host configuration
Your /etc/hosts file must contain a "snmpserver" alias.
Example of /etc/hosts:
127.0.0.1 localhost
10.238.192.102SNMP-alarm SNMP snmpserver
Verification:
cat /etc/hosts | grep snmpserver
(This should return one line as result)
If no line is returned, you have to create the alias
(as root)
echo "123.123.123.123 snmpserver" >> /etc/hosts
(replace 123.123.123.123 by the real snmp server ip address)
!!! Check that the ip address is REALLY the snmp server IP address. I lost once a few hours because the IP given to the snmpserver was the same as the one of the host generating the traps (therefore, everything was sent over the loopback and even snoop won't show you anything)
2) Modify the file /etc/snmp/conf/enterprises.oid this way:
2a) In case you are not running SERVICE2.3.07S or if you are but week 506 is installed :
(Note: I got some cases where the W506 was not installed but where the enterprise oid used was "1.3.6.1.4.1.637.69.1"... In this case, you should use this enterprises.oid file)
(as root)

cp /etc/snmp/conf/enterprises.oid /etc/snmp/conf/enterprises.oid.backup

grep -v lcatel /etc/snmp/conf/enterprises.oid > /etc/snmp/conf/enterprises.oid.tmp

cat << __EOF__ >> /etc/snmp/conf/enterprises.oid.tmp

" Data Networks"  "1.3.6.1.4.1.637.69.1"

" Data Networks X733 Indeterminate""1.3.6.1.4.1.637.69.1.4"

" Data Networks X733 Critical"  "1.3.6.1.4.1.637.69.1.5"

" Data Networks X733 Major"  "1.3.6.1.4.1.637.69.1.6"

" Data Networks X733 Minor"  "1.3.6.1.4.1.637.69.1.7"

" Data Networks X733 Warning""1.3.6.1.4.1.637.69.1.8"

" Data Networks X733 Clear"  "1.3.6.1.4.1.637.69.1.9"

" Data Networks X733 Common" "1.3.6.1.4.1.637.69.1.10"

__EOF__



cat /etc/snmp/conf/enterprises.oid.tmp > /etc/snmp/conf/enterprises.oid

rm /etc/snmp/conf/enterprises.oid.tmp



Verification :

grep lcatel /etc/snmp/conf/enterprises.oid

" Data Networks"  "1.3.6.1.4.1.637.69.1"

" Data Networks X733 Indeterminate""1.3.6.1.4.1.637.69.1.4"

" Data Networks X733 Critical"  "1.3.6.1.4.1.637.69.1.5"

" Data Networks X733 Major"  "1.3.6.1.4.1.637.69.1.6"

" Data Networks X733 Minor"  "1.3.6.1.4.1.637.69.1.7"

" Data Networks X733 Warning""1.3.6.1.4.1.637.69.1.8"

" Data Networks X733 Clear"  "1.3.6.1.4.1.637.69.1.9"

" Data Networks X733 Common" "1.3.6.1.4.1.637.69.1.10"





2b) In case you are running SERVICE2.3.07S without the week 506

!!! NAMin18875 : Pfmalarm (On SUN) : entreprise OID is not correct into the SNMP traps the  SERVICE Alarms have the wrong enterprise OID. They should have enterprise OID 1.3.6.1.4.1.637.69.1 and not 1.3.6.1.4.1.637. If you have NOT installed WEEK506 the enterprise.iod should be formatted this way :



(as root)

cp /etc/snmp/conf/enterprises.oid /etc/snmp/conf/enterprises.oid.backup

grep -v lcatel /etc/snmp/conf/enterprises.oid > /etc/snmp/conf/enterprises.oid.tmp

cat << __EOF__ >> /etc/snmp/conf/enterprises.oid.tmp

" Data Networks"  "1.3.6.1.4.1.637"

" Data Networks X733 Indeterminate""1.3.6.1.4.1.637.69.1.4"

" Data Networks X733 Critical"  "1.3.6.1.4.1.637.69.1.5"

" Data Networks X733 Major"  "1.3.6.1.4.1.637.69.1.6"

" Data Networks X733 Minor"  "1.3.6.1.4.1.637.69.1.7"

" Data Networks X733 Warning""1.3.6.1.4.1.637.69.1.8"

" Data Networks X733 Clear"  "1.3.6.1.4.1.637.69.1.9"

" Data Networks X733 Common" "1.3.6.1.4.1.637.69.1.10"

__EOF__



cat /etc/snmp/conf/enterprises.oid.tmp > /etc/snmp/conf/enterprises.oid

rm /etc/snmp/conf/enterprises.oid.tmp



Verification :

grep lcatel /etc/snmp/conf/enterprises.oid

" Data Networks"  "1.3.6.1.4.1.637"

" Data Networks X733 Indeterminate""1.3.6.1.4.1.637.69.1.4"

" Data Networks X733 Critical"  "1.3.6.1.4.1.637.69.1.5"

" Data Networks X733 Major"  "1.3.6.1.4.1.637.69.1.6"

" Data Networks X733 Minor"  "1.3.6.1.4.1.637.69.1.7"

" Data Networks X733 Warning""1.3.6.1.4.1.637.69.1.8"

" Data Networks X733 Clear"  "1.3.6.1.4.1.637.69.1.9"

" Data Networks X733 Common" "1.3.6.1.4.1.637.69.1.10"



see NAMin18875 (delivery 10174) delivered in Release 2.3.07.S Week 506

see http://www.etb.bel..be/productiz ... .3.07.S/449/KP.html



3) Create from scratch the file /etc/snmp/conf/snmpdx.acl this way:

(as root)

cp /etc/snmp/conf/snmpdx.acl /etc/snmp/conf/snmpdx.acl.backup

cat << __EOF__ > /etc/snmp/conf/snmpdx.acl

acl = {

  {

communities = public, private

access = read-write

managers = *

  }

}

trap = {

  {

trap-community = smp-in

hosts = snmpserver

{

enterprise = " Data Networks"

trap-num = 1, 2

}

  }

}

__EOF__



Verification:

cat /etc/snmp/conf/snmpdx.acl

acl = {

  {

communities = public, private

access = read-write

managers = *

  }

}

trap = {

  {

trap-community = smp-in

hosts = snmpserver

{

enterprise = " Data Networks"

trap-num = 1, 2

}

  }

}



4a) (Sun only) Create from scratch the file /etc/snmp/conf/snmpd.conf this way:



cp /etc/snmp/conf/snmpd.conf /etc/snmp/conf/snmpd.conf.backup

cat << __EOF__ > /etc/snmp/conf/snmpd.conf

sysdescr  Sun SNMP Agent, Sun-Fire-V440

syscontactSystem administrator

sysLocation  System administrators office

system-group-read-community  public

read-community  public

traplocalhost

trap-community  SNMP-trap

managers  localhost

__EOF__



Verification:

cat /etc/snmp/conf/snmpd.conf

sysdescr  Sun SNMP Agent, Sun-Fire-V440

syscontactSystem administrator

sysLocation  System administrators office

system-group-read-community  public

read-community  public

traplocalhost

trap-community  SNMP-trap

managers  localhost

5a) Restart the snmp daemon:



Sun only :

/etc/init.d/init.snmpdx stop

/etc/init.d/init.snmpdx start


5b) Force the snmpd to reread its configuration files without restarting it:



ps -ef | grep nmpd | awk '{print $2}' | xargs kill -HUP

(In that case, the trap "coldstart" that means snmp has been restarted)



Remarks:



You could receive this type of traps (found in /var/temip/trace/snmp_am.log.xxx)



07/04 16:20:25[8367][65547] [EVT] Major : Event discarded: sender of an incoming trap (authenticationFailure) is unknown : 175.175.65.94  (at line 1404 in file ist_evt_osimapper.cxx)



To avoid to send this type of trap to client server, modify the parameter "snmpEnableAuthenTraps" inside (Sun only) /etc/snmp/conf/snmpd.conf or (HP only) /etc/snmp.conf.





B) Check / debug



1) Do a list of the alarm subscriptions:



GCC>pfmalarm.evt_subs.list,MN="%",BITMAP="NYNYNYNNNYYYNNNNNNYNNNN";

pfmalarm.evt_subs.list="0",CORB_SUB=,DEF_SUBS="0"&"0"&"1"&"0"&"0",EVT_CAT=,EVT_KIND="1"&"1"&"0"&"1"&"1",EVT_NAME=,INVALID="0"&"0"&"0"&"0"&"0",IOR=,MAIL=,MAIL_SUB=,MAX_LVL="5"&"5"&"5"&"5"&"5",MIN_LVL="5"&"4"&"4"&"0"&"5",MN="mail4parlay"&"mail4aaa"&"default"&"snmp"&"mail",OP_NAME=,SEP_NAME=,SEP_RECO=,SEP_SUB=,SMS=,SMS_SUB=,SNMP_SUB="0"&"0"&"0"&"1"&"0",SQL_CLAU=,SERVNAM=,STAR_DAT=,STAR_TIM=,CMDRESULT="",NBSTART="5";



Then display the one which has the DEF_SUBS="1", and the one which has the SNMP_SUB="1"



GCC>pfmalarm.evt_subs.display,MN="default";

pfmalarm.evt_subs.display="0",CORB_SUB="0",DEF_SUBS="1",EVT_CAT="",EVT_KIND="0",EVT_NAME="",INVALID="0",IOR="",MAIL="",MAIL_SUB="0",MAX_LVL="5",MIN_LVL="4",MN="default",OP_NAME="installer",SEP_NAME="",SEP_RECO="0",SEP_SUB="0",SMS="",SMS_SUB="0",SNMP_SUB="0",SQL_CLAU="",SERVNAM=""&""&""&""&""&""&""&""&""&"",STAR_DAT="12/07/2004",STAR_TIM="15:57:27",CMDRESULT="";

GCC>pfmalarm.evt_subs.display,MN="snmp";

pfmalarm.evt_subs.display="0",CORB_SUB="0",DEF_SUBS="0",EVT_CAT="",EVT_KIND="1",EVT_NAME="",INVALID="0",IOR="",MAIL="",MAIL_SUB="0",MAX_LVL="5",MIN_LVL="0",MN="snmp",OP_NAME="",SEP_NAME="",SEP_RECO="0",SEP_SUB="0",SMS="",SMS_SUB="0",SNMP_SUB="1",SQL_CLAU="",SERVNAM=""&""&""&""&""&""&""&""&""&"",STAR_DAT="01/01/2005",STAR_TIM="00:00:00",CMDRESULT="";



The subscriptions cannot have the INVALID field set to 1. If the INVALID flag is set to 1, then delete and recreate the subscription.

Keep in mind that a subscription can collect events (EVT_KIND="0") as it is the case for the default subscription or collect alarms (EVT_KIND="1") as it is usually the case for the snmp subscription. This mean that an snmp trap will be sent only when a new alarm pops up or when an alarm is closed. No snmp trap is sent when the number of occurrence is increased.



2) Verify that you can receive alarms in pfmalarm:



Open 2 telnets to the machine.

In the first telnet, do:

gcc  alc7s0m1 xx -monitoring -h -alarm



In the second telnet, do:

2.3 only :

/in/local/bin/sendevent -O test -i 1 -l 5 -t 2 -d test platserv/alarm 12

/in/local/bin/sendevent -O test -i 1 -l 5 -t 1 -d test platserv/alarm 12

/in/local/bin/sendevent -O test -i 1 -l 5 -t 2 -d test platserv/alarm 12



2.4 only :

/SERVICE/local/bin/sendevent -O test -i 1 -l 5 -t 2 -d test platserv/alarm 12

/SERVICE/local/bin/sendevent -O test -i 1 -l 5 -t 1 -d test platserv/alarm 12

/SERVICE/local/bin/sendevent -O test -i 1 -l 5 -t 2 -d test platserv/alarm 12



The -t 2 means an event of type close.

The -t 1 means an event of type open.



In some cases, this monitoring through GCC doesn't work.

You then have to work with the GUI or check manually in the DB (as shown here below).



2bis) If Gcc verification does not work, check manually in the DB :



ORACLE_SID=SMP;export ORACLE_SID;sqlplus pfmalarm/pfmalarm@PSMF.world

SQL> select CLS_DATE,CLS_TIME,EVT_CAT,EVT_CODE,EVT_DATA,EVT_DATE,EVT_NAME,EVT_TIME,OBJ_TYPE,

OCC_NB,OPN_DATE,OPN_TIME,RI,SRC_NAME,SUB_HOST from alarm

where EVT_CODE=12 and grp_bep is not null;



CLS_DATECLS_TIME

---------- ----------

EVT_CATEVT_CODE

---------------------------------------------------------------- ----------

EVT_DATA

--------------------------------------------------------------------------------

EVT_DATEEVT_NAME EVT_TIME

---------- -------------------------------- ----------

OBJ_TYPE  OCC_NB OPN_DATEOPN_TIME  RI

-------------------------------- ---------- ---------- ---------- ----------

SRC_NAME SUB_HOST

-------------------------------- --------------------------------



platserv/alarm  12

test

30/06/2005 badsql12:03:16

test  2 30/06/2005 12:02:312714

sendevent.cxx  SMP01



3) Verify the snmpd configuration :



Please refer to the "Verifications" points of the first part of this document ( A) Configuration)



4) Start the snmpd with debugging:



In telnet1, as root, do:

Sun only :

/etc/init.d/init.snmpdx stop

/usr/lib/snmp/snmpdx -y -d4 -c /etc/snmp/conf/



HP only :

/sbin/rc3.d/S49snmpd stop

/usr/sbin/snmpd -d -t



The startup should not show any error !!!

You can find in "Annex A" a trace of a normal startup.



In telnet2, as linus, do:

Generate an snmptrap:

/in/local/bin/sendevent -O test -i 1 -l 5 -t 2 -d test platserv/alarm 12

/in/local/bin/sendevent -O test -i 1 -l 5 -t 1 -d test platserv/alarm 12

/in/local/bin/sendevent -O test -i 1 -l 5 -t 2 -d test platserv/alarm 12



If nothing happens in telnet1, then verify your snmpd configuration.

If something happen, verify that you see some line like the following:

>> sent 622 bytes to SNMP-alarm.162



You can find in "Annex B" a trace of a trap successfully forwarded to the snmpserver.



In this particular case, SNMP-alarm is the canonical hostname (first alias) of the host snmpserver in /etc/hosts:

SMP01 linus>cat /etc/hosts | grep snmpserver

10.238.192.102SNMP-alarm SNMP snmpserver



If you only see that the packet is forwarded to yourself, then verify your configuration once more.

eg: I got one case where people did put the same IP address for the snmpserver and for the host sending the trap. Because of this, I always saw the hostname of the sender (first in the hosts file) instead of the snmpserver. Also nothing was seen in the snoop.



5a) (Sun only) Snif the network from the active psmf to see if traps are sent :



Sun only :



snoop -d qfe1 -v host snmpserver

(replace qfe1 by the interface used on the psmf if needed)

ping snmpserver



5b) (HP only) Snif the network from the standby psmf configured as hot/stby to see if traps are received :



on the standby SMP launch /usr/sbin/snmp_traprcv as root.

(as root)

/usr/sbin/snmp_traprcv



on any machine of the network, generate an IN event as linus :

(as linus)

/in/local/bin/sendevent -O test -i 1 -l 5 -t 0 -d test platserv/alarm 12

(this is a level 5 single event)

Check that the alarm is received by the snmp listener



You can find in "Annex C" a snoop of a trap successfully forwarded to the snmpserver.



note: testing the port 162 of the host snmpserver using the telnet tool (telnet snmpserver 162) will not work because snmp is not using tcp but udp.









C) Annexes :



Annex A: Normal startup trace of snmpd with debugging enabled:

论坛徽章:
0
5 [报告]
发表于 2008-06-03 23:33 |只看该作者
SMP01> /usr/lib/snmp/snmpdx -y -d4 -c /etc/snmp/conf/

Local IP Addresss : 10.10.1.21



SUBTREES:

  1.3.6.1.4.1.42.2.151 1 relay-agent  161 1



AGENTS:

  44268 relay-agent  localhost.161900000000  1  3  0 0





MANAGERS:

---------

*0

  COMMUNITIES(READ_WRITE):  private public



#EFILTER:

enterprise=" Data Networks"

  trap-num=2community-string: smp-in

snmpserver 10.238.192.102

  trap-num=1community-string: smp-in

snmpserver 10.238.192.102



TRAP RECIPIENTS:

-----------------



PDU:

----

version:0

community: public

type:GET_REQ_MSG (0xa0)

request id:0

error status: noError(0)

error index:  0

--------------------------------------------------

name: 1.3.6.1.2.1.7

type: NULL (0x5)

length:  0

value: ( )

--------------------------------------------------



PACKET:

-------

30 24 02 01 00 04 06 70 75 62 6C 69 63 A0 17 02

01 00 02 01 00 02 01 00 30 0C 30 0A 06 06 2B 06

01 02 01 07 05 00



>> sent 38 bytes to SMP01.33809



Waiting for incoming SNMP requests on UDP port 161



SESSIONS:

---------

NUMBER OF SESSIONS: 0



Annex B: Trace of snmpd with debugging enabled when a trap received from pfmalarm is successfully forwarded to the snmpserver:



<< received 42 bytes from SMP01.34347



PACKET:

-------

30 28 02 01 00 04 06 70 75 62 6C 69 63 A0 1B 02

01 41 02 01 00 02 01 00 30 10 30 0E 06 0A 2B 06

01 04 01 2A 02 0F 04 00 05 00



PDU:

----

version:0

community: public

type:GET_REQ_MSG (0xa0)

request id:65

error status: noError(0)

error index:  0

--------------------------------------------------

name: 1.3.6.1.4.1.42.2.15.4.0

type: NULL (0x5)

length:  0

value: ( )

--------------------------------------------------



## Open session 0



subtree_match() returned 1.3.6.1.4.1.42.2.15 supported by relay-agent



  address:  SMP01.34347

  n_variables: 1

  o_flags:  0x0

  i_flags:  0x0

  request 0:

session:  0

subtree:  1.3.6.1.4.1.42.2.15

visited agents:

relay-agent

agent: relay-agent (localhost.161)

flags: 0x1

state: 0

variables:

1.3.6.1.4.1.42.2.15.4.0

time:  0 sec 0 usec

expire:0 sec 0 usec



node_find() returned relayTrapPort with suffix 0



!! get(): processing the variable relayTrapPort



PDU:

----

version:0

community: public

type:GET_RSP_MSG (0xa2)

request id:65

error status: noError(0)

error index:  0

--------------------------------------------------

name: 1.3.6.1.4.1.42.2.15.4.0

type: INTEGER (0x2)

length:  4

value:34296

--------------------------------------------------



PACKET:

-------

30 2B 02 01 00 04 06 70 75 62 6C 69 63 A2 1E 02

01 41 02 01 00 02 01 00 30 13 30 11 06 0A 2B 06

01 04 01 2A 02 0F 04 00 02 03 00 85 F8



>> sent 45 bytes to SMP01.34347



## Close session 0



SESSIONS:

---------

NUMBER OF SESSIONS: 0



<< received 622 bytes from SMP01.34348



PACKET:

-------

30 82 02 6A 02 01 00 04 06 70 75 62 6C 69 63 A4

82 02 5B 06 09 2B 06 01 04 01 84 7D 45 01 40 04

0A 0A 01 15 02 01 06 02 01 02 43 04 0B 22 82 C2

30 82 02 3A 30 82 02 36 06 0B 2B 06 01 04 01 84

7D 45 01 02 00 04 82 02 25 41 4C 41 52 4D 3D 70

6C 61 74 73 65 72 76 2F 61 6C 61 72 6D 3A 62 61

64 73 71 6C 7C 49 44 3D 37 36 7C 4F 43 43 55 52

45 4E 43 45 20 4E 42 3D 31 7C 53 54 41 54 45 3D

63 6C 6F 73 65 7C 4C 45 56 45 4C 3D 62 6C 6F 63

6B 69 6E 67 7C 4F 42 4A 3D 74 65 73 74 3A 31 7C

4F 42 4A 5F 4D 4E 3D 74 65 73 74 3A 6E 6F 6E 65

7C 48 4F 53 54 3D 53 4D 50 30 31 7C 41 50 50 4C

49 3D 73 65 6E 64 65 76 65 6E 74 7C 53 45 52 56

49 43 45 3D 70 66 6D 63 6F 6E 66 69 67 7C 53 45

50 3D 7C 53 4F 55 52 43 45 3D 73 65 6E 64 65 76

65 6E 74 2E 63 78 78 7C 4C 49 4E 45 3D 32 36 32

7C 53 43 52 49 50 54 20 53 54 41 54 45 3D 7C 44

55 4D 50 3D 74 65 73 74 7C 4F 50 45 4E 20 44 41

54 45 3D 33 30 2F 30 36 2F 32 30 30 35 20 20 31

37 3A 31 37 3A 33 36 7C 43 4C 4F 53 45 20 44 41

54 45 3D 33 30 2F 30 36 2F 32 30 30 35 20 20 7C

44 45 53 43 52 49 50 54 49 4F 4E 3D 4F 72 61 63

6C 65 20 44 61 74 61 62 61 73 65 20 45 72 72 6F

72 20 77 68 69 6C 65 20 65 78 65 63 75 74 69 6E

67 20 53 51 4C 20 72 65 71 75 65 73 74 7C 43 41

55 53 45 3D 54 68 65 20 73 71 6C 20 63 6C 61 75

73 65 20 6F 66 20 61 20 65 76 65 6E 74 2F 61 6C

61 72 6D 20 73 75 62 73 63 72 69 70 74 69 6F 6E

20 69 73 20 6E 6F 74 20 76 61 6C 69 64 7C 45 46

46 45 43 54 3D 54 68 65 20 73 75 62 73 63 72 69

70 74 69 6F 6E 20 77 69 6C 6C 20 6E 6F 74 20 62

65 20 63 6F 6E 73 69 64 65 72 65 64 20 75 6E 74

69 6C 6C 20 74 68 65 20 6E 65 78 74 20 53 4D 50

20 6D 6F 64 69 66 69 63 61 74 69 6F 6E 7C 41 43

54 49 4F 4E 3D 43 68 65 63 6B 20 74 68 65 20 64

75 6D 70 20 61 6E 64 20 74 68 65 20 72 65 6C 61

74 65 64 20 6F 62 6A 65 63 74 20 74 6F 20 66 69

6E 64 20 6F 75 74 20 74 68 65 20 66 61 75 6C 74

79 20 73 75 62 73 63 72 69 70 74 69 6F 6E



PDU:

----

version:0

community: public

type:TRP_MSG (0xa4)

enterprise:1.3.6.1.4.1.637.69.1

IP agent addr: SMP01

generic:enterpriseSpecific(6)

specific:  2

time stamp:186811074

--------------------------------------------------

name: 1.3.6.1.4.1.637.69.1.2.0

type: OCTET STRING (0x4)

length:  549

value:ALARM=platserv/alarm:badsql|ID=76|OCCURENCE NB=1|STATE=close|LEVEL=blocking|OBJ=test:1|OBJ_MN=test:none|HOST=SMP01|APPLI=sendevent|SERVICE=pfmconfig|SEP=|SOURCE=sendevent.cxx|LINE=262|SCRIPT STATE=|DUMP=test|OPEN DATE=30/06/2005  17:17:36|CLOSE DATE=30/06/2005  |DESCRIPTION=Oracle Database Error while executing SQL request|CAUSE=The sql clause of a event/alarm subscription is not valid|EFFECT=The subscription will not be considered untill the next SMP modification|ACTION=Check the dump and the related object to find out the faulty subscription ( 41 4c 41 52 4d 3d 70 6c 61 74 73 65 72 76 2f 61 6c 61 72 6d 3a 62 61 64 73 71 6c 7c 49 44 3d 37 36 7c 4f 43 43 55 52 45 4e 43 45 20 4e 42 3d 31 7c 53 54 41 54 45 3d 63 6c 6f 73 65 7c 4c 45 56 45 4c 3d 62 6c 6f 63 6b 69 6e 67 7c 4f 42 4a 3d 74 65 73 74 3a 31 7c 4f 42 4a 5f 4d 4e 3d 74 65 73 74 3a 6e 6f 6e 65 7c 48 4f 53 54 3d 53 4d 50 30 31 7c 41 50 50 4c 49 3d 73 65 6e 64 65 76 65 6e 74 7c 53 45 52 56 49 43 45 3d 70 66 6d 63 6f 6e 66 69 67 7c 53 45 50 3d 7c 53 4f 55 52 43 45 3d 73 65 6e 64 65 76 65 6e 74 2e 63 78 78 7c 4c 49 4e 45 3d 32 36 32 7c 53 43 52 49 50 54 20 53 54 41 54 45 3d 7c 44 55 4d 50 3d 74 65 73 74 7c 4f 50 45 4e 20 44 41 54 45 3d 33 30 2f 30 36 2f 32 30 30 35 20 20 31 37 3a 31 37 3a 33 36 7c 43 4c 4f 53 45 20 44 41 54 45 3d 33 30 2f 30 36 2f 32 30 30 35 20 20 7c 44 45 53 43 52 49 50 54 49 4f 4e 3d 4f 72 61 63 6c 65 20 44 61 74 61 62 61 73 65 20 45 72 72 6f 72 20 77 68 69 6c 65 20 65 78 65 63 75 74 69 6e 67 20 53 51 4c 20 72 65 71 75 65 73 74 7c 43 41 55 53 45 3d 54 68 65 20 73 71 6c 20 63 6c 61 75 73 65 20 6f 66 20 61 20 65 76 65 6e 74 2f 61 6c 61 72 6d 20 73 75 62 73 63 72 69 70 74 69 6f 6e 20 69 73 20 6e 6f 74 20 76 61 6c 69 64 7c 45 46 46 45 43 54 3d 54 68 65 20 73 75 62 73 63 72 69 70 74 69 6f 6e 20 77 69 6c 6c 20 6e 6f 74 20 62 65 20 63 6f 6e 73 69 64 65 72 65 64 20 75 6e 74 69 6c 6c 20 74 68 65 20 6e 65 78 74 20 53 4d 50 20 6d 6f 64 69 66 69 63 61 74 69 6f 6e 7c 41 43 54 49 4f 4e 3d 43 68 65 63 6b 20 74 68 65 20 64 75 6d 70 20 61 6e 64 20 74 68 65 20 72 65 6c 61 74 65 64 20 6f 62 6a 65 63 74 20 74 6f 20 66 69 6e 64 20 6f 75 74 20 74 68 65 20 66 61 75 6c 74 79 20 73 75 62 73 63 72 69 70 74 69 6f 6e )

--------------------------------------------------



PDU:

----

version:0

community: smp-in

type:TRP_MSG (0xa4)

enterprise:1.3.6.1.4.1.637.69.1

IP agent addr: SMP01

generic:enterpriseSpecific(6)

specific:  2

time stamp:186813194

--------------------------------------------------

name: 1.3.6.1.4.1.637.69.1.2.0

type: OCTET STRING (0x4)

length:  549

value:ALARM=platserv/alarm:badsql|ID=76|OCCURENCE NB=1|STATE=close|LEVEL=blocking|OBJ=test:1|OBJ_MN=test:none|HOST=SMP01|APPLI=sendevent|SERVICE=pfmconfig|SEP=|SOURCE=sendevent.cxx|LINE=262|SCRIPT STATE=|DUMP=test|OPEN DATE=30/06/2005  17:17:36|CLOSE DATE=30/06/2005  |DESCRIPTION=Oracle Database Error while executing SQL request|CAUSE=The sql clause of a event/alarm subscription is not valid|EFFECT=The subscription will not be considered untill the next SMP modification|ACTION=Check the dump and the related object to find out the faulty subscription ( 41 4c 41 52 4d 3d 70 6c 61 74 73 65 72 76 2f 61 6c 61 72 6d 3a 62 61 64 73 71 6c 7c 49 44 3d 37 36 7c 4f 43 43 55 52 45 4e 43 45 20 4e 42 3d 31 7c 53 54 41 54 45 3d 63 6c 6f 73 65 7c 4c 45 56 45 4c 3d 62 6c 6f 63 6b 69 6e 67 7c 4f 42 4a 3d 74 65 73 74 3a 31 7c 4f 42 4a 5f 4d 4e 3d 74 65 73 74 3a 6e 6f 6e 65 7c 48 4f 53 54 3d 53 4d 50 30 31 7c 41 50 50 4c 49 3d 73 65 6e 64 65 76 65 6e 74 7c 53 45 52 56 49 43 45 3d 70 66 6d 63 6f 6e 66 69 67 7c 53 45 50 3d 7c 53 4f 55 52 43 45 3d 73 65 6e 64 65 76 65 6e 74 2e 63 78 78 7c 4c 49 4e 45 3d 32 36 32 7c 53 43 52 49 50 54 20 53 54 41 54 45 3d 7c 44 55 4d 50 3d 74 65 73 74 7c 4f 50 45 4e 20 44 41 54 45 3d 33 30 2f 30 36 2f 32 30 30 35 20 20 31 37 3a 31 37 3a 33 36 7c 43 4c 4f 53 45 20 44 41 54 45 3d 33 30 2f 30 36 2f 32 30 30 35 20 20 7c 44 45 53 43 52 49 50 54 49 4f 4e 3d 4f 72 61 63 6c 65 20 44 61 74 61 62 61 73 65 20 45 72 72 6f 72 20 77 68 69 6c 65 20 65 78 65 63 75 74 69 6e 67 20 53 51 4c 20 72 65 71 75 65 73 74 7c 43 41 55 53 45 3d 54 68 65 20 73 71 6c 20 63 6c 61 75 73 65 20 6f 66 20 61 20 65 76 65 6e 74 2f 61 6c 61 72 6d 20 73 75 62 73 63 72 69 70 74 69 6f 6e 20 69 73 20 6e 6f 74 20 76 61 6c 69 64 7c 45 46 46 45 43 54 3d 54 68 65 20 73 75 62 73 63 72 69 70 74 69 6f 6e 20 77 69 6c 6c 20 6e 6f 74 20 62 65 20 63 6f 6e 73 69 64 65 72 65 64 20 75 6e 74 69 6c 6c 20 74 68 65 20 6e 65 78 74 20 53 4d 50 20 6d 6f 64 69 66 69 63 61 74 69 6f 6e 7c 41 43 54 49 4f 4e 3d 43 68 65 63 6b 20 74 68 65 20 64 75 6d 70 20 61 6e 64 20 74 68 65 20 72 65 6c 61 74 65 64 20 6f 62 6a 65 63 74 20 74 6f 20 66 69 6e 64 20 6f 75 74 20 74 68 65 20 66 61 75 6c 74 79 20 73 75 62 73 63 72 69 70 74 69 6f 6e )

--------------------------------------------------



PACKET:

-------

30 82 02 6A 02 01 00 04 06 73 6D 70 2D 69 6E A4

82 02 5B 06 09 2B 06 01 04 01 84 7D 45 01 40 04

0A 0A 01 15 02 01 06 02 01 02 43 04 0B 22 8B 0A

30 82 02 3A 30 82 02 36 06 0B 2B 06 01 04 01 84

7D 45 01 02 00 04 82 02 25 41 4C 41 52 4D 3D 70

6C 61 74 73 65 72 76 2F 61 6C 61 72 6D 3A 62 61

64 73 71 6C 7C 49 44 3D 37 36 7C 4F 43 43 55 52

45 4E 43 45 20 4E 42 3D 31 7C 53 54 41 54 45 3D

63 6C 6F 73 65 7C 4C 45 56 45 4C 3D 62 6C 6F 63

6B 69 6E 67 7C 4F 42 4A 3D 74 65 73 74 3A 31 7C

4F 42 4A 5F 4D 4E 3D 74 65 73 74 3A 6E 6F 6E 65

7C 48 4F 53 54 3D 53 4D 50 30 31 7C 41 50 50 4C

49 3D 73 65 6E 64 65 76 65 6E 74 7C 53 45 52 56

49 43 45 3D 70 66 6D 63 6F 6E 66 69 67 7C 53 45

50 3D 7C 53 4F 55 52 43 45 3D 73 65 6E 64 65 76

65 6E 74 2E 63 78 78 7C 4C 49 4E 45 3D 32 36 32

7C 53 43 52 49 50 54 20 53 54 41 54 45 3D 7C 44

55 4D 50 3D 74 65 73 74 7C 4F 50 45 4E 20 44 41

54 45 3D 33 30 2F 30 36 2F 32 30 30 35 20 20 31

37 3A 31 37 3A 33 36 7C 43 4C 4F 53 45 20 44 41

54 45 3D 33 30 2F 30 36 2F 32 30 30 35 20 20 7C

44 45 53 43 52 49 50 54 49 4F 4E 3D 4F 72 61 63

6C 65 20 44 61 74 61 62 61 73 65 20 45 72 72 6F

72 20 77 68 69 6C 65 20 65 78 65 63 75 74 69 6E

67 20 53 51 4C 20 72 65 71 75 65 73 74 7C 43 41

55 53 45 3D 54 68 65 20 73 71 6C 20 63 6C 61 75

73 65 20 6F 66 20 61 20 65 76 65 6E 74 2F 61 6C

61 72 6D 20 73 75 62 73 63 72 69 70 74 69 6F 6E

20 69 73 20 6E 6F 74 20 76 61 6C 69 64 7C 45 46

46 45 43 54 3D 54 68 65 20 73 75 62 73 63 72 69

70 74 69 6F 6E 20 77 69 6C 6C 20 6E 6F 74 20 62

65 20 63 6F 6E 73 69 64 65 72 65 64 20 75 6E 74

69 6C 6C 20 74 68 65 20 6E 65 78 74 20 53 4D 50

20 6D 6F 64 69 66 69 63 61 74 69 6F 6E 7C 41 43

54 49 4F 4E 3D 43 68 65 63 6B 20 74 68 65 20 64

75 6D 70 20 61 6E 64 20 74 68 65 20 72 65 6C 61

74 65 64 20 6F 62 6A 65 63 74 20 74 6F 20 66 69

6E 64 20 6F 75 74 20 74 68 65 20 66 61 75 6C 74

79 20 73 75 62 73 63 72 69 70 74 69 6F 6E



>> sent 622 bytes to SNMP-alarm.162



SESSIONS:

---------

NUMBER OF SESSIONS: 0



Annex C: Trace of snoop when a trap received from pfmalarm is successfully forwarded to the snmpserver:



SMP01> snoop -d qfe1 -v host snmpserver  

Using device /dev/qfe (promiscuous mode)

ETHER:  ----- Ether Header -----

ETHER:  

ETHER:  Packet 1 arrived at 17:56:52.80

ETHER:  Packet size = 666 bytes

ETHER:  Destination = 0:0:c:7:ac:d1, Cisco

ETHER:  Source= 0:3:ba:6d:2c:cf,

ETHER:  Ethertype = 0800 (IP)

ETHER:  

IP:----- IP Header -----

IP:

IP:Version = 4

IP:Header length = 20 bytes

IP:Type of service = 0x00

IPxx. .... = 0 (precedence)

IP:...0 .... = normal delay

IP:.... 0... = normal throughput

IP:.... .0.. = normal reliability

IP:Total length = 652 bytes

IP:Identification = 28275

IP:Flags = 0x4

IP:.1.. .... = do not fragment

IP:..0. .... = last fragment

IP:Fragment offset = 0 bytes

IP:Time to live = 255 seconds/hops

IProtocol = 17 (UDP)

IP:Header checksum = 6395

IP:Source address = 10.238.209.21, SMP01_qfe1

IPestination address = 10.238.192.102, SNMP-alarm

IP:No options

IP:

UDP:  ----- UDP Header -----

UDP:  

UDP:  Source port = 34468

UDP:  Destination port = 162

UDP:  Length = 632

UDP:  Checksum = 6B8B

UDP:

论坛徽章:
0
6 [报告]
发表于 2008-06-03 23:34 |只看该作者
SMP01> /usr/lib/snmp/snmpdx -y -d4 -c /etc/snmp/conf/

Local IP Addresss : 10.10.1.21



SUBTREES:

  1.3.6.1.4.1.42.2.151 1 relay-agent  161 1



AGENTS:

  44268 relay-agent  localhost.161900000000  1  3  0 0





MANAGERS:

---------

*0

  COMMUNITIES(READ_WRITE):  private public



#EFILTER:

enterprise=" Data Networks"

  trap-num=2community-string: smp-in

snmpserver 10.238.192.102

  trap-num=1community-string: smp-in

snmpserver 10.238.192.102



TRAP RECIPIENTS:

-----------------



PDU:

----

version:0

community: public

type:GET_REQ_MSG (0xa0)

request id:0

error status: noError(0)

error index:  0

--------------------------------------------------

name: 1.3.6.1.2.1.7

type: NULL (0x5)

length:  0

value: ( )

--------------------------------------------------



PACKET:

-------

30 24 02 01 00 04 06 70 75 62 6C 69 63 A0 17 02

01 00 02 01 00 02 01 00 30 0C 30 0A 06 06 2B 06

01 02 01 07 05 00



>> sent 38 bytes to SMP01.33809



Waiting for incoming SNMP requests on UDP port 161



SESSIONS:

---------

NUMBER OF SESSIONS: 0



Annex B: Trace of snmpd with debugging enabled when a trap received from pfmalarm is successfully forwarded to the snmpserver:



<< received 42 bytes from SMP01.34347



PACKET:

-------

30 28 02 01 00 04 06 70 75 62 6C 69 63 A0 1B 02

01 41 02 01 00 02 01 00 30 10 30 0E 06 0A 2B 06

01 04 01 2A 02 0F 04 00 05 00



PDU:

----

version:0

community: public

type:GET_REQ_MSG (0xa0)

request id:65

error status: noError(0)

error index:  0

--------------------------------------------------

name: 1.3.6.1.4.1.42.2.15.4.0

type: NULL (0x5)

length:  0

value: ( )

--------------------------------------------------



## Open session 0



subtree_match() returned 1.3.6.1.4.1.42.2.15 supported by relay-agent



  address:  SMP01.34347

  n_variables: 1

  o_flags:  0x0

  i_flags:  0x0

  request 0:

session:  0

subtree:  1.3.6.1.4.1.42.2.15

visited agents:

relay-agent

agent: relay-agent (localhost.161)

flags: 0x1

state: 0

variables:

1.3.6.1.4.1.42.2.15.4.0

time:  0 sec 0 usec

expire:0 sec 0 usec



node_find() returned relayTrapPort with suffix 0



!! get(): processing the variable relayTrapPort



PDU:

----

version:0

community: public

type:GET_RSP_MSG (0xa2)

request id:65

error status: noError(0)

error index:  0

--------------------------------------------------

name: 1.3.6.1.4.1.42.2.15.4.0

type: INTEGER (0x2)

length:  4

value:34296

--------------------------------------------------



PACKET:

-------

30 2B 02 01 00 04 06 70 75 62 6C 69 63 A2 1E 02

01 41 02 01 00 02 01 00 30 13 30 11 06 0A 2B 06

01 04 01 2A 02 0F 04 00 02 03 00 85 F8



>> sent 45 bytes to SMP01.34347



## Close session 0



SESSIONS:

---------

NUMBER OF SESSIONS: 0



<< received 622 bytes from SMP01.34348



PACKET:

-------

30 82 02 6A 02 01 00 04 06 70 75 62 6C 69 63 A4

82 02 5B 06 09 2B 06 01 04 01 84 7D 45 01 40 04

0A 0A 01 15 02 01 06 02 01 02 43 04 0B 22 82 C2

30 82 02 3A 30 82 02 36 06 0B 2B 06 01 04 01 84

7D 45 01 02 00 04 82 02 25 41 4C 41 52 4D 3D 70

6C 61 74 73 65 72 76 2F 61 6C 61 72 6D 3A 62 61

64 73 71 6C 7C 49 44 3D 37 36 7C 4F 43 43 55 52

45 4E 43 45 20 4E 42 3D 31 7C 53 54 41 54 45 3D

63 6C 6F 73 65 7C 4C 45 56 45 4C 3D 62 6C 6F 63

6B 69 6E 67 7C 4F 42 4A 3D 74 65 73 74 3A 31 7C

4F 42 4A 5F 4D 4E 3D 74 65 73 74 3A 6E 6F 6E 65

7C 48 4F 53 54 3D 53 4D 50 30 31 7C 41 50 50 4C

49 3D 73 65 6E 64 65 76 65 6E 74 7C 53 45 52 56

49 43 45 3D 70 66 6D 63 6F 6E 66 69 67 7C 53 45

50 3D 7C 53 4F 55 52 43 45 3D 73 65 6E 64 65 76

65 6E 74 2E 63 78 78 7C 4C 49 4E 45 3D 32 36 32

7C 53 43 52 49 50 54 20 53 54 41 54 45 3D 7C 44

55 4D 50 3D 74 65 73 74 7C 4F 50 45 4E 20 44 41

54 45 3D 33 30 2F 30 36 2F 32 30 30 35 20 20 31

37 3A 31 37 3A 33 36 7C 43 4C 4F 53 45 20 44 41

54 45 3D 33 30 2F 30 36 2F 32 30 30 35 20 20 7C

44 45 53 43 52 49 50 54 49 4F 4E 3D 4F 72 61 63

6C 65 20 44 61 74 61 62 61 73 65 20 45 72 72 6F

72 20 77 68 69 6C 65 20 65 78 65 63 75 74 69 6E

67 20 53 51 4C 20 72 65 71 75 65 73 74 7C 43 41

55 53 45 3D 54 68 65 20 73 71 6C 20 63 6C 61 75

73 65 20 6F 66 20 61 20 65 76 65 6E 74 2F 61 6C

61 72 6D 20 73 75 62 73 63 72 69 70 74 69 6F 6E

20 69 73 20 6E 6F 74 20 76 61 6C 69 64 7C 45 46

46 45 43 54 3D 54 68 65 20 73 75 62 73 63 72 69

70 74 69 6F 6E 20 77 69 6C 6C 20 6E 6F 74 20 62

65 20 63 6F 6E 73 69 64 65 72 65 64 20 75 6E 74

69 6C 6C 20 74 68 65 20 6E 65 78 74 20 53 4D 50

20 6D 6F 64 69 66 69 63 61 74 69 6F 6E 7C 41 43

54 49 4F 4E 3D 43 68 65 63 6B 20 74 68 65 20 64

75 6D 70 20 61 6E 64 20 74 68 65 20 72 65 6C 61

74 65 64 20 6F 62 6A 65 63 74 20 74 6F 20 66 69

6E 64 20 6F 75 74 20 74 68 65 20 66 61 75 6C 74

79 20 73 75 62 73 63 72 69 70 74 69 6F 6E



PDU:

----

version:0

community: public

type:TRP_MSG (0xa4)

enterprise:1.3.6.1.4.1.637.69.1

IP agent addr: SMP01

generic:enterpriseSpecific(6)

specific:  2

time stamp:186811074

--------------------------------------------------

name: 1.3.6.1.4.1.637.69.1.2.0

type: OCTET STRING (0x4)

length:  549

value:ALARM=platserv/alarm:badsql|ID=76|OCCURENCE NB=1|STATE=close|LEVEL=blocking|OBJ=test:1|OBJ_MN=test:none|HOST=SMP01|APPLI=sendevent|SERVICE=pfmconfig|SEP=|SOURCE=sendevent.cxx|LINE=262|SCRIPT STATE=|DUMP=test|OPEN DATE=30/06/2005  17:17:36|CLOSE DATE=30/06/2005  |DESCRIPTION=Oracle Database Error while executing SQL request|CAUSE=The sql clause of a event/alarm subscription is not valid|EFFECT=The subscription will not be considered untill the next SMP modification|ACTION=Check the dump and the related object to find out the faulty subscription ( 41 4c 41 52 4d 3d 70 6c 61 74 73 65 72 76 2f 61 6c 61 72 6d 3a 62 61 64 73 71 6c 7c 49 44 3d 37 36 7c 4f 43 43 55 52 45 4e 43 45 20 4e 42 3d 31 7c 53 54 41 54 45 3d 63 6c 6f 73 65 7c 4c 45 56 45 4c 3d 62 6c 6f 63 6b 69 6e 67 7c 4f 42 4a 3d 74 65 73 74 3a 31 7c 4f 42 4a 5f 4d 4e 3d 74 65 73 74 3a 6e 6f 6e 65 7c 48 4f 53 54 3d 53 4d 50 30 31 7c 41 50 50 4c 49 3d 73 65 6e 64 65 76 65 6e 74 7c 53 45 52 56 49 43 45 3d 70 66 6d 63 6f 6e 66 69 67 7c 53 45 50 3d 7c 53 4f 55 52 43 45 3d 73 65 6e 64 65 76 65 6e 74 2e 63 78 78 7c 4c 49 4e 45 3d 32 36 32 7c 53 43 52 49 50 54 20 53 54 41 54 45 3d 7c 44 55 4d 50 3d 74 65 73 74 7c 4f 50 45 4e 20 44 41 54 45 3d 33 30 2f 30 36 2f 32 30 30 35 20 20 31 37 3a 31 37 3a 33 36 7c 43 4c 4f 53 45 20 44 41 54 45 3d 33 30 2f 30 36 2f 32 30 30 35 20 20 7c 44 45 53 43 52 49 50 54 49 4f 4e 3d 4f 72 61 63 6c 65 20 44 61 74 61 62 61 73 65 20 45 72 72 6f 72 20 77 68 69 6c 65 20 65 78 65 63 75 74 69 6e 67 20 53 51 4c 20 72 65 71 75 65 73 74 7c 43 41 55 53 45 3d 54 68 65 20 73 71 6c 20 63 6c 61 75 73 65 20 6f 66 20 61 20 65 76 65 6e 74 2f 61 6c 61 72 6d 20 73 75 62 73 63 72 69 70 74 69 6f 6e 20 69 73 20 6e 6f 74 20 76 61 6c 69 64 7c 45 46 46 45 43 54 3d 54 68 65 20 73 75 62 73 63 72 69 70 74 69 6f 6e 20 77 69 6c 6c 20 6e 6f 74 20 62 65 20 63 6f 6e 73 69 64 65 72 65 64 20 75 6e 74 69 6c 6c 20 74 68 65 20 6e 65 78 74 20 53 4d 50 20 6d 6f 64 69 66 69 63 61 74 69 6f 6e 7c 41 43 54 49 4f 4e 3d 43 68 65 63 6b 20 74 68 65 20 64 75 6d 70 20 61 6e 64 20 74 68 65 20 72 65 6c 61 74 65 64 20 6f 62 6a 65 63 74 20 74 6f 20 66 69 6e 64 20 6f 75 74 20 74 68 65 20 66 61 75 6c 74 79 20 73 75 62 73 63 72 69 70 74 69 6f 6e )

--------------------------------------------------



PDU:

----

version:0

community: smp-in

type:TRP_MSG (0xa4)

enterprise:1.3.6.1.4.1.637.69.1

IP agent addr: SMP01

generic:enterpriseSpecific(6)

specific:  2

time stamp:186813194

--------------------------------------------------

name: 1.3.6.1.4.1.637.69.1.2.0

type: OCTET STRING (0x4)

length:  549

value:ALARM=platserv/alarm:badsql|ID=76|OCCURENCE NB=1|STATE=close|LEVEL=blocking|OBJ=test:1|OBJ_MN=test:none|HOST=SMP01|APPLI=sendevent|SERVICE=pfmconfig|SEP=|SOURCE=sendevent.cxx|LINE=262|SCRIPT STATE=|DUMP=test|OPEN DATE=30/06/2005  17:17:36|CLOSE DATE=30/06/2005  |DESCRIPTION=Oracle Database Error while executing SQL request|CAUSE=The sql clause of a event/alarm subscription is not valid|EFFECT=The subscription will not be considered untill the next SMP modification|ACTION=Check the dump and the related object to find out the faulty subscription ( 41 4c 41 52 4d 3d 70 6c 61 74 73 65 72 76 2f 61 6c 61 72 6d 3a 62 61 64 73 71 6c 7c 49 44 3d 37 36 7c 4f 43 43 55 52 45 4e 43 45 20 4e 42 3d 31 7c 53 54 41 54 45 3d 63 6c 6f 73 65 7c 4c 45 56 45 4c 3d 62 6c 6f 63 6b 69 6e 67 7c 4f 42 4a 3d 74 65 73 74 3a 31 7c 4f 42 4a 5f 4d 4e 3d 74 65 73 74 3a 6e 6f 6e 65 7c 48 4f 53 54 3d 53 4d 50 30 31 7c 41 50 50 4c 49 3d 73 65 6e 64 65 76 65 6e 74 7c 53 45 52 56 49 43 45 3d 70 66 6d 63 6f 6e 66 69 67 7c 53 45 50 3d 7c 53 4f 55 52 43 45 3d 73 65 6e 64 65 76 65 6e 74 2e 63 78 78 7c 4c 49 4e 45 3d 32 36 32 7c 53 43 52 49 50 54 20 53 54 41 54 45 3d 7c 44 55 4d 50 3d 74 65 73 74 7c 4f 50 45 4e 20 44 41 54 45 3d 33 30 2f 30 36 2f 32 30 30 35 20 20 31 37 3a 31 37 3a 33 36 7c 43 4c 4f 53 45 20 44 41 54 45 3d 33 30 2f 30 36 2f 32 30 30 35 20 20 7c 44 45 53 43 52 49 50 54 49 4f 4e 3d 4f 72 61 63 6c 65 20 44 61 74 61 62 61 73 65 20 45 72 72 6f 72 20 77 68 69 6c 65 20 65 78 65 63 75 74 69 6e 67 20 53 51 4c 20 72 65 71 75 65 73 74 7c 43 41 55 53 45 3d 54 68 65 20 73 71 6c 20 63 6c 61 75 73 65 20 6f 66 20 61 20 65 76 65 6e 74 2f 61 6c 61 72 6d 20 73 75 62 73 63 72 69 70 74 69 6f 6e 20 69 73 20 6e 6f 74 20 76 61 6c 69 64 7c 45 46 46 45 43 54 3d 54 68 65 20 73 75 62 73 63 72 69 70 74 69 6f 6e 20 77 69 6c 6c 20 6e 6f 74 20 62 65 20 63 6f 6e 73 69 64 65 72 65 64 20 75 6e 74 69 6c 6c 20 74 68 65 20 6e 65 78 74 20 53 4d 50 20 6d 6f 64 69 66 69 63 61 74 69 6f 6e 7c 41 43 54 49 4f 4e 3d 43 68 65 63 6b 20 74 68 65 20 64 75 6d 70 20 61 6e 64 20 74 68 65 20 72 65 6c 61 74 65 64 20 6f 62 6a 65 63 74 20 74 6f 20 66 69 6e 64 20 6f 75 74 20 74 68 65 20 66 61 75 6c 74 79 20 73 75 62 73 63 72 69 70 74 69 6f 6e )

--------------------------------------------------



PACKET:

-------

30 82 02 6A 02 01 00 04 06 73 6D 70 2D 69 6E A4

82 02 5B 06 09 2B 06 01 04 01 84 7D 45 01 40 04

0A 0A 01 15 02 01 06 02 01 02 43 04 0B 22 8B 0A

30 82 02 3A 30 82 02 36 06 0B 2B 06 01 04 01 84

7D 45 01 02 00 04 82 02 25 41 4C 41 52 4D 3D 70

6C 61 74 73 65 72 76 2F 61 6C 61 72 6D 3A 62 61

64 73 71 6C 7C 49 44 3D 37 36 7C 4F 43 43 55 52

45 4E 43 45 20 4E 42 3D 31 7C 53 54 41 54 45 3D

63 6C 6F 73 65 7C 4C 45 56 45 4C 3D 62 6C 6F 63

6B 69 6E 67 7C 4F 42 4A 3D 74 65 73 74 3A 31 7C

4F 42 4A 5F 4D 4E 3D 74 65 73 74 3A 6E 6F 6E 65

7C 48 4F 53 54 3D 53 4D 50 30 31 7C 41 50 50 4C

49 3D 73 65 6E 64 65 76 65 6E 74 7C 53 45 52 56

49 43 45 3D 70 66 6D 63 6F 6E 66 69 67 7C 53 45

50 3D 7C 53 4F 55 52 43 45 3D 73 65 6E 64 65 76

65 6E 74 2E 63 78 78 7C 4C 49 4E 45 3D 32 36 32

7C 53 43 52 49 50 54 20 53 54 41 54 45 3D 7C 44

55 4D 50 3D 74 65 73 74 7C 4F 50 45 4E 20 44 41

54 45 3D 33 30 2F 30 36 2F 32 30 30 35 20 20 31

37 3A 31 37 3A 33 36 7C 43 4C 4F 53 45 20 44 41

54 45 3D 33 30 2F 30 36 2F 32 30 30 35 20 20 7C

44 45 53 43 52 49 50 54 49 4F 4E 3D 4F 72 61 63

6C 65 20 44 61 74 61 62 61 73 65 20 45 72 72 6F

72 20 77 68 69 6C 65 20 65 78 65 63 75 74 69 6E

67 20 53 51 4C 20 72 65 71 75 65 73 74 7C 43 41

55 53 45 3D 54 68 65 20 73 71 6C 20 63 6C 61 75

73 65 20 6F 66 20 61 20 65 76 65 6E 74 2F 61 6C

61 72 6D 20 73 75 62 73 63 72 69 70 74 69 6F 6E

20 69 73 20 6E 6F 74 20 76 61 6C 69 64 7C 45 46

46 45 43 54 3D 54 68 65 20 73 75 62 73 63 72 69

70 74 69 6F 6E 20 77 69 6C 6C 20 6E 6F 74 20 62

65 20 63 6F 6E 73 69 64 65 72 65 64 20 75 6E 74

69 6C 6C 20 74 68 65 20 6E 65 78 74 20 53 4D 50

20 6D 6F 64 69 66 69 63 61 74 69 6F 6E 7C 41 43

54 49 4F 4E 3D 43 68 65 63 6B 20 74 68 65 20 64

75 6D 70 20 61 6E 64 20 74 68 65 20 72 65 6C 61

74 65 64 20 6F 62 6A 65 63 74 20 74 6F 20 66 69

6E 64 20 6F 75 74 20 74 68 65 20 66 61 75 6C 74

79 20 73 75 62 73 63 72 69 70 74 69 6F 6E



>> sent 622 bytes to SNMP-alarm.162



SESSIONS:

---------

NUMBER OF SESSIONS: 0



Annex C: Trace of snoop when a trap received from pfmalarm is successfully forwarded to the snmpserver:



SMP01> snoop -d qfe1 -v host snmpserver  

Using device /dev/qfe (promiscuous mode)

ETHER:  ----- Ether Header -----

ETHER:  

ETHER:  Packet 1 arrived at 17:56:52.80

ETHER:  Packet size = 666 bytes

ETHER:  Destination = 0:0:c:7:ac:d1, Cisco

ETHER:  Source= 0:3:ba:6d:2c:cf,

ETHER:  Ethertype = 0800 (IP)

ETHER:  

IP:----- IP Header -----

IP:

IP:Version = 4

IP:Header length = 20 bytes

IP:Type of service = 0x00

IPxx. .... = 0 (precedence)

IP:...0 .... = normal delay

IP:.... 0... = normal throughput

IP:.... .0.. = normal reliability

IP:Total length = 652 bytes

IP:Identification = 28275

IP:Flags = 0x4

IP:.1.. .... = do not fragment

IP:..0. .... = last fragment

IP:Fragment offset = 0 bytes

IP:Time to live = 255 seconds/hops

IProtocol = 17 (UDP)

IP:Header checksum = 6395

IP:Source address = 10.238.209.21, SMP01_qfe1

IPestination address = 10.238.192.102, SNMP-alarm

IP:No options

IP:

UDP:  ----- UDP Header -----

UDP:  

UDP:  Source port = 34468

UDP:  Destination port = 162

UDP:  Length = 632

UDP:  Checksum = 6B8B

UDP:

论坛徽章:
0
7 [报告]
发表于 2010-02-04 15:49 |只看该作者
看来这个Solaris下的SNMP配置比其他的都麻烦很多!

论坛徽章:
0
8 [报告]
发表于 2010-02-04 19:09 |只看该作者
LS的文章太长了吧
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP