Hello Dave
Thanks for the command, but this is not what I'd like to have....
Namely, on the client side is received:
"......neta4-pm:/home/easfsc# tcpdump -nnr traps40.pcap
reading from file traps40.pcap, link-type EN10MB (Ethernet)
10:39:20.740420 IP 10.140.20.71.56185 > 10.140.20.69.162: V2Trap(251)
.1.3.6.1.2.1.1.3.0=1286381362
.1.3.6.1.6.3.1.1.4.1.0=.1.3.6.1.4.1.193.109.2.0.3
.1.3.6.1.4.1.193.72.500.1.1.0="EAN"
.1.3.6.1.4.1.193.72.500.1.2.0="EAN=10.93.112.14,EFN324xf,Port=1002.0.12"
.1.3.6.1.4.1.193.72.500.1.3.0=24
.1.3.6.1.4.1.193.72.500.1.4.0=1
.1.3.6.1.4.1.193.72.500.1.4.0=07_dc_01_11_0d_02_37_59_2b_00_00
.1.3.6.1.4.1.193.72.500.1.6.0=2 .1.3.6.1.4.1.193.72.500.1.7.0=65
neta4-pm:/home/easfsc#....."
Note: IP 10.140.20.71.56185 is Agent's IP !!!
Back, to my problem:
I'd like to use the command snmptrap (?) to reach following scenarios
Agent Client
(10.140.20.71) (10.140.20.69)
| |
snmptrap * | |
=========> | |
| Notification (SNMP v2) |
| ============================> |
| source ** |
| destination (10.140.20.69) |
| and so on... |
| |
| |
* a) snmptrap -v 2c [COMMON OPTIONS] [-Ci] uptime trap-oid [OID TYPE VALUE]...
Note: there is no possibility to generate wanted source with this command,
i.e. Agent address (10.140.20.71) will be always in source ....as
in an example above
b) snmptrap -v 1 [COMMON OPTIONS] [-Ci] destination enterprise-oid agent
generic-trap specific-trap uptime [OID TYPE VALUE]
Note: there is possibility to generate wanted source (parameter agent)
with this command, but the protocol
to the client is not SNMP v2 !!!
** One of IP address from FTTH (fiber to the home) network
e.g. SmartMetro (10.93.50.111) or ECN (10.93.112.3)
Note: in the source should not be Agent address (10.140.20.71)
How to find an appropriate solution ?
Kind Regards,
Zeljko
===================================================================================================
-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf
Of Dave Shield
Sent: Mittwoch, 29. Februar 2012 10:11
To: Zeljko Mihelcic
Cc: [email protected]
Subject: Re: command snmptrap (a command line interface) using SNMP v2
On 29 February 2012 08:30, Zeljko Mihelcic <[email protected]> wrote:
> c) "and so on..." means: elements/parameters in SNMP v2 protocol e.g..
> As in an example
>
> time
> 14:02:55.912422 source
> 10.93.112.14.32771 destination
> 10.140.20.69.162 .1.3.6.1.2.1.1.3(sysUpTime )
> 1246333
> .1.3.6.1.6.3.1.1.4.1(snmpTrapOID)
> .1.3.6.1.4.1.193.109.2.0.3(elnLinkUp)
> .1.3.6.1.4.1.193.72.500.1.1.0 (param1...managedObjectClass) EAN
> .1.3.6.1.4.1.193.72.500.1.2.0 (param2...managedObjectInstance)
> EAN=10.93.112.14,EFN324xf,Port=1002.0.12
> .1.3.6.1.4.1.193.72.500.1.3.0 (param3...sequenceNumber)
> 24 .1.3.6.1.4.1.193.72.500.1.4.0 (param4...perceivedSeverity)
> 1 .1.3.6.1.4.1.193.72.500.1.5.0 (param5...eventTime)
> 07_dc_01_11_0d_02_37_59_2b_00_00 .1.3.6.1.4.1.193.72.500.1.6.0
> (param6...eventTypePem) 2
> .1.3.6.1.4.1.193.72.500.1.7.0 (param7...probableCause)
> 65
Try the command
snmptrap -v 2c -c public 10.140.20.69 '' .1.3.6.1.4.1.193.109.2.0.3
.1.3.6.1.4.1.193.72.500.1.1.0 s "EAN"
.1.3.6.1.4.1.193.72.500.1.2.0 s
"EAN=10.93.112.14,EFN324xf,Port=1002.0.12"
.1.3.6.1.4.1.193.72.500.1.3.0 i 24
.1.3.6.1.4.1.193.72.500.1.4.0 i 1
.1.3.6.1.4.1.193.72.500.1.4.0 x 0x07dc01110d0237592b0000
.1.3.6.1.4.1.193.72.500.1.6.0 i 2
.1.3.6.1.4.1.193.72.500.1.7.0 i 65
(all on one line).
You may need to tweak the types/values a bit - you haven't said anything about
the syntax/definitions of these MIB objects, so I've been forced to guess.
But that should give you the basic idea.
> e) Reading FAQ "How can I get the agent to send an SNMPv1 (or SNMPv2c) trap?"
That question is talking about how to get the *agent* to send a trap.
You've been asking about how to use "snmptrap" to send the trap.
These are two very different approaches - don't try to equate the two.
Dave
------------------------------------------------------------------------------
Virtualization & Cloud Management Using Capacity Planning
Cloud computing makes use of virtualization - but cloud computing
also focuses on allowing computing to be delivered as a service.
http://www.accelacomm.com/jaw/sfnl/114/51521223/
_______________________________________________
Net-snmp-coders mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders