This is a discussion on Fwd: snmpwalk & snmpget within the SNMP Users forums, part of the Networking and Network Related category; --===============1170240618== Content-Type: multipart/alternative; boundary="----=_Part_24337_13664373.1207919445335" ------=_Part_24337_13664373.1207919445335 Content-Type: text/plain; charset=ISO-8859-1 ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
--===============1170240618==
Content-Type: multipart/alternative; boundary="----=_Part_24337_13664373.1207919445335" ------=_Part_24337_13664373.1207919445335 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline ---------- Forwarded message ---------- From: Dave Shield <D.T.Shield@liverpool.ac.uk> Date: 11 avr. 2008 12:33 Subject: Re: snmpwalk & snmpget To: snmp girl <snmp.girl@gmail.com> Cc: net-snmp-users@lists.sourceforge.net On 11/04/2008, snmp girl <snmp.girl@gmail.com> wrote: > here u fing what I get as a result Thank you. That makes it much clearer. [Though copying the text would have been sufficient. You didn't actually need to attach a screen dump] Anyway: > D:\> snmpgetnext -c public -v1 localhost .1.3.6.1.4.1.311.1.4.1.1.5.1.2 > SNMPv2-SMI::enterprises.311.1.4.1.1.5.1.2.1.0 = STRING: "master" So a GETNEXT request returns a value for .1.3.6.1.4.1.311.1.4.1.1.5.1.2.0 We then told you to ask for this value using "snmpget" > D:\> snmpget -c public -v1 localhost .1.3.6.1.4.1.311.1.4.1.1.5.1.2 > Error in packet > Reason: (noSuchName) But this command isn't asking for the OID .1.3.6.1.4.1.311.1.4.1.1.5.1.2.0 It's asking for the OID 1.3.6.1.4.1.311.1.4.1.1.5.1.2 (without the final .0) And the agent is quite correct. There isn't a value associated with 1.3.6.1.4.1.311.1.4.1.1.5.1.2 There's a value associated with 1.3.6.1.4.1.311.1.4.1.1.5.1.2.0 even with using this exact OID ,I get the same error oid = 1.3.6.1.4.1.311.1.4.1.1.5.1.2.1.0 AND also with testing adding 0 to the oid used in the snmpgetnext but you didn't ask for that. If you are using "snmpget", you must request the *EXACT* same OID as returned by snmpwalk/snmpgetnext. These two commands will do a "fuzzy match" to return the next valid OID value. snmpget doesn't do this - it uses an *exact* match on the specified OID. If you give it an invalid OID, then it'll complain. (As here). Dave ------=_Part_24337_13664373.1207919445335 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline <div><br>---------- Forwarded message ----------<br><span class="gmail_quote">From: <b class="gmail_sendername">Dave Shield</b> <<a href="mailto:D.T.Shield@liverpool.ac.uk">D.T.Shiel d@liverpool.ac.uk</a>><br>Date: 11 avr. 2008 12:33<br> Subject: Re: snmpwalk & snmpget<br>To: snmp girl <<a href="mailto:snmp.girl@gmail.com">snmp.girl@gmail. com</a>><br>Cc: <a href="mailto:net-snmp-users@lists.sourceforge.net">net-snmp-users@lists.sourceforge.net</a><br> <br></span>On 11/04/2008, snmp girl <<a href="mailto:snmp.girl@gmail.com">snmp.girl@gmail. com</a>> wrote:<br>> here u fing what I get as a result<br><br>Thank you. That makes it much clearer.<br><br>[Though copying the text would have been sufficient.<br> You didn't actually need to attach a screen dump]<br><br>Anyway:<br><br>> D:\> snmpgetnext -c public -v1 localhost .1.3.6.1.4.1.311.1.4.1.1.5.1.2<br>> SNMPv2-SMI::enterprises.311.1.4.1.1.5.1.2.1.0 = STRING: "master"<br> <br>So a GETNEXT request returns a value for<br> .1.3.6.1.4.1.311.1.4.1.1.5.1.2.0<br><br>We then told you to ask for this value using "snmpget"<br><br><br>> D:\> snmpget -c public -v1 localhost .1.3.6.1.4.1.311.1.4.1.1.5.1.2<br> > Error in packet<br>> Reason: (noSuchName)<br><br>But this command isn't asking for the OID .1.3.6.1.4.1.311.1.4.1.1.5.1.2.0<br>It's asking for the OID 1.3.6.1.4.1.311.1.4.1.1.5.1.2<br>(without the final .0)<br> <br>And the agent is quite correct.<br>There isn't a value associated with 1.3.6.1.4.1.311.1.4.1.1.5.1.2<br>There's a value associated with 1.3.6.1.4.1.311.1.4.1.1.5.1.2.0</div> <div><font color="#ff0000"></font> </div> <div><font color="#ff0000">even with using this exact OID ,I get the same error </font></div> <div><font color="#ff0000">oid = 1.3.6.1.4.1.311.1.4.1.1.5.1.2.1.0</font></div> <div><font color="#ff0000">AND also with testing adding 0 to the oid used in the snmpgetnext</font><br> </div> <div>but you didn't ask for that.<br><br>If you are using "snmpget", you must request the *EXACT*<br>same OID as returned by snmpwalk/snmpgetnext.<br>These two commands will do a "fuzzy match" to return the<br> next valid OID value.<br> snmpget doesn't do this - it uses an *exact* match on the<br>specified OID. If you give it an invalid OID, then it'll<br>complain. (As here).<br><br>Dave<br> </div> ------=_Part_24337_13664373.1207919445335-- --===============1170240618== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline ------------------------------------------------------------------------- This SF.net email is sponsored by the 2008 JavaOne(SM) Conference Don't miss this year's exciting event. There's still time to save $100. Use priority code J8TL2D2. http://ad.doubleclick.net/clk;198757...un.com/javaone --===============1170240618== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ 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/...net-snmp-users --===============1170240618==-- |