On Wed, 2006-02-15 at 18:43 +0100, Taner mehmetali wrote:
> > What SNMP agent are you querying?
> 
> i use the net-snmp agent 5.2.1.2 ...
> all windows snmp tools are deinstalled.

So this *is* on a Windows box, then?

OK - another possibility is that the Net-SNMP agent is
hooking into the standard Microsoft management APIs,
and using the ifIndex values that this provides.
(I'm no Windows expert, and am not familiar enough
with the Windows-specific code to tell, but it's
certainly plausible).




> > What are you actually trying to do?
> 
> 
> Well i try to detect the net-snmp agent with the
> HP printer management tool HP Web Jetadmin.

Hmmmm....   I thought that tool was specifically
aimed at HP printers, but OK.....


> this is the way how it searches for an third party printer agent:
> 
> 1) it sends a sequence of get messages:
> 
> Simple Network Management Protocol
>     Version: 1 (0)
>     Community: public
>     PDU type: GET-NEXT (1)

Except that this isn't a GET request, it's a GET-NEXT request.
So it should be able to cope with non-consecutive ifIndex values
quite happily.



>     Request Id: 0x00007980
>     Error Status: NO ERROR (0)
>     Error Index: 0
>     Object identifier 1: 1.3.6.1.2.1.1.1 (SNMPv2-MIB::sysDescr)
>     Value: NULL
>     Object identifier 2: 1.3.6.1.2.1.1.3 (SNMPv2-MIB::sysUpTime)
>     Value: NULL
>     Object identifier 3: 1.3.6.1.2.1.1.5 (SNMPv2-MIB::sysName)
>     Value: NULL
>     Object identifier 4: 1.3.6.1.2.1.2.2.1.6 (IF-MIB::ifPhysAddress)
>     Value: NULL
>     Object identifier 5: 1.3.6.1.2.1.4.20.1.1 (IP-MIB::ipAdEntAddr)
>     Value: NULL
>     Object identifier 6: 1.3.6.1.2.1.25.3.2.1.3

Which is actually HOST-RESOURCES-MIB::hrDeviceDescr

All of these are standard objects, which the Net-SNMP agent
should implement quite happile.


>     Object identifier 7: 1.3.6.1.4.1.11.2.3.9.1.1.7
>     Object identifier 8: 1.3.6.1.4.1.11.2.3.9.5.1.3
>     Object identifier 9: 1.3.6.1.4.1.11.2.4.3.8.3.2
>     Object identifier 10: 1.3.6.1.4.1.11.2.4.3.8.3.3
>     Object identifier 11: 1.3.6.1.4.1.11.2.4.3.10.7
>     Object identifier 12: 1.3.6.1.4.1.11.2.4.3.10.13
>     Object identifier 13: 1.3.6.1.4.1.11.2.4.3.13.1

All these are HP-specific MIB objects, which the Net-SNMP
agent won't implement.

>   
> 2 ) then it gets the response from the agent (in this case a brother
> printer) 
>     Object identifier 6: 1.3.6.1.2.1.25.3.2.1.3.1
>     Value: STRING: "Brother MFC-8420"
>     Object identifier 7: 1.3.6.1.4.1.11.2.3.9.1.1.7.0
>     Value: STRING: "MANUFACTURER:Brother;COMMAND SET:PJL,HBP,PCL;MODEL:HP
> LaserJet 4050 Series;CLASS:PRINTER;COMMENT:The model name HP LaserJet 4050
> Series is used only for compatibility information for HP printer"

Ah - so the Brother printer is pretending to be an HP printer
in order to fool HP JetAdmin.  Sneaky....




> I try to simulate this with the net-snmp agent.

Then you'll need to implement the necessary HP MIB objects



>  as you can see the values for the enterprise OID come from the UCD-SNMP-
>  MIB and not from the Laserjet-Series4050-MIB as i expected
>  because i have already compiled the printer-MIB and the LeserJet MIB
>  into the agent 

But have you *implemented* these MIBs?
The agent isn't a magic box, and won't provide MIB object values
without someone (in this case, you) writing the code to do so.
Simply loading the MIB file is not enough.

Please see the FAQ entry:

        How do I add a MIB to the agent?



> - how can i exactly change the enterprise OID to 1.3.6.1.4.1.11 so the
> management software can access the Laserjet MIB instead of the UCD-SNMP-MIB

The enterprise OID is completely irrelevant here.

> or does this depend on the management software or some other additional
> vendor MIBs

No - it depends on code in the agent.   *Real* code, not the MIB file
syntax. As far as the agent is concerned, the MIB file is simply a
design document, to guide the programmer as they develop the code
to implement that MIB.  It doesn't "Just Happen".   *You* have to
write code (or employ someone to do this for you)

I wouldn't get hung up on the ifIndex ordering until you've tackled
this missing MIB, which is likely to be a much more significant problem.


Dave


-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
_______________________________________________
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

Reply via email to