Hi, you please explain what does the below line means in snmpd.conf ?

" proxy -Cn ctx_remote -v1 -c public <ip of node2>:161 .1.3.6.1 "
ctx_remote is defined by the line :-
com2sec -Cn ctx_remote  notConfigUser   default cmty_remote1

On node 1 when I run "snmpget -v1 -c cmty_remote1 localhost
SNMPv2-MIB::sysName.0 " , I get the sysName of Node2 even though I have
mentioned " localhost " in command.

Can you please clarify what is the flow here?
where the request goes, who receives it, who sends the response here?
Also what exactly does "com2sec -Cn ctx_remote  notConfigUser   default
cmty_remote1" means?
A high level overview of this scenario will be highly appreciated.

Regards
Nishant


On Mon, 6 Sept 2021 at 19:26, Bill Fenner <fen...@gmail.com> wrote:

> On Sun, Sep 5, 2021 at 9:59 AM Nishant Nayan <nayan.nishant2...@gmail.com>
> wrote:
>
>> My aim is to know how various parameters like errorstat and errindex etc.
>> are set from response.
>>
>> For an example command :
>> snmpget -v1 -c cmty_remotehost1 localhost SNMPv2-MIB::sysName.1
>> SNMPv2-MIB::sysDescr.0 SNMPv2-MIB::sysObjectID.0
>>
>> SNMPv2-MIB::sysName.1 being an incorrect oid
>>
>
> I like to add "-Ddumpv,dumph" to get details of the messages that are
> being send and received.  Try running your get with that debugging to see
> if the output helps you understand where each field comes from.  (You can
> change it to just "-Ddump" to also get a hex dump, which you may be able to
> compare with the data field you see in your debugger).
>
> Each field in the packet is encoded using ASN.1, which is more or less a
> type/length/value encoding, but is fairly complex.  If you're trying to
> create your own packets, please see if it's feasible to use an existing
> ASN.1 encoder, because there have historically been many bugs in ASN.1
> parsing and encoding so it's best to use a well-tested implementation.
>
> Also, if you want to know what the SNMP protocol is doing, as opposed to
> what the helpful snmpget command is doing, you should add "-Cf" to the
> snmpget command line - when snmpget gets an error like this, it'll strip
> out the bad object and try again so that it gets the data that may exist,
> but that is not how SNMP works per se - that is how snmpget works.
>
>   Bill
>
>
_______________________________________________
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders

Reply via email to