hello friends,
thanks Sir for replying
1) trapsess -v 3 -e 0x010203040506 -a MD5 -A auth_password -l authPriv -u
my_user -x AES128 -X priv_password localhost
2 )trap2sink localhost public 162
sir this two line were in my snmpd.conf when i send my snmp trap (using
prog) then
snmptrapd shows that trap has received like this
dump of snmptrapd as follows when i send trap using my code
Received 107 bytes from 127.0.0.1
0000: 30 69 02 01 01 04 06 70 75 62 6C 69 63 A7 5C 02 0i.....public.\.
0016: 04 7A 76 78 07 02 01 00 02 01 00 30 4E 30 0E 06 .zvx.......0N0..
0032: 08 2B 06 01 02 01 01 03 00 43 02 07 B5 30 18 06 .+.......C...0..
0048: 0A 2B 06 01 06 03 01 01 04 01 00 06 0A 2B 06 01 .+...........+..
0064: 04 01 81 84 05 00 01 30 22 06 0A 2B 06 01 04 01 .......0"..+....
0080: 81 84 05 04 00 04 14 74 65 73 74 69 6E 67 20 73 .......testing s
0096: 6E 6D 70 20 76 33 20 74 72 61 70 nmp v3
trap
2006-11-22 09:42:54 localhost.localdomain [127.0.0.1]:
DISMAN-EVENT-MIB::sysUpTimeInstance = Timeticks: (860) 0:00:08.60
SNMPv2-MIB::snmpTrapOID.0 = OID: SNMPv2-SMI::enterprises.16901.0.1
SNMPv2-SMI::enterprises.16901.4.0 = STRING: "testing snmp v3 trap"
where as snmpd -Lo -d -f shows following dump when i send trap using my code
as follow
Received 80 bytes from Local IPC: /var/agentx/master
0000: 01 01 00 00 00 00 00 00 00 00 00 00 5A A5 BD 45 ............Z..E
0016: 3C 00 00 00 00 00 00 00 05 04 00 00 01 00 00 00 <...............
0032: 88 1F 00 00 03 00 00 00 02 00 00 00 0A 00 00 00 ................
0048: 19 00 00 00 4E 65 74 2D 53 4E 4D 50 20 41 67 65 ....Net-SNMP Age
0064: 6E 74 58 20 73 75 62 2D 61 67 65 6E 74 00 00 00 ntX sub-agent...
Sending 88 bytes to Local IPC: /var/agentx/master
0000: 01 12 00 00 0F 00 00 00 00 00 00 00 5A A5 BD 45 ............Z..E
0016: 44 00 00 00 AA 1B 00 00 00 00 00 00 04 00 00 00 D...............
0032: 05 04 00 00 01 00 00 00 88 1F 00 00 03 00 00 00 ................
0048: 02 00 00 00 0A 00 00 00 19 00 00 00 4E 65 74 2D ............Net-
0064: 53 4E 4D 50 20 41 67 65 6E 74 58 20 73 75 62 2D SNMP AgentX sub-
0080: 61 67 65 6E 74 00 00 00
agent...
//( my comments)
// I think this my trap which i send using my subagent code which is
//received by master agent
Received 148 bytes from Local IPC: /var/agentx/master
0000: 01 0C 00 00 0F 00 00 00 00 00 00 00 5B A5 BD 45 ............[..E
0016: 80 00 00 00 43 00 00 00 04 02 00 00 01 00 00 00
....C...........
0032: 01 00 00 00 03 00 00 00 00 00 00 00 AC 1B 00 00
................
0048: 06 00 00 00 06 06 00 00 03 00 00 00 01 00 00 00
................
0064: 01 00 00 00 04 00 00 00 01 00 00 00 00 00 00 00
................
0080: 04 04 01 00 01 00 00 00 05 42 00 00 00 00 00 00
.........B......
0096: 01 00 00 00 04 00 00 00 04 04 00 00 01 00 00 00
................
0112: 05 42 00 00 04 00 00 00 00 00 00 00 14 00 00 00
.B..............
0128: 74 65 73 74 69 6E 67 20 73 6E 6D 70 20 76 33 20 testing snmp
v3
0144: 74 72 61
70 trap
//( my comments)
//I think this snmpv3 trap send by master agent by means of trapsess line
// in my snmpd.conf
Sending 185 bytes to 127.0.0.1
0000: 30 81 B6 02 01 03 30 11 02 04 3D 2D F9 D4 02 03
0.....0...=-....
0016: 00 FF E3 04 01 03 02 01 03 04 32 30 30 04 06 01
..........200...
0032: 02 03 04 05 06 02 01 00 02 01 00 04 08 61 69 72
.............my_
0048: 74 69 67 68 74 04 0C 8B 55 7E 9A A7 62 9C C9 89
user...U~..b...
0064: 50 CD EC 04 08 9A 82 24 A3 39 91 D8 F4 04 6A BA
P......$.9....j.
0080: A9 4F C9 33 59 F1 95 21 AC 7B E2 02 36 F3 C4 75
.O.3Y..!.{..6..u
0096: 69 C6 C4 E1 C1 C3 29 A6 1E 21 8E 88 84 70 1E BD
i.....)..!...p..
0112: DE 94 D7 D0 FC 63 6D 8A 78 C3 65 88 57 40 15 B6
[EMAIL PROTECTED]
0128: 53 11 39 B0 66 06 C9 E7 32 8A EB 12 4F 02 88 0F
S.9.f...2...O...
0144: 18 80 D1 62 6B A8 F3 7A E2 7D 87 85 A0 50 46 0E
...bk..z.}...PF.
0160: FD B7 BB 80 B3 AB C4 E5 B3 B8 DE 8B 3F EA C4 CE ............?...
0176: 42 F0 71 D5 EA CE 95 74 9C
B.q....t.
//( my comments)
// this is snmp v2 trap send by means of trap2sink line in my snmpd.conf
Sending 107 bytes to 127.0.0.1
0000: 30 69 02 01 01 04 06 70 75 62 6C 69 63 A7 5C 02
0i.....public.\.
0016: 04 53 2E 0F 79 02 01 00 02 01 00 30 4E 30 0E 06 .S..y......0N0..
0032: 08 2B 06 01 02 01 01 03 00 43 02 1B AC 30 18 06 .+.......C...0..
0048: 0A 2B 06 01 06 03 01 01 04 01 00 06 0A 2B 06 01 .+...........+..
0064: 04 01 81 84 05 00 01 30 22 06 0A 2B 06 01 04 01 .......0"..+....
0080: 81 84 05 04 00 04 14 74 65 73 74 69 6E 67 20 73 .......testing s
0096: 6E 6D 70 20 76 33 20 74 72 61 70 nmp v3
trap
//( my comments)
I haven't understood proprely why this packet are send
Sending 156 bytes to Local IPC: /var/agentx/master
0000: 01 12 00 00 0F 00 00 00 00 00 00 00 5B A5 BD 45
............[..E
0016: 88 00 00 00 AD 1B 00 00 00 00 00 00 43 00 00 00
............C...
0032: 04 02 00 00 01 00 00 00 01 00 00 00 03 00 00 00
................
0048: 00 00 00 00 AC 1B 00 00 06 00 00 00 06 06 00 00
................
0064: 03 00 00 00 01 00 00 00 01 00 00 00 04 00 00 00
................
0080: 01 00 00 00 00 00 00 00 04 04 01 00 01 00 00 00
................
0096: 05 42 00 00 00 00 00 00 01 00 00 00 04 00 00 00
.B..............
0112: 04 04 00 00 01 00 00 00 05 42 00 00 04 00 00 00
.........B......
0128: 00 00 00 00 14 00 00 00 74 65 73 74 69 6E 67 20
........testing
0144: 73 6E 6D 70 20 76 33 20 74 72 61 70 snmp v3
trap
Received 185 bytes from 127.0.0.1
0000: 30 81 B6 02 01 03 30 11 02 04 3D 2D F9 D4 02 03
0.....0...=-....
0016: 00 FF E3 04 01 03 02 01 03 04 32 30 30 04 06 01
..........200...
0032: 02 03 04 05 06 02 01 00 02 01 00 04 08 61 69 72
.............my_
0048: 74 69 67 68 74 04 0C 8B 55 7E 9A A7 62 9C C9 89
user...U~..b...
0064: 50 CD EC 04 08 9A 82 24 A3 39 91 D8 F4 04 6A BA
P......$.9....j.
0080: A9 4F C9 33 59 F1 95 21 AC 7B E2 02 36 F3 C4 75
.O.3Y..!.{..6..u
0096: 69 C6 C4 E1 C1 C3 29 A6 1E 21 8E 88 84 70 1E BD
i.....)..!...p..
0112: DE 94 D7 D0 FC 63 6D 8A 78 C3 65 88 57 40 15 B6
[EMAIL PROTECTED]
0128: 53 11 39 B0 66 06 C9 E7 32 8A EB 12 4F 02 88 0F
S.9.f...2...O...
0144: 18 80 D1 62 6B A8 F3 7A E2 7D 87 85 A0 50 46 0E
...bk..z.}...PF.
0160: FD B7 BB 80 B3 AB C4 E5 B3 B8 DE 8B 3F EA C4 CE ............?...
0176: 42 F0 71 D5 EA CE 95 74
9C B.q....t.
Received SNMP packet(s) from 127.0.0
by looking at both dump of snmpd & snmptrapd i understood that
snmpv3 packet send by snmpd to destination was not received by snmptrapd
as i said for enabling snmptrapd to receive snmp v3 trap i also configured
snmpv3
user in snmptrapd.conf as follows
createUser -e 0x010203040506 my_user MD5 auth_password AES128 priv_password
preserving same engine ID at both palce ie snmpd.conf & snmptrapd.conf
what may be the problem sir ? why snmpv3 trap not get receive by snmptrapd ?
sir one more question i want ask .
is any port number we can configured in trapsess so as to send trap to
specific desti:port?
Thank one again sir for replying
Thank in advance
Regards
Bhushan E. Sonawane
On 11/21/06, Dave Shield <[EMAIL PROTECTED]> wrote:
On 21/11/06, bhushan <[EMAIL PROTECTED]> wrote:
> i am running snmptrapd as follow
> snmptrapd -f -Lo -C -c /etc/snmp/snmptrapd.conf -d localhost
OK - that '-d' flag is a good idea, because it will show the raw dumps of
incoming traps *before* they are processed.
Are you seeing anything at all coming in?
If not, then it's either going to be that the agent isn't sending things
to the
correct place, or that something is getting in the way.
Try running the master agent using '-f -Lo -d' as well, and have your
subagent
send the trap as before. You should see two packet dumps from the master
agent - one of the trap coming in from the subagent, and one (or possibly
two)
of the trap going out again to snmptrapd.
Do you see this, or not? If you do, then what is the header line for
these
outgoing trap dumps?
What does snmptrapd display when it starts up?
Dave
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Net-snmp-coders mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders