[prev in list] [next in list] [prev in thread] [next in thread] 

List:       net-snmp-users
Subject:    Re: snmptrapd: Verify trapversion of incoming traps
From:       Pushpa Thimmaiah <pushpa.thimmaiah () gmail ! com>
Date:       2014-12-30 6:49:59
Message-ID: CAASqVJU-d=aVNBeZ7cb=jd4vczWcqJArM+fw3bghSsbsXe9OLg () mail ! gmail ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


Thank you Dharm.




On Mon, Dec 29, 2014 at 12:40 PM, Dharm S <dharm.sk2014@gmail.com> wrote:

> Hi Pushpa,
>
> As far as I have observed the traps and understood from the tutorials on
> web, the PDU formats of SNMPv2 and SNMPv3 are same and its just that there
> is additional authentication for SNMPv3. Therefore you get similar output
> in cases 2 and 3.
>
> Thanks,
> Dharm
>
> On Mon, Dec 29, 2014 at 11:49 AM, Pushpa Thimmaiah <
> pushpa.thimmaiah@gmail.com> wrote:
>
>> Hi Folks,
>>
>> Can anybody tell me how can I check version(snmp2c/3) of received traps
>> by 'snmptrapd' ?
>>
>> Settings:
>> runnging snmpd, snmptrapd and snmptrap on same system (localhost)
>>
>> *CASE 1: SNMPv1*
>> send snmpv1 trap --->
>>
>> snmptrap -v 1 -c public localhost .1.3.6.1.4.1.8072.2.3.1 localhost 2 0
>> "" >.1.3.6.1.4.1.8072.2.1.1 i 123
>>
>> snmpv1 trap received by snmptrapd --->
>>
>> 2014-12-24 11:17:06 localhost [127.0.0.1] (via UDP:
>> [127.0.0.1]:51079->[127.0.0.1]) TRAP, >SNMP v1, community public
>> iso.3.6.1.4.1.8072.2.3.1 Link Down Trap (0) Uptime: 1:46:24.34
>> iso.3.6.1.4.1.8072.2.1.1 = INTEGER: 123
>>
>> *CASE 2: SNMPv2c*
>> send snmpv2c trap --->
>>
>> snmptrap -v 2c -c public localhost 69 .1.3.6.1.4.1.8072.2.3.1
>> .1.3.6.1.4.1.8072.2.1.1 i 123
>>
>> snmpv2c trap received by snmptrapd --->
>>
>> 2014-12-24 11:28:52 localhost [UDP: [127.0.0.1]:35333->[127.0.0.1]]:
>> iso.3.6.1.2.1.1.3.0 = Timeticks: (69) 0:00:00.69 iso.3.6.1.6.3.1.1.4.1.0 =
>> OID: >iso.3.6.1.4.1.8072.2.3.1 iso.3.6.1.4.1.8072.2.1.1 = INTEGER:
>> 123                   <---------------------  log A
>>
>> *CASE 3: SNMPv3*
>> send snmpv3 trap --->
>>
>> snmptrap -v 3 -n "" -a SHA -A mypassword -x AES -X mypassword -l authPriv
>> -u traptest -e >0x80001f880300b0ae000000 localhost 69
>> .1.3.6.1.4.1.8072.2.3.1 .1.3.6.1.4.1.8072.2.1.1 i 123
>>
>> snmpv3 trap received by snmptrapd --->
>>
>> 2014-12-24 11:10:49 localhost [UDP: [127.0.0.1]:35306->[127.0.0.1]]:
>> iso.3.6.1.2.1.1.3.0 = Timeticks: (69) 0:00:00.69 iso.3.6.1.6.3.1.1.4.1.0 =
>> OID: >iso.3.6.1.4.1.8072.2.3.1 iso.3.6.1.4.1.8072.2.1.1 = INTEGER:
>> 123                <---------------------------- log B
>>
>> Question: In case 2 and 3  , trap received by snmptrapd (i.e log A and
>> log B) is same. How to make out trap version of the traps been received by
>> snmptrapd?
>>
>>
>>
>> Thank you,
>>
>> Pushpa
>>
>>
>> ------------------------------------------------------------------------------
>> Dive into the World of Parallel Programming! The Go Parallel Website,
>> sponsored by Intel and developed in partnership with Slashdot Media, is
>> your
>> hub for all things parallel software development, from weekly thought
>> leadership blogs to news, videos, case studies, tutorials and more. Take a
>> look and join the conversation now. http://goparallel.sourceforge.net
>> _______________________________________________
>> Net-snmp-users mailing list
>> Net-snmp-users@lists.sourceforge.net
>> Please see the following page to unsubscribe or change other options:
>> https://lists.sourceforge.net/lists/listinfo/net-snmp-users
>>
>>
>

[Attachment #5 (text/html)]

<div dir="ltr">Thank you Dharm.   <br><div><br><br><br></div></div><div \
class="gmail_extra"><br><div class="gmail_quote">On Mon, Dec 29, 2014 at 12:40 PM, \
Dharm S <span dir="ltr">&lt;<a href="mailto:dharm.sk2014@gmail.com" \
target="_blank">dharm.sk2014@gmail.com</a>&gt;</span> wrote:<br><blockquote \
class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc \
solid;padding-left:1ex"><div dir="ltr"><div>Hi Pushpa,<br><br>As far as I have \
observed the traps and understood from the tutorials on web, the PDU formats of \
SNMPv2 and SNMPv3 are same and its just that there is additional authentication for \
SNMPv3. Therefore you get similar output in cases 2 and \
3.<br><br></div><div>Thanks,<br></div><div>Dharm<br></div></div><div \
class="gmail_extra"><br><div class="gmail_quote"><div><div class="h5">On Mon, Dec 29, \
2014 at 11:49 AM, Pushpa Thimmaiah <span dir="ltr">&lt;<a \
href="mailto:pushpa.thimmaiah@gmail.com" \
target="_blank">pushpa.thimmaiah@gmail.com</a>&gt;</span> \
wrote:<br></div></div><blockquote class="gmail_quote" style="margin:0 0 0 \
.8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="h5"><div \
dir="ltr"><div>

        <p>Hi Folks,</p><p>Can anybody tell me how can I check version(snmp2c/3) of \
received traps by &#39;snmptrapd&#39; ? <br></p>

<p>Settings:<br>
runnging snmpd, snmptrapd and snmptrap on same system (localhost)</p>

<p><strong>CASE 1: SNMPv1</strong><br>
send snmpv1 trap ---&gt; </p>

<blockquote>
  <p>snmptrap -v 1 -c public localhost .1.3.6.1.4.1.8072.2.3.1 localhost 2 0 \
&quot;&quot; &gt;.1.3.6.1.4.1.8072.2.1.1 i 123</p> </blockquote>

<p>snmpv1 trap received by snmptrapd ---&gt; </p>

<blockquote>
  <p>2014-12-24 11:17:06 localhost [127.0.0.1] (via UDP: 
[127.0.0.1]:51079-&gt;[127.0.0.1]) TRAP, &gt;SNMP v1, community public  
 iso.3.6.1.4.1.8072.2.3.1 Link Down Trap (0) Uptime: 1:46:24.34
  iso.3.6.1.4.1.8072.2.1.1 = INTEGER: 123 </p>
</blockquote>

<p><strong>CASE 2: SNMPv2c</strong><br>
send snmpv2c trap ---&gt; </p>

<blockquote>
  <p>snmptrap -v 2c -c public localhost 69 .1.3.6.1.4.1.8072.2.3.1 \
.1.3.6.1.4.1.8072.2.1.1 i 123</p> </blockquote>

<p>snmpv2c trap received by snmptrapd ---&gt;</p>

<blockquote>
  <p>2014-12-24 11:28:52 localhost [UDP: 
[127.0.0.1]:35333-&gt;[127.0.0.1]]:
  iso.3.6.1.2.1.1.3.0 = Timeticks: (69) 0:00:00.69   
iso.3.6.1.6.3.1.1.4.1.0 = OID: &gt;iso.3.6.1.4.1.8072.2.3.1    
iso.3.6.1.4.1.8072.2.1.1 = INTEGER: 123                                     \
&lt;---------------------   log A<br></p> </blockquote>

<p><strong>CASE 3: SNMPv3</strong><br>
send snmpv3 trap ---&gt; </p>

<blockquote>
  <p>snmptrap -v 3 -n &quot;&quot; -a SHA -A mypassword -x AES -X mypassword -l 
authPriv -u traptest -e &gt;0x80001f880300b0ae000000 localhost 69 
.1.3.6.1.4.1.8072.2.3.1 .1.3.6.1.4.1.8072.2.1.1 i 123</p>
</blockquote>

<p>snmpv3 trap received by snmptrapd ---&gt; </p>

<blockquote>
  <p>2014-12-24 11:10:49 localhost [UDP: 
[127.0.0.1]:35306-&gt;[127.0.0.1]]:
  iso.3.6.1.2.1.1.3.0 = Timeticks: (69) 0:00:00.69   
iso.3.6.1.6.3.1.1.4.1.0 = OID: &gt;iso.3.6.1.4.1.8072.2.3.1    
iso.3.6.1.4.1.8072.2.1.1 = INTEGER: 123                               \
&lt;---------------------------- log B<br></p> </blockquote>

<p>Question: 
In case 2 and 3   , trap received by snmptrapd (i.e log A and log B) is same. How to \
make out trap version of the traps been received by \
snmptrapd?</p><p><br></p><p><br></p><p>Thank you,</p><p>Pushpa<br></p>

    </div>
    
        </div>
<br></div></div>------------------------------------------------------------------------------<br>
 Dive into the World of Parallel Programming! The Go Parallel Website,<br>
sponsored by Intel and developed in partnership with Slashdot Media, is your<br>
hub for all things parallel software development, from weekly thought<br>
leadership blogs to news, videos, case studies, tutorials and more. Take a<br>
look and join the conversation now. <a href="http://goparallel.sourceforge.net" \
target="_blank">http://goparallel.sourceforge.net</a><br>_______________________________________________<br>
 Net-snmp-users mailing list<br>
<a href="mailto:Net-snmp-users@lists.sourceforge.net" \
target="_blank">Net-snmp-users@lists.sourceforge.net</a><br> Please see the following \
page to unsubscribe or change other options:<br> <a \
href="https://lists.sourceforge.net/lists/listinfo/net-snmp-users" \
target="_blank">https://lists.sourceforge.net/lists/listinfo/net-snmp-users</a><br> \
<br></blockquote></div><br></div> </blockquote></div><br></div>



------------------------------------------------------------------------------
Dive into the World of Parallel Programming! The Go Parallel Website,
sponsored by Intel and developed in partnership with Slashdot Media, is your
hub for all things parallel software development, from weekly thought
leadership blogs to news, videos, case studies, tutorials and more. Take a
look and join the conversation now. http://goparallel.sourceforge.net

_______________________________________________
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic