Re: Can the proxy agent work with internal query?

ERICJ <[email protected]>
Newsgroups gmane.network.net-snmp.user
Message-ID <[email protected]>
On Tue, Feb 12, 2008 at 6:36 PM, Dave Shield <[email protected]> wrote:
> On 12/02/2008, ericj <[email protected]> wrote:
>  > I had set up a proxy agent with net-snmp 5.4.1 on linux,and I have a
>  > switch with snmpv3 agent.
>  >
>  > I can run
>  >   "snmpwalk -v 3 -u testuser -A 12345678 -l authNoPriv 10.10.32.4 system"
>  > and have return values so that I'm sure the snmpv3 configuration on
>  > switch is okay.
>
>  Those are the settings for querying the remote switch.
>
>
>
>
>  > I want the queries via proxy agent, and I added follow lines in
>  > snmpd.conf
>  >
>  > proxy -Cn ctx_remotehost2
>
>  which sets up proxing for requests received using this context
>
>
>  >     -v 3 -u testuser -a MD5 -A "12345678" -l authNoPriv 10.10.32.4
>
>  and forwards such requests using these credentials
>  (which you've confirmed work).
>
>  OK so far.
>
>
>  But note that this proxying has been set up for incoming requests
>  in the context "ctx_remotehost2"
>
>
>
>  > but it seems that I still have to add in snmpd.conf
>  >
>  > com2sec -Cn ctx_remotehost2 proxied default cmty_2
>
>  Which is what this line does.
>  It maps the community "cmty_2" into the (internal) context
>  "ctx_remotehost2".   That means the agent recognises it
>  as relating to the "proxy" directive (which specified the same
>  context) and passes the request on to the switch.
>
>  Without this com2sec line, the agent would treat the
>  incoming request as being in the default context, and
>  attempt to process the requested varbinds itself.
>
>
>  Note that if you were using SNMPv3 for the incoming
>  requests, then you could specify the context explicitly.
>  But SNMPv1/2c pre-date the idea of contexts, so this
>  mapping needs to be done within the agent.
>
>
>
>
>  > Since the net-snmp had implement the disman event MIB with internal
>  > query,
>  > I was wondering that how if I setup a proxy agent, and could disman
>  > could monitor the proxy agent's MIB objects?
>
>  That *might* work.
>  I'm just concerned that bug #1689163 might be relevant here.
>  But you can but try.

Thanks Dave.
Actually what I want to do is as the same as the bug request ID
1058412 "Disman Monitoring over Net-SNMP Proxy fails"
since I had proxy a switch agent via net-snmp and can query switch
agent's MIB objects by command line
, but in snmpd.conf I can't specisify a context name to monitor the
proxied agent.

ex:
configure a proxyed agent.
proxy -Cn ctx_remotehost2 -v 3 -u testuser -a MD5 -A "12345678" -l
authNoPriv 10.10.32.4

How if it possibile that let net-snmp support specify a context in the
monitor configuration line such as
monitor -Cn ctx_remotehost2 -D -r 10 "Network Traffic" ifInOctets.1
1000000 5000000
so that net-snmp can monitor a specisified proxied agent?

It's very kind of your help. Thanks for your answer.
It really helps!

>
>
>
>  > As far as I know, if the proxy agent can only queried via v1/v2c
>  > community,and the disman implement is based on internal query with
>  > securityName, then my thoughts should not work, right?
>
>  The only reason that the DisMan Event implementation always
>  uses SNMPv3, is that the Net-SNMP agent cannot handle
>  community-based loopback queries.   (In particular, the access
>  control checks don't like such a setup).
>     There's nothing in the DisMan Event code itself that's tied
>  to SNMPv3 requests - if you're sending a request to a remote
>  target, then you should be able to use SNMPv1 or 2c or 3,
>  as the mood takes you :-)
>
>
>  Dave
>



-- 
Guan-Hong Chen

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.