Re: Trap destinaton problem

2012-06-19 Thread Dave Shield
On 17 June 2012 10:20, MANSOUR NASERI  wrote:
> snmpNotifyTable:
>
> Instance ---> internal0
> snmpNotifyStorageType --->readOnly(5)

Remember that this is an entry which is being
configured via the (static) snmpd.conf file.
This is not something that the agent is expected to
modify dynamically.
   That's why the storage type is reported as readOnly.



> one problem is, I can not remove row from snmpTargetParamsTable and
> snmpTargetAddrTable

Same reason - if they are set via the (static) snmpd.conf file,
then they can't be removed via SNMP SET requests.

Think what would happen if this was allowed, and then the agent
was shut down and restarted.
It would re-read the config files, and set up the trap sink again.
Hence from the point of view of the network administrator, the
rows that had been deleted would seem to automatically reappear.

That's why in general, anything configured via the main snmpd.conf
file tends to be regarded as readOnly.


> when I removed snmpNotifyTable row by snmpNotifyRowStatus
> --->destroy(6),I can not received any traps.(as I expected).

Hmmm  I'm surprised that this works.
(And I'm not convinced that it should).   Same reasons again.



> when i want to add that row again I have some problem:
>
> I can not write snmpNotifyStorageType >readOnly(5)

Correct.   You can't write to something that's 'readOnly',
which is exactly what you need to do in order to create it.
readOnly is used for rows set up via the config file,
not using SET requests.


> but I can write snmpNotifyStorageType >other(1)

Hmmm  I'm a little surprised.
I'm really not sure how 'other' would be handled.

I'd suggest it's probably better to use either 'volatile'
or 'nonVolatile', depending on what behaviour you
want when the agent restarts.



> in that case still I can not receive any traps.
> for adding new destination address I added rows like that with replacing
> "internal0 to ext0" and "C0.A8.00.05.00.A2 (hex) to C0.A8.00.06.00.A2
> (hex)".
> (192.168.0.6)but nothing happend again.

What are the full contents of these tables, once you've set them
up in the way that you think should work?


Dave

--
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
___
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


Re: Integer Columns no such instace

2012-06-19 Thread Dave Shield
On 14 June 2012 10:41, Magda Stefan  wrote:
>   When I used the mib2c framework to generate the subagent,
> in the C code there was no LOAD, FREE,

That is too vague to be meaningful.
mib2c can be used to generate all sorts of types of output,
which may or may not include LOAD or FREE support.

Please give details of the exact mib2c command you used.
i.e. what options you specified.


>     methods so I copied from the old one
> and modified them

"modified them"?   How?   What changes did you make?
Are we expected to guess?   Or read your mind?



>  but when I run the agent for each request it gives me this
> error "No such instance currently exists at this oid".

What was the request that triggers this error?
Again - if you don't give any details about *exactly* what
you are doing, then we really can't help.


> I've checked and the
> problem is somewhere in the handler:
>
>  case COLUMN_NETSNMPPRVOWD:
>     if (!table_entry) {
>     netsnmp_set_request_error(reqinfo, request,
>   SNMP_NOSUCHINSTANCE);
>
> Please help me with a suggestion:


Is the cache being loaded when you send a request?
What debug output is generated?

What is the exact request that you are sending?

Dave

--
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
___
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


Re: Can we create a session with SNMP Manger using net-snmp agent?

2012-06-19 Thread Dave Shield
On 18 June 2012 11:15, Suresh kumar  wrote:
> Can we create a session with SNMP Manger using net-snmp agent?

What is the software package "SNMP Manager" ?
Is this something that you have developed yourself,
or are you using a third-party package for this?

In general, the agent will _respond_ to requests from a client-side
manager application - it wouldn't normally be used to control or
configure the client application.

  The only exception would be if there was a (vendor-specific)
MIB file for managing the manager software, and support for
this was implemented as part of the agent on the client host.
But that's something you would need to talk to the developers
of the "SNMP Manager" software about.




> IS the response to the below query correct?
>
>
>
>   Customer:  To add to the list of questions/features: how are we
> handling the sessions? Can we see all the logged in session – Web, TL1 and
> SNMP? There is a cancel session feature which is also required from SNMP –
> where an admin user can cancel other user sessions. Think about how can this
> be achieved in SNMP.
>
> Developer: Yes, you can see all the logged in sessions from SNMP. SNMP
> Manager itself does not create a session with the agent and hence it cannot
> be stored anywhere. Every operation in SNMP is considered as an independent
> operation without any session associated with it.

Hmmm...I'm not sure the original question is particularly clear.
Fundamentally, both HTTP and SNMP are stateless protocols,
so neither Web nor SNMP involve "sessions" per se.
   The web server might have a record that a particular stream of
requests had been authenticated, so to that extent, there would
be a "logged in session".   But there would be no way to tell whether
the browser was still running, or had quit without explicitly logging out.

  The scenario wrt SNMP is similar - the agent could tell whether
it had received requests from an SNMP management application
(e.g. from a particular source address),  but wouldn't have any way
to tell whether or not that manager was still active.



> SNMP Manager itself does not create a session with the agent
> and hence it cannot be stored anywhere.

That particular statement is definitely misleading (verging on wrong).
While SNMP traditionally doesn't use sessions in the technical
sense (since it normally runs over UDP rather than TCP),  the
manager application *will* normally have a 'netsnmp_session'
structure, which is used for communicating with a particular agent.
So the SNMP manager probably will be storing information about
the SNMP sessions that it has "open" (in a vague hand-wavey
sort of sense),  which could potentially be monitored via a
suitable MIB (and agent extension - see above).


Have I confused you yet?

Dave

--
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
___
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


Re: Can we create a session with SNMP Manger using net-snmp agent?

2012-06-19 Thread Wes Hardaker
Suresh kumar  writes:

> Can we create a session with SNMP Manger using net-snmp agent? For
> example, we have configured certain IP addresses that are allowed to
> access the agent. Is there a way we can create and maintain sessions
> with those managers?

SNMP doesn't typically operate over network "sessions" unless you're
using SNMP over TCP.  So there isn't a way to easily detect (or destroy)
a session from the agent side of things.
-- 
Wes Hardaker
Please mail all replies to net-snmp-cod...@lists.sourceforge.net

--
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
___
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


RE: Stuck in the way of quering a private MIB (extension using perl)

2012-06-19 Thread Chayvialle, Daniel (External)
So, nobody? Just in case this was not clear previously, the Net-SNMP that comes 
with debian is v5.4.3, Synaptic says

Daniel

-Message d'origine-
De : Chayvialle, Daniel (External) 
Envoyé : mardi 12 juin 2012 09:55
À : Chayvialle, Daniel (External); 'Dave Shield'
Cc : 'net-snmp-users@lists.sourceforge.net'
Objet : RE: Stuck in the way of quering a private MIB (extension using perl)

Any idea why I cannot extend the agent using perl and why I cannot use the 
access control0 stored in config file?

Daniel.

-Message d'origine-
De : Chayvialle, Daniel (External) 
Envoyé : vendredi 8 juin 2012 12:43
À : 'Dave Shield'
Cc : net-snmp-users@lists.sourceforge.net
Objet : RE: Stuck in the way of quering a private MIB (extension using perl)

The way I created the new user (test1) is

% sudo net-snmp-config --create-snmpv3-user

then answering the questions. As I reinstalled (using synaptics) all 
snmp-related packages after trying to compile the latest sources, this should 
be the vendor-provided version.

The said line (createUser...) did not disappear from the file in /var neither. 
But trying again with /usr/bin/net-snmp-config (dated 20120105) and another 
user (test2) did not reproduce the problem (but the line for test1 is still 
there).

The recommended usage for password is, from what I read, to put it in the 
~/snmp.conf file (using a defAuthPassphrase, together with the adequate 
defSecurityLevel, defAuthType and defPrivType) so that it does not appear in a 
command's argument, which is safer.

Daniel

-Message d'origine-
De : dave.shi...@gmail.com [mailto:dave.shi...@gmail.com] De la part de Dave 
Shield
Envoyé : jeudi 7 juin 2012 21:31
À : Chayvialle, Daniel (External)
Cc : net-snmp-users@lists.sourceforge.net
Objet : Re: Stuck in the way of quering a private MIB (extension using perl)

On 7 June 2012 17:59, Chayvialle, Daniel (External)
 wrote:
> OK, so now I'm getting a bit confused regarding configuration file locations.
>
> I added a new user using the command line. It added lines in 
> /var/net-snmp/snmpd.conf and /usr/local/share/snmp/snmpd.conf (whiwh is what 
> the command snmpd -Dread_config -H 2>&1 | grep "Reading" | sort -u gives me, 
> to my stupefaction)

Which snmpd binary are you running here?
The vendor-supplied one, or one that you've compiled yourself?

Try giving the full path to the binary, just to make sure.



> but after restarting the agent the user was unknown, so I placed those lines 
> in /etc/snmp/snmpd.conf. > The user was then recognised but the lines did not 
> disappear from any of those files.

It won't disappear from the /etc/snmp file, no.
The *only* config file that the agent re-writes is the one under /var.


> On top of this, I'm trying to follow the advice given to place the password
> not on the CLI but in ~/snmp.conf but to no avail as it seems.

Sorry - that's too vague to be clear as to what you're trying to do.

Dave

--
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
___
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


Can we create a session with SNMP Manger using net-snmp agent?

2012-06-19 Thread Suresh kumar


 Hi Dave i'm using net-snmp 5.7.1 version.


 
Can we create a session with SNMP Manger using net-snmp agent? For example, we 
have configured certain IP addresses that are allowed to access the agent. Is 
there a way we can create and maintain sessions with those managers?
 
IS the response to the below query correct?
 
  Customer:  To add to the list of questions/features: how are we handling 
the sessions? Can we see all the logged in session – Web, TL1 and SNMP? There 
is a cancel session feature which is also required from SNMP – where an admin 
user can cancel other user sessions. Think about how can this be achieved in 
SNMP.
Developer: Yes, you can see all the logged in sessions from SNMP. SNMP Manager 
itself does not create a session with the agent and hence it cannot be stored 
anywhere. Every operation in SNMP is considered as an independent operation 
without any session associated with it.
 
~Suresh
-- 
Live Security Virtual Conference Exclusive live event will cover all the ways 
today's security and threat landscape has changed and how IT managers can 
respond. Discussions will include endpoint security, mobile security and the 
latest in malware threats. 
http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
___ 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 
   --
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/___
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
--
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/___
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