Hello Thanks for the suggestion, but I don't like to change nothing in the client/receiver. This is not only the protocol "transfer" of element/parameter, but also "activation" and "support" of this parameter (snmpTrapAddress.0) in the receiving side (could be very complex) We should go to find the solution on the agent side.
BR / Zeljko -----Original Message----- From: Eirik Nordbrøden [mailto:[email protected]] Sent: Donnerstag, 1. März 2012 11:51 To: Zeljko Mihelcic; [email protected] Subject: RE: command snmptrap (a command line interface) using SNMP v2 Hello I think you should consider a third option and that is to "simulate" that you are an SNMP V1 to V2 proxy agent and add the snmpTrapAddress.0 = <agent address> to the traps (see RFC 2576). You might need to tweak the receiver side though. Eirik Nordbrøden, Morecom A/S (+47) 90174789 From: Zeljko Mihelcic [mailto:[email protected]] Sent: 1. mars 2012 11:19 To: [email protected] Cc: [email protected]; Mihelcic; Zeljko; Robert Story Subject: command snmptrap (a command line interface) using SNMP v2 Hi to all With your helpful answers, following statements are clear: - I'd like to use only sending of notification towards known client, i.e. no any response from it - snmptrap doesn't ever communicate with the agent. It sends traps directly - the agent doesn't support source address spoofing either - In both case a) and case b) the source address of the package is set to 10.140.20.71. And new aspects/suggestions are proposed: a) It would probably be easier to use iptables/netfilter to rewrite addresses... b) You could use the agentxtrap command to......but there would still be no support for source address spoofing Note: with this suggestion the problem is still the same That means, for the moment, only case a) is visible as an solution Note: with case b) the problem is still the same Please, could you give me more details in this particular (case a)) solution ? BR / Zeljko On 29. February 2012 17:27 Robert Story <[email protected]> wrote: RS> First of all, snmptrap doesn't ever communicate with the agent. It sends traps directly. RS> Secondly, the agent doesn't support source address spoofing either. RS> To do what you want, net-snmp would have to be modified to allow address spoofing. It would probably be easier to use iptables/netfilter to rewrite addresses... On 29. February 2012 18:08 Dave Shield [[email protected]] wrote: DS> I tried this... unfortunately you can only specify an address for which you have an interface configured... DS> If he wants to simulate 100 devices, he'd have to configure 100 aliases on an interface. DS> Errr - yes. If you're sending a message from a particular address, DS>then an interface with that address needs to exist and be valid. DS> Otherwise, how can you expect to receive any responses sent back to that address, for example? On 01. March 2012 18:08 Magnus Fromreide [[email protected]] wrote: MF> As a matter of fact this is wrong. In both case a) and case b) the MF> source address of the package is set to 10.140.20.71. The agent parameter to v1-traps does not affect the MF> source address, it only affects the agent-addr data field of the package. Proxies that translate to v2-notifications should convert that to a data item with OID snmpTrapAddress.0. MF> You could use the agentxtrap command to, as your picture shows, tell the agent to issue a trap or notification in accordance with it's configuration but there would still be MF> no support for source address spoofing. ------------------------------------------------------------------------------ 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
