[c-nsp] IPv6 neighbor table via SNMP
Phil Mayers
p.mayers at imperial.ac.uk
Mon Jul 11 17:38:10 EDT 2011
On 07/11/2011 10:26 PM, Tom Ammon wrote:
> Good call. Using the numeric OID works, so that confirms what the
> problem is.
FWIW, the "netdisco" source contains a comprehensive set of MIBS; it's
where I get my mib files from, as the guy who assembles them fixes them
up so the load in net-snmp without warnings.
>
> I'm going to show some SNMP ignorance here, but how do I translate a
> name like CISCO-IETF-IP-MIB to a numeric OID? I have read through mib
> files before but have never been able to figure out how to translate
> them into a numeric OID. How do you find this?
Well, once you've got the MIBS, snmptranslate in recent net-snmp builds
is your friend:
export MIBDIRS=/path/to/netdisco/mibs/cisco:/path/to/netdisco/mibs/rfc
export MIBS=all
$ snmptranslate -I b -O fn cInetNetToMediaTable
.1.3.6.1.4.1.9.10.86.1.1.3
...but of course, once you've got the mibs, you don't need to stick with
boring numeric OIDs:
export MIBDIRS=/path/to/netdisco/mibs/cisco:/path/to/netdisco/mibs/rfc
export MIBS=CISCO-IETF-IP-MIB
snmptable $rtr cInetNetToMediaTable
...or:
snmptable -M ... -m CISCO-IETF-IP-MIB cInetNetToMediaTable
It can be useful to limit the mibs you load, as it can take time to
parse a very large set.
More information about the cisco-nsp
mailing list