Re: RFC1213-MIB vs IF-MIB, ifType and -mALL

Peter Valdemar Mørch <[email protected]>
Newsgroups gmane.network.net-snmp.user
Message-ID <[email protected]>
Wups, I was too quick in my testing there:

On Tue, Jun 21, 2011 at 12:48 PM, Peter Valdemar Mørch <[email protected]>wrote:

> It seems one can force (re?)-loading of IF-MIB after 'ALL' like this: -mALL
> -mIF-MIB / SNMP::loadModules('ALL'); SNMP::loadModules('IF-MIB') to force
> IF-MIB to load after RFC1213-MIB.
>

And that works for IF-MIB:

# snmpwalk -M$DIRS -mALL -v2c -c$COMMUNITY $IP ifType | head -n 1
RFC1213-MIB::ifType.1 = INTEGER: 53
# snmpwalk -M$DIRS -mALL -mIF-MIB -v2c -c$COMMUNITY $IP ifType | head -n 1
IF-MIB::ifType.1 = INTEGER: propVirtual(53)

But then one can't access anything from any other mib as this shows:

# snmpwalk -M$DIRS -mALL -mIF-MIB -v2c -c$COMMUNITY $IP lmTempSensorsTable
lmTempSensorsTable: Unknown Object Identifier (Sub-id not found: (top) ->
lmTempSensorsTable)

# snmpwalk -M$DIRS -mALL -v2c -c$COMMUNITY $IP lmTempSensorsTable
LM-SENSORS-MIB::lmTempSensorsTable = No Such Object available on this agent
at this OID
(yeah, there is no such instance on the equipment, but snmpwalk could find
the OID)

So, given that RFC1213-MIB is in ./mibs/, is there any way I can use -mALL
or the perl equivalent and still get the (newer) ifTable definition from
IF-MIB?

My next approach would be:

# cp -a /usr/share/snmp/mibs /some/dir
# rm /some/dir/RFC1213-MIB.txt
# snmpwalk -M/some/dir:/my/mibs -mALL ...

But it is such a hack! I'm hoping you guys have a better way!
-- 
Peter Valdemar Mørch
http://www.morch.com

------------------------------------------------------------------------------
EditLive Enterprise is the world's most technically advanced content
authoring tool. Experience the power of Track Changes, Inline Image
Editing and ensure content is compliant with Accessibility Checking.
http://p.sf.net/sfu/ephox-dev2dev

_______________________________________________
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.