Re: Hi

2004-09-10 Thread Sitaraman .V.R
Hi Dave,
 While the below works(case1), it appears even with increasing OID listing
there are cases where the agent does not start. Case4, Case5 and Case6.
Sitaraman
 Try moving the 'LABCALLSINDEX' entry to immediately after the
 'EXAMPLETIMETICKS' entry.
 
 (Though you shouldn't actually have a scalar object and a table with the
 same first subidentifier value either - you'll need to change one of these)
 
 
 Dave
 
 
 
 ---
 This SF.Net email is sponsored by BEA Weblogic Workshop
 FREE Java Enterprise J2EE developer tools!
 Get your free copy of BEA WebLogic Workshop 8.1 today.
 http://ads.osdn.com/?ad_id=5047alloc_id=10808op=click
 ___
 Net-snmp-users mailing list
 [EMAIL PROTECTED]
 Please see the following page to unsubscribe or change other options:
 https://lists.sourceforge.net/lists/listinfo/net-snmp-users
 Case1: 

Code:
struct variable3 example_variables[] = {
{EXAMPLESTRING,   ASN_OCTET_STR, RONLY, var_example, 1, {1}},
#if 0
{EXAMPLETIMETICKS,ASN_TIMETICKS, RONLY, var_example, 1, {2}},
{EXAMPLEIPADDRESS,ASN_IPADDRESS, RONLY, var_example, 1, {3}},
{EXAMPLECOUNTER,  ASN_COUNTER, RONLY,   var_example, 1, {4}},
{EXAMPLEGAUGE,ASN_GAUGE, RONLY, var_example, 1, {5}},
{EXAMPLETRIGGERTRAP,  ASN_INTEGER, RWRITE,  var_example, 1, {6}},
{EXAMPLETRIGGERTRAP2, ASN_INTEGER, RWRITE,  var_example, 1, {7}},
{LABSTRING,   ASN_OCTET_STR, RONLY, var_example, 1, {8}},
#endif
{LABCALLSINDEX,   ASN_INTEGER, RONLY,   var_example, 3, {2,1,1}},
{EXAMPLETIMETICKS,ASN_TIMETICKS, RONLY, var_example, 1, {9}} 
};

Results: Agent Starts
 Log File is snmpdLogCase1.txt



Case2:
Code: 
struct variable3 example_variables[] = {
{EXAMPLESTRING,   ASN_OCTET_STR, RONLY, var_example, 1, {1}},
{EXAMPLETIMETICKS,ASN_TIMETICKS, RONLY, var_example, 1, {2}},
{EXAMPLEIPADDRESS,ASN_IPADDRESS, RONLY, var_example, 1, {3}},
{EXAMPLECOUNTER,  ASN_COUNTER, RONLY,   var_example, 1, {4}},
{EXAMPLEGAUGE,ASN_GAUGE, RONLY, var_example, 1, {5}},
{EXAMPLETRIGGERTRAP,  ASN_INTEGER, RWRITE,  var_example, 1, {6}},
{EXAMPLETRIGGERTRAP2, ASN_INTEGER, RWRITE,  var_example, 1, {7}},
{LABSTRING,   ASN_OCTET_STR, RONLY, var_example, 1, {8}},
{LABCALLSINDEX,   ASN_INTEGER, RONLY,   var_example, 3, {2,1,1}},
{EXAMPLETIMETICKS,ASN_TIMETICKS, RONLY, var_example, 1, {9}} 
};

Results: Agent Does Not Start
Log file is snmpdLogCase2.txt





Case3:
Code
struct variable3 example_variables[] = {
{EXAMPLESTRING,   ASN_OCTET_STR, RONLY, var_example, 1, {1}},
{EXAMPLETIMETICKS,ASN_TIMETICKS, RONLY, var_example, 1, {2}},
#if 0
{EXAMPLEIPADDRESS,ASN_IPADDRESS, RONLY, var_example, 1, {3}},
{EXAMPLECOUNTER,  ASN_COUNTER, RONLY,   var_example, 1, {4}},
{EXAMPLEGAUGE,ASN_GAUGE, RONLY, var_example, 1, {5}},
{EXAMPLETRIGGERTRAP,  ASN_INTEGER, RWRITE,  var_example, 1, {6}},
{EXAMPLETRIGGERTRAP2, ASN_INTEGER, RWRITE,  var_example, 1, {7}},
{LABSTRING,   ASN_OCTET_STR, RONLY, var_example, 1, {8}},
#endif
{LABCALLSINDEX,   ASN_INTEGER, RONLY,   var_example, 3, {2,1,1}},
{EXAMPLETIMETICKS,ASN_TIMETICKS, RONLY, var_example, 1, {9}} 
};


Result: Agent Starts
Log file snmpdLogCase3.txt



Case4:
struct variable3 example_variables[] = {
{EXAMPLESTRING,   ASN_OCTET_STR, RONLY, var_example, 1, {1}},
{EXAMPLETIMETICKS,ASN_TIMETICKS, RONLY, var_example, 1, {2}},
{EXAMPLEIPADDRESS,ASN_IPADDRESS, RONLY, var_example, 1, {3}},
{EXAMPLECOUNTER,  ASN_COUNTER, RONLY,   var_example, 1, {4}},
{EXAMPLEGAUGE,ASN_GAUGE, RONLY, var_example, 1, {5}},
{EXAMPLETRIGGERTRAP,  ASN_INTEGER, RWRITE,  var_example, 1, {6}},
{EXAMPLETRIGGERTRAP2, ASN_INTEGER, RWRITE,  var_example, 1, {7}},
{LABSTRING,   ASN_OCTET_STR, RONLY, var_example, 1, {8}},
{LABCALLSINDEX,   ASN_INTEGER, RONLY,   var_example, 3, {17,1,1}},
{EXAMPLETIMETICKS,ASN_TIMETICKS, RONLY, var_example, 1, {19}} 
};

Result Agent Does Not Start
   Log File snmpdLogCase4.txt



Case5:
struct variable3 example_variables[] = {
{EXAMPLESTRING,   ASN_OCTET_STR, RONLY, var_example, 1, {1}},
{EXAMPLETIMETICKS,ASN_TIMETICKS, RONLY, var_example, 1, {2}},
{EXAMPLEIPADDRESS,ASN_IPADDRESS, RONLY, var_example, 1, {3}},
{EXAMPLECOUNTER,  ASN_COUNTER, RONLY,   var_example, 1, {4}},
{EXAMPLEGAUGE,ASN_GAUGE, RONLY, var_example, 1, {5}},
{EXAMPLETRIGGERTRAP,  ASN_INTEGER, RWRITE,  var_example, 1, {6}},
{EXAMPLETRIGGERTRAP2, ASN_INTEGER, RWRITE,  var_example, 1, {7}},
{LABSTRING,   ASN_OCTET_STR, RONLY, var_example, 1, {8}},
{LABCALLSINDEX,   ASN_INTEGER, RONLY,   var_example, 3, {9,1,1}},
{EXAMPLETIMETICKS,ASN_TIMETICKS, RONLY, var_example, 1, 

RE: Hex-to-ASCII of varbins

2004-09-10 Thread HOFKENS Hans \(BMB\)
This is from the veritas cluster server mib...
The OID of the varbin is 1302.8.10.1.14.
Even in ethereal it doesn't get printed as ascii. The last char  is a
0x0a.

Thanks 

Hans

-Original Message-
From: Dave Shield [mailto:[EMAIL PROTECTED] 
Sent: Thursday, September 09, 2004 5:38 PM
To: HOFKENS Hans (BMB)
Cc: [EMAIL PROTECTED]
Subject: Re: Hex-to-ASCII of varbins 



 I asked this because the variable I was having problems with was 
 defined as displayString...
 The value send over was:Thu Sep  9 12:51:24 2004. 
 
 Don't know why it got printed out as hex...

Hmmm  nope - neither do I.
If the MIB file was being loaded, then the DisplayString should have
been recognised and hence triggered the use of the DISPLAY HINT.

And even without this, that particular string should be regarded as
printable.

Sudden thought - Unless there's a trailing new-line character that
confused the hex-check.   If you use '-Ox' to force a hex output,
what's the last character of this value?   0x2e or something else?


SYNTAX DisplayString (SIZE (0..50))

I'm not sure offhand whether it's legal to sub-type Textual Conventions
in this way.   I have a sneaking suspicion that DisplayString is fixed
as being (0..255), and if you need a shorter limit, then you'd either
have to mention this in the DESCRIPTION clause, or define a new TC
DisplayString50 with the shorter length.

But again, our MIB parser probably won't complain.

Dave



 DISCLAIMER 

This e-mail and any attachment thereto may contain information which is confidential 
and/or protected by intellectual property rights and are intended for the sole use of 
the recipient(s) named above. 
Any use of the information contained herein (including, but not limited to, total or 
partial reproduction, communication or distribution in any form) by other persons than 
the designated recipient(s) is prohibited. 
If you have received this e-mail in error, please notify the sender either by 
telephone or by e-mail and delete the material from any computer.

Thank you for your cooperation.

For further information about Proximus mobile phone services please see our website at 
http://www.proximus.be or refer to any Proximus agent.



snmp.out
Description: snmp.out


Re: SNMPv3 and encryption

2004-09-10 Thread Dave Shield
 I put the following in /var/net-snmp/snmpd.conf:
 
   createUser admin MD5 admin DES

 [but] When I try:
 
   snmpwalk -v 3 -n  -u admin -a MD5 -A adminpwd -x DES -X adminpwd
   -l authPriv theserver system
 
 I get:
   snmpwalk: Decryption error


Either adminpwd should be admin in the command,
or (the second) admin should be adminpwd in the createUser line.



 and 
   snmpwalk -v 3 -n  -u admin -a MD5 -A adminpwd -l authNoPriv ipm system
 
 gives
 
   Error in packet.
   Reason: authorizationError (access denied to that object)

That's because of the access line:

  accessadminanypriv   exact  all   allall
   

You've explicitly requested privacy, so 'authNoPriv' doesn't match.

I'd suggest you downgrade this to be auth rather than priv,
make sure the passwords are consistent, and concentrate on getting
SNMPv3 authentication working first.
  *Then* try adding privacy as well.

Dave



---
This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170
Project Admins to receive an Apple iPod Mini FREE for your judgement on
who ports your project to Linux PPC the best. Sponsored by IBM.
Deadline: Sept. 13. Go here: http://sf.net/ppc_contest.php
___
Net-snmp-users mailing list
[EMAIL PROTECTED]
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users


Re: PLEASE HELP - newbie question

2004-09-10 Thread Dave Shield

 I am sorry for boring you again with this basic question but I can't
 understand it. 

Can you PLEASE show a little patience!
You've now asked the same question *three* times in as many days!

You are not paying anything towards the support of this code, and it
is unreasonable to expect us to drop everything (including stuff we
*are* being paid to do) just to answer your questions immediately.


Nagging the list and pissing off the developers is *NOT* the best
way to encourage a helpful response!

Dave



---
This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170
Project Admins to receive an Apple iPod Mini FREE for your judgement on
who ports your project to Linux PPC the best. Sponsored by IBM. 
Deadline: Sept. 13. Go here: http://sf.net/ppc_contest.php
___
Net-snmp-users mailing list
[EMAIL PROTECTED]
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users


5.1.1 pass problem (maybe timeout)

2004-09-10 Thread Javier Szyszlican
Hi,
I'm having problems using 'pass' with 5.1.1
I made a script and it worked before, but now, after an upgrade it doesn't work 
anymore.

But if I do a strace of the snmpd daemon, then it works, its like an internal 
timeout problem. If I make the daemon slower, then it returns the values.

Anyone has any idea?
Thanks,
Javier
--
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Javier Szyszlican, Project Leader, JFFNMS
[EMAIL PROTECTED]

---
This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170
Project Admins to receive an Apple iPod Mini FREE for your judgement on
who ports your project to Linux PPC the best. Sponsored by IBM. 
Deadline: Sept. 13. Go here: http://sf.net/ppc_contest.php
___
Net-snmp-users mailing list
[EMAIL PROTECTED]
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users


Re: SNMPv3 and encryption

2004-09-10 Thread cnelson
  ...
  I'd suggest you downgrade this to be auth rather than priv,
  make sure the passwords are consistent, and concentrate on getting
  SNMPv3 authentication working first.
   *Then* try adding privacy as well.
 
 Thanks.  I've got auth working and imagine priv isn't far behind.  

I spoke too soon.  In /var/net-snmp/snmpd.conf, I've tried:

   createUser admin MD5 adminpwd DES adminpwd

and

   createUser admin MD5 adminpwd DES

and in /usr/share/snmp/snmpd.conf, I've got:

  accessadminanyauth   exact  all   allall
  accessadminanypriv   exact  all   allall

Which I _think_ gives admin the same access whether using privacy or not.  I've tried 
this with and without the auth line.  After rebooting the system where the agent runs 
and seeing createUser turned into usmUser, I see:

  $ snmpwalk -v 3 -n  -u admin -a MD5 -A adminpwd -x DES -X adminpwd -l authPriv 
theserver system
  snmpwalk: Decryption error

Is this snmpwalk saying it couldn't decrpyt what came back from the agent?  How do I 
fix it?



---
This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170
Project Admins to receive an Apple iPod Mini FREE for your judgement on
who ports your project to Linux PPC the best. Sponsored by IBM. 
Deadline: Sept. 13. Go here: http://sf.net/ppc_contest.php
___
Net-snmp-users mailing list
[EMAIL PROTECTED]
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users


seg. fault on calling send_v2Trap

2004-09-10 Thread Narinder Soni
I am using ucd-snmp-4.2.5.
I have everything running in the agent i.e. snmpget, snmpset etc. But as
shown in example.c, if I trigger send_v2Trap() through a snmpset call
then the agent gives segmentation fault. i.e. I make a snmpset on a
particular column and within its write function I call send_v2Trap with
necessary parameters. And it gives seg. fault. If I don't call
send_v2Trap then it works fine.

I tried sending traps by another way i.e. creating a separate thread at
the start of agent after 
init_agent(snmpd);/* do what we need to do first. */
init_mib_modules();
/* start library */
init_snmp(snmpd);
createThread(); // here I create a separate thread which calls a
separate function which further use send_v2Trap to send traps at an
interval of 10 secs.

This way it works fine and I can do snmpget/set also in parallel. But I
don't understand why it fails if I do it like as it is explained in
example.c. Does it clash somewhere?

Thanks
Soni


---
This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170
Project Admins to receive an Apple iPod Mini FREE for your judgement on
who ports your project to Linux PPC the best. Sponsored by IBM. 
Deadline: Sept. 13. Go here: http://sf.net/ppc_contest.php
___
Net-snmp-users mailing list
[EMAIL PROTECTED]
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users


Re: SNMPv3 and encryption

2004-09-10 Thread cnelson
  I put the following in /var/net-snmp/snmpd.conf:
  
createUser admin MD5 admin DES
 
  [but] When I try:
  
snmpwalk -v 3 -n  -u admin -a MD5 -A adminpwd -x DES -X 
 adminpwd   -l authPriv theserver system
  
  I get:
snmpwalk: Decryption error
 
 
 Either adminpwd should be admin in the command,
 or (the second) admin should be adminpwd in the createUser line.

Yes, of course.  Thank you.  I actually had it consistent on my system but copied the 
wrong lines in to my mail.

 ...
 I'd suggest you downgrade this to be auth rather than priv,
 make sure the passwords are consistent, and concentrate on getting
 SNMPv3 authentication working first.
  *Then* try adding privacy as well.

Thanks.  I've got auth working and imagine priv isn't far behind.  



---
This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170
Project Admins to receive an Apple iPod Mini FREE for your judgement on
who ports your project to Linux PPC the best. Sponsored by IBM. 
Deadline: Sept. 13. Go here: http://sf.net/ppc_contest.php
___
Net-snmp-users mailing list
[EMAIL PROTECTED]
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users


Re: Adding traps

2004-09-10 Thread Dave Shield

 I can see the coldStart trap being received but my script is not run.
 
 Within the snmptrapd.conf file I added the following line:
 
 traphandle .1.3.6.1.6.3.1.5.1 /usr/bin/perl /usr/local/share/snmp/cold.pl

Try
  traphandle .1.3.6.1.6.3.1.1.5.1 /usr/bin/perl /usr/local/share/snmp/cold.pl


Dave



---
This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170
Project Admins to receive an Apple iPod Mini FREE for your judgement on
who ports your project to Linux PPC the best. Sponsored by IBM. 
Deadline: Sept. 13. Go here: http://sf.net/ppc_contest.php
___
Net-snmp-users mailing list
[EMAIL PROTECTED]
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users


Re: Passing the listener address of the inbound request to the subagent?

2004-09-10 Thread bill smith
I may have to go in the direction of community string contexts,
although that creates more work on the (closed source) poller. Not
sure if I can make it happen on that side.

Thanks Robert,  for the idea of using contexts as a communications
conduit to the subagent - here I go with an ugly hack attempt -  wish
me luck :)
 


On Thu, 9 Sep 2004 17:41:04 -0400, Users Robert Story
[EMAIL PROTECTED] wrote:
 That sounds like a job for contexts. I believe there was some work done
 recently to enable passing contexts to sub-agents. If you read the
 snmpd.conf man page, you can set up access control so that a particular
 community string maps to a particular context. Can you set up the devices that
 are talking to snmpd to use different community strings for different ip
 addresses?
 

 
 Contexts is definitely the way to get the info to the subagent. But mapping a
 context based on the destination address might require an ugly hack.
 
 --
 Robert Story; NET-SNMP Junkie http://www.net-snmp.org/
 irc://irc.freenode.net/#net-snmp
 Archive: http://sourceforge.net/mailarchive/forum.php?forum=net-snmp-users
 
 You are lost in a twisty maze of little standards, all different.



---
This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170
Project Admins to receive an Apple iPod Mini FREE for your judgement on
who ports your project to Linux PPC the best. Sponsored by IBM. 
Deadline: Sept. 13. Go here: http://sf.net/ppc_contest.php
___
Net-snmp-users mailing list
[EMAIL PROTECTED]
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users


Re: Adding traps

2004-09-10 Thread Gary Clark
Hi Dave,

Yep did that. Its looks like its doing something different.

I see it crashing with a broken pipe? Any ideas?

Cheers,
Garyc

- Original Message -
From: Dave Shield [EMAIL PROTECTED]
To: Gary Clark [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Friday, September 10, 2004 9:26 AM
Subject: Re: Adding traps



  I can see the coldStart trap being received but my script is not run.
 
  Within the snmptrapd.conf file I added the following line:
 
  traphandle .1.3.6.1.6.3.1.5.1 /usr/bin/perl
/usr/local/share/snmp/cold.pl

 Try
   traphandle .1.3.6.1.6.3.1.1.5.1 /usr/bin/perl
/usr/local/share/snmp/cold.pl


 Dave



 ---
 This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170
 Project Admins to receive an Apple iPod Mini FREE for your judgement on
 who ports your project to Linux PPC the best. Sponsored by IBM.
 Deadline: Sept. 13. Go here: http://sf.net/ppc_contest.php
 ___
 Net-snmp-users mailing list
 [EMAIL PROTECTED]
 Please see the following page to unsubscribe or change other options:
 https://lists.sourceforge.net/lists/listinfo/net-snmp-users



---
This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170
Project Admins to receive an Apple iPod Mini FREE for your judgement on
who ports your project to Linux PPC the best. Sponsored by IBM. 
Deadline: Sept. 13. Go here: http://sf.net/ppc_contest.php
___
Net-snmp-users mailing list
[EMAIL PROTECTED]
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users


Re: SNMPv3 and encryption

2004-09-10 Thread cnelson
- Original Message -
From: Dave Shield [EMAIL PROTECTED]
Date: Friday, September 10, 2004 9:28 am
Subject: Re: SNMPv3 and encryption

 ...
 After rebooting the system where the agent runs and seeing 
 createUser turned into usmUser, I see:
  
$ snmpwalk -v 3 . -l authPriv theserver system
snmpwalk: Decryption error
 
 Try running the agent using something like
 
   snmpd -f -Le -d
 
 and give a *single* (encrypted) snmpgetnext command.
 Something like
 
 snmpget -r 0 -t 600 -v 3  -l authPriv theserver system
 
 You ought to see four packets at the agent - two request/response 
 pairs.(The first to detect the engineID/bootInfo, and the second 
 for the
 request itself)
 
 What do you actually see?   

That's what I see (attached).

 Any error messages at the agent end?

Nope.


snmpd.log
Description: Binary data


Community strings, contexts and (sub)agents

2004-09-10 Thread bill smith
Robert Story put me on an alternate thinking path to a prior query I
made  regarding passing listener address to the subagents.   The
suggestion was to pass the context to the subagent - which is
seemingly supported.I havent found any docs/pointers on how to do
that.  But after researching contexts, I thought it might be simpler
to parse the community string in the subagent instead  - and allow the
subagent to return a value to for a static oid besed on the community
string.

That turned out not to be so easy either, I did find an old post from
Dave Shield(2001-06-18):

the easiest work around would be to make use of the
'snmp_check_parse()' routine and set a global variable.

That seems to make sense to me. Dave also hinted that access to this
data(PDU data) might be available in a future release, and that the
snmp_check_parse() routine may not be supported in future versions of
net-snmp.

I looked through the 5.2 source did'nt see any refernces to the pdu
data being easily availalble in some structure accessable by the
subagent.  Is the easiest workaround still the only way to go?


---
This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170
Project Admins to receive an Apple iPod Mini FREE for your judgement on
who ports your project to Linux PPC the best. Sponsored by IBM. 
Deadline: Sept. 13. Go here: http://sf.net/ppc_contest.php
___
Net-snmp-users mailing list
[EMAIL PROTECTED]
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users


Re: Adding traps

2004-09-10 Thread Gary Clark
Hello,

The problem I'm seeing is that the snmptrapd.conf I dont think is being
accessed due to the script not being ran.

The snmptrapd.conf: now contains the following which Dave recommended:

   traphandle .1.3.6.1.6.3.1.1.5.1 /usr/bin/perl
/usr/local/share/snmp/cold.pl

I then used the following cold.pl perl script:

#!/usr/bin/perl -w

print At last the coldStart handler is alive!!\n;

sub getline()
{
while (STDIN)
 {
  my $line =$_;
  chomp ($line);
  print $line;
  }
}
sub main()
{
  getline();
}
main();

Simple. It accepts lines from STDIN and prints them out. This looks ok?
So if I dont see any output line I dont think the configuration is being
accessed.
Can somebody enlighten me on this? Is it an environment issue, if so how can
I determine this?
The snmptrapd.conf is located in /usr/local/share/snmp.

I'm running the trapd and it does receive the coldStart trap I just dont see
my script being ran.

Cheers,
Garyc
- Original Message -
From: Dave Shield [EMAIL PROTECTED]
To: Gary Clark [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Friday, September 10, 2004 9:26 AM
Subject: Re: Adding traps



  I can see the coldStart trap being received but my script is not run.
 
  Within the snmptrapd.conf file I added the following line:
 
  traphandle .1.3.6.1.6.3.1.5.1 /usr/bin/perl
/usr/local/share/snmp/cold.pl

 Try
   traphandle .1.3.6.1.6.3.1.1.5.1 /usr/bin/perl
/usr/local/share/snmp/cold.pl


 Dave



---
This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170
Project Admins to receive an Apple iPod Mini FREE for your judgement on
who ports your project to Linux PPC the best. Sponsored by IBM. 
Deadline: Sept. 13. Go here: http://sf.net/ppc_contest.php
___
Net-snmp-users mailing list
[EMAIL PROTECTED]
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users


Re: SNMPv3 and encryption

2004-09-10 Thread Dave Shield

 The/a big differenece between v2c and v3 is that v2c uses a community
 string, passed in the clear whereas v3 uses a user and password passed
 on an encrypted channel.  Is that right? 

Not really, no.

SNMPv1/2c requests are of the general form:
( community, PDU )
where PDU is the actual request (Get, GetNext, Set, etc) or
response - complete with the appropriate varbind list.


The structure of SNMPv3 requests is significantly more complex,
but boils down to:
( admin-info,  PDU )

(I'm deliberately skimming over the distinction between PDU and
 Scoped-PDU, before anyone complains.
 You Don't Need To Worry Your Pretty Little Head About That :-) )


For 'noAuthNoPriv' requests, the admin-info basically means the username,
  and you can mostly ignore the rest.  The situation is roughly similar
  to the community-based case.
For 'authNoPriv' requests, the admin-info includes a digital checksum,
  calculated over the contents of the PDU, and based on the user's
  auth password.   But the request is still sent in clear.
For 'authPriv' requests, the PDU is replaced by an encrypted version
  (based on the user's privacy password)  and the digital checksum is
  then calculated over that.   But it's only the PDU chunk that's
  encoded - the request as a whole is still sent in clear:

(admin-info, Encrypted-PDU)

SNMP doesn't use SSL as an encrypted transport mechanism.
[That's a gross over-simplification, but should give you the basic idea.
 Wes, David, anyone - is there anything too wildly misleading there?]


 I believe I know that v3 uses SSL for its encryption.

Nope.
What may be confusing you is that Net-SNMP uses the OpenSSL suite
to implement the encryption algorithms used for encoding the PDU.
But it doesn't actually use Secure Socket Layers as a transport.



Dave



---
This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170
Project Admins to receive an Apple iPod Mini FREE for your judgement on
who ports your project to Linux PPC the best. Sponsored by IBM. 
Deadline: Sept. 13. Go here: http://sf.net/ppc_contest.php
___
Net-snmp-users mailing list
[EMAIL PROTECTED]
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users


Newbie : New MIB

2004-09-10 Thread Preethy Yarlagadda
Hi everyone,

I am a student implementing a project for one of my classes. I want to
add a new MIB and poll the values. I tried to follow all the steps
given at http://www.net-snmp.org/tutorial-5/toolkit/mib_module/index.html

Immediately after adding the MIB, I can see everything through
snmptranslate but once I build it into the agent I am getting the
unknown Object Identifier error. I am listing down the steps I
followed.
1. Defined a new MIB with a simple scalar variable. 
(Extended netSnmpPlaypen)
2. Used mib2c to generate .c and .h files
3. Moved those files into agent/mibgroup directory
4. Ran the configure script with the object variable
./configure --with-mib-modules=myModuleObject
5. Build the agent
make
6.Installed everything
make install

4,5,6 steps are given at the netsnmp sources directory.

As I told earlier, after following all these steps I am unable to see
anything from the agent. How can I fix or debug this? I would be
really glad if somebody can help me out here.

Thank you
Preethy


---
This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170
Project Admins to receive an Apple iPod Mini FREE for your judgement on
who ports your project to Linux PPC the best. Sponsored by IBM. 
Deadline: Sept. 13. Go here: http://sf.net/ppc_contest.php
___
Net-snmp-users mailing list
[EMAIL PROTECTED]
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users


Re: 5.1.1 pass problem (maybe timeout)

2004-09-10 Thread Users
On Thu, 09 Sep 2004 22:03:40 -0300 Javier wrote:
JS I'm having problems using 'pass' with 5.1.1
JS 
JS I made a script and it worked before, but now, after an upgrade it doesn't
JS work anymore.
JS 
JS But if I do a strace of the snmpd daemon, then it works, its like an
JS internal timeout problem. If I make the daemon slower, then it returns the
JS values.
JS 
JS Anyone has any idea?

I believe this is fixed in 5.1.2.

-- 
Robert Story; NET-SNMP Junkie http://www.net-snmp.org/
irc://irc.freenode.net/#net-snmp  
Archive: http://sourceforge.net/mailarchive/forum.php?forum=net-snmp-users

You are lost in a twisty maze of little standards, all different. 


---
This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170
Project Admins to receive an Apple iPod Mini FREE for your judgement on
who ports your project to Linux PPC the best. Sponsored by IBM. 
Deadline: Sept. 13. Go here: http://sf.net/ppc_contest.php
___
Net-snmp-users mailing list
[EMAIL PROTECTED]
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users


Re: Community strings, contexts and (sub)agents

2004-09-10 Thread Users
On Fri, 10 Sep 2004 13:45:30 -0400 bill wrote:
BS Robert Story put me on an alternate thinking path to a prior query I
BS made  regarding passing listener address to the subagents.   The
BS suggestion was to pass the context to the subagent - which is
BS seemingly supported.I havent found any docs/pointers on how to do
BS that.

Yep, it's pretty new, and documentation is usually pretty low priority.

BS But after researching contexts, I thought it might be simpler
BS to parse the community string in the subagent instead  - and allow the
BS subagent to return a value to for a static oid besed on the community
BS string.

err... well, for the request to even get to the sub-agent, it has to get
through vacm community string checks. I hope you weren't planning on bypassing
those.

If you check the recent snmpd.conf man page, the com2sec token can specify a
context, which you could easily make the same as the community string, and thus
the sub-agent would get passed the community string as the context.


com2sec -Cn host10-10-10-1 mynet default host10-10-10-1
com2sec -Cn host10-10-10-2 mynet default host10-10-10-2


-- 
Robert Story; NET-SNMP Junkie http://www.net-snmp.org/
irc://irc.freenode.net/#net-snmp  
Archive: http://sourceforge.net/mailarchive/forum.php?forum=net-snmp-users

You are lost in a twisty maze of little standards, all different. 


---
This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170
Project Admins to receive an Apple iPod Mini FREE for your judgement on
who ports your project to Linux PPC the best. Sponsored by IBM. 
Deadline: Sept. 13. Go here: http://sf.net/ppc_contest.php
___
Net-snmp-users mailing list
[EMAIL PROTECTED]
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users


Re: Adding traps

2004-09-10 Thread Gary Clark
Hello,

I correct the perl script to dump to a text file and everything works fine.

Thanks,
garyc

- Original Message -
From: Gary Clark [EMAIL PROTECTED]
To: Gary Clark [EMAIL PROTECTED]; Dave Shield
[EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Friday, September 10, 2004 3:36 PM
Subject: Re: Adding traps


 Hello,

 By turning on the debug trace on the trace:

 snmptrapd -f -D -Lf dummy

 I can capture all the dump.

 I could then view the trace and saw that indeed the token traphandler
did
 get registered and a call was being made to my
 handler. My perl script was handling the trap handler call incorrectly.
But
 of course.

 Thanks,
 Garyc

 - Original Message -
 From: Gary Clark [EMAIL PROTECTED]
 To: Dave Shield [EMAIL PROTECTED]
 Cc: [EMAIL PROTECTED]
 Sent: Friday, September 10, 2004 12:48 PM
 Subject: Re: Adding traps


  Hello,
 
  The problem I'm seeing is that the snmptrapd.conf I dont think is being
  accessed due to the script not being ran.
 
  The snmptrapd.conf: now contains the following which Dave recommended:
 
 traphandle .1.3.6.1.6.3.1.1.5.1 /usr/bin/perl
  /usr/local/share/snmp/cold.pl
 
  I then used the following cold.pl perl script:
 
  #!/usr/bin/perl -w
 
  print At last the coldStart handler is alive!!\n;
 
  sub getline()
  {
  while (STDIN)
   {
my $line =$_;
chomp ($line);
print $line;
}
  }
  sub main()
  {
getline();
  }
  main();
 
  Simple. It accepts lines from STDIN and prints them out. This looks ok?
  So if I dont see any output line I dont think the configuration is being
  accessed.
  Can somebody enlighten me on this? Is it an environment issue, if so how
 can
  I determine this?
  The snmptrapd.conf is located in /usr/local/share/snmp.
 
  I'm running the trapd and it does receive the coldStart trap I just dont
 see
  my script being ran.
 
  Cheers,
  Garyc
  - Original Message -
  From: Dave Shield [EMAIL PROTECTED]
  To: Gary Clark [EMAIL PROTECTED]
  Cc: [EMAIL PROTECTED]
  Sent: Friday, September 10, 2004 9:26 AM
  Subject: Re: Adding traps
 
 
  
I can see the coldStart trap being received but my script is not
run.
   
Within the snmptrapd.conf file I added the following line:
   
traphandle .1.3.6.1.6.3.1.5.1 /usr/bin/perl
  /usr/local/share/snmp/cold.pl
  
   Try
 traphandle .1.3.6.1.6.3.1.1.5.1 /usr/bin/perl
  /usr/local/share/snmp/cold.pl
  
  
   Dave
 
 
 
  ---
  This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170
  Project Admins to receive an Apple iPod Mini FREE for your judgement on
  who ports your project to Linux PPC the best. Sponsored by IBM.
  Deadline: Sept. 13. Go here: http://sf.net/ppc_contest.php
  ___
  Net-snmp-users mailing list
  [EMAIL PROTECTED]
  Please see the following page to unsubscribe or change other options:
  https://lists.sourceforge.net/lists/listinfo/net-snmp-users



---
This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170
Project Admins to receive an Apple iPod Mini FREE for your judgement on
who ports your project to Linux PPC the best. Sponsored by IBM. 
Deadline: Sept. 13. Go here: http://sf.net/ppc_contest.php
___
Net-snmp-users mailing list
[EMAIL PROTECTED]
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users


Re: Newbie : New MIB

2004-09-10 Thread Gary Clark

Hiya,

What I did when trying (still trying) to understand this baby was fill it
with trace. There are examples already in the code.
However run the snmpd agent with -d or -D this will dump allow you to see
some action. See the log file in /var/net-snmp/snmpd.log.

Providing you have built everything correctly you should be able to perform
snmpset and snmpget requests on the oid.
Note you need to fill the template code with your specific needs.
In its present state it will have the capability of allowing get and set
requests but may need embellishing.
But its upto to you to build the persistence and create your own data
structures to manage the contexts.

Thanks,
Garyc

- Original Message -
From: Preethy Yarlagadda [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Friday, September 10, 2004 2:04 PM
Subject: Newbie : New MIB


 Hi everyone,

 I am a student implementing a project for one of my classes. I want to
 add a new MIB and poll the values. I tried to follow all the steps
 given at http://www.net-snmp.org/tutorial-5/toolkit/mib_module/index.html

 Immediately after adding the MIB, I can see everything through
 snmptranslate but once I build it into the agent I am getting the
 unknown Object Identifier error. I am listing down the steps I
 followed.
 1. Defined a new MIB with a simple scalar variable.
 (Extended netSnmpPlaypen)
 2. Used mib2c to generate .c and .h files
 3. Moved those files into agent/mibgroup directory
 4. Ran the configure script with the object variable
 ./configure --with-mib-modules=myModuleObject
 5. Build the agent
 make
 6.Installed everything
 make install

 4,5,6 steps are given at the netsnmp sources directory.

 As I told earlier, after following all these steps I am unable to see
 anything from the agent. How can I fix or debug this? I would be
 really glad if somebody can help me out here.

 Thank you
 Preethy


 ---
 This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170
 Project Admins to receive an Apple iPod Mini FREE for your judgement on
 who ports your project to Linux PPC the best. Sponsored by IBM.
 Deadline: Sept. 13. Go here: http://sf.net/ppc_contest.php
 ___
 Net-snmp-users mailing list
 [EMAIL PROTECTED]
 Please see the following page to unsubscribe or change other options:
 https://lists.sourceforge.net/lists/listinfo/net-snmp-users



---
This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170
Project Admins to receive an Apple iPod Mini FREE for your judgement on
who ports your project to Linux PPC the best. Sponsored by IBM. 
Deadline: Sept. 13. Go here: http://sf.net/ppc_contest.php
___
Net-snmp-users mailing list
[EMAIL PROTECTED]
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users


Re: How to specify the number of retries to be used when calling send_v2trap

2004-09-10 Thread Dave Shield
 how can I confirm this response on agent side?

I've already answered this - you can't.




  Also, If NMS is down which lead to a timeout, How the agent side can
  know this event?
 
 It doesn't.
 There's no handling of timed-out informs.
 
 Dave




---
This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170
Project Admins to receive an Apple iPod Mini FREE for your judgement on
who ports your project to Linux PPC the best. Sponsored by IBM. 
Deadline: Sept. 13. Go here: http://sf.net/ppc_contest.php
___
Net-snmp-users mailing list
[EMAIL PROTECTED]
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users


Re: SNMPv3 and encryption

2004-09-10 Thread Dave Shield

 and in /usr/share/snmp/snmpd.conf, I've got:
 
   accessadminanyauth   exact  all   allall
   accessadminanypriv   exact  all   allall

Not a good idea.
Just have *one* entry for a given group.
Either
 accessadminanyauth   exact  all   allall

(which will allow 'authNoPriv' or 'authPriv' but block 'noAuthNoPriv')

or
 accessadminanypriv   exact  all   allall

(which will just allow 'authPriv' but block both 'authNoPriv' and
 'noAuthNoPriv')


Having two conflicting entries is just asking for trouble.


After rebooting the system where the agent runs and seeing createUser
 turned into usmUser, I see:
 
   $ snmpwalk -v 3 . -l authPriv theserver system
   snmpwalk: Decryption error

Try running the agent using something like

snmpd -f -Le -d

and give a *single* (encrypted) snmpgetnext command.
Something like

 snmpget -r 0 -t 600 -v 3  -l authPriv theserver system


You ought to see four packets at the agent - two request/response pairs.
(The first to detect the engineID/bootInfo, and the second for the
 request itself)

What do you actually see?   Any error messages at the agent end?

Dave



---
This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170
Project Admins to receive an Apple iPod Mini FREE for your judgement on
who ports your project to Linux PPC the best. Sponsored by IBM. 
Deadline: Sept. 13. Go here: http://sf.net/ppc_contest.php
___
Net-snmp-users mailing list
[EMAIL PROTECTED]
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users


Re: Community strings, contexts and (sub)agents

2004-09-10 Thread bill smith
 
 Yep, it's pretty new, and documentation is usually pretty low priority.
 
 
 err... well, for the request to even get to the sub-agent, it has to get
 through vacm community string checks. I hope you weren't planning on bypassing
 those.

Nah, not bypaassing - just allowing access to all the community
strings on my list, and retreiving the value for the subagent to
decide which data to return.


 If you check the recent snmpd.conf man page, the com2sec token can specify a
 context, which you could easily make the same as the community string, and thus
 the sub-agent would get passed the community string as the context.
 
 com2sec -Cn host10-10-10-1 mynet default host10-10-10-1
 com2sec -Cn host10-10-10-2 mynet default host10-10-10-2
 
This is exactly what I want to do.  I understand the man page
instructions, but not clear on which data structure would contain the
contextName  - it shows up in snmp_pdu and snmp_session - which I
beleive are the same (
http://www.net-snmp-org/tutorial-5/agent/annotated.html ).  I'll have
a go at it and see what comes of it.

Correct  me if I am wrong here: Using this approach, I am forced to
use V3 at the client?


Thanks again Robert.


---
This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170
Project Admins to receive an Apple iPod Mini FREE for your judgement on
who ports your project to Linux PPC the best. Sponsored by IBM. 
Deadline: Sept. 13. Go here: http://sf.net/ppc_contest.php
___
Net-snmp-users mailing list
[EMAIL PROTECTED]
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users