SNMP: Why does a SET-request also perfom a GET-request?

196 Views Asked by At

I'm trying to build my own SNMP-agent (on Solaris 10.0) and added a line to my snmpd.conf:

pass .1.3.6.1.4.1.xxxx    /home/snmp/snmp_agent.bash

For testing, the only thing the bash-script does, is writing the current time and arguments to a log-file. Now, when I use net-snmp to perform a SET-request, by:

 snmpset -v1 -c public node 1.3.6.1.4.1.1590.xxxx.1 i 1

I notice two lines in the log-file. One with an argument -g (which means a GET), and the other with -s (which means a SET). Why do I get the one with -g and how can I get rid of it?

It's annoying me because in my MIB I have some OIDs with MAX-ACCESS = write-only, and the agent gives an error when trying to read this OID.

I looked on internet about this problem (or maybe it's not a problem), but couldn't find anything.

1

There are 1 best solutions below

1
On

I believe the internals of the Net-SNMP agent do this to pass scripts only. EG, it's a requirement of using the 'pass' extension and has nothing to do with what's happening "on the wire".