in reply to Perl SNMP, CISCO OID

Would you be willing to post the code that Cisco provided?   I'd sure be interested in seeing their solution.

By the way, SNMP::BridgeQuery might be of interest.
From the README:

BridgeQuery polls a device which respond to SNMP Bridge Table queries and generates a hash reference with each polled MAC address as the key and the associated port as the value. The specific MIBs that are polled are described in RFC1493.

SNMP::BridgeQuery requires Net::SNMP in order to function.

Devices can be switches, bridges, or most anything that responds as a OSI Layer 2 component. Layer 3 devices do not generally respond and will cause an error. If an error is generated, it will return a hash reference with a single element ('error') which can be tested for.

I've not yet used this module, so have no code to offer.

Update: 2001-09-27
The OID you want is dot1dTpFdbAddress numeric 1.3.6.1.2.1.17.4.3.1
example snmpwalk syntax:
snmpwalk cat5000a public@1003 .1.3.6.1.2.1.17.4.3.1

Note the "@vlan#" following the ROcommunitystring, and the numeric OID's leading "."
    cheers,
    Don
    striving toward Perl Adept
    (it's pronounced "why-bick")

  • Comment on Re: Perl SNMP, CISCO OID (SNMP::BridgeQuery)

Replies are listed 'Best First'.
Re: Re: Perl SNMP, CISCO OID (SNMP::BridgeQuery)
by PyroX (Pilgrim) on Sep 20, 2001 at 21:11 UTC
    It looks like the cisco provided script IS using SNMP, and does it much like you described. I re-wrote/added to some of the code then to gather allot more information. As for giving the code out, I am not sure if I can, as my employer has cisco contracts, and the script may be protected under that. I will look into it though.