Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SNMP Port Query

Status
Not open for further replies.

marshyrob

Technical User
Jan 20, 2004
137
GB
Hi All

Can any tell me if it is possible to send a SNMP query to a passport 8600 to obtain a given MAC addresses IP address.

So for example, i query a specific port with the relevant OID which includes the MAC address and the returned value is IP address of the device attached to that port.

I did find that it does IP - MAC when i walked it but couldnt find the option for MAC to IP. The OID and MIB for that were - IP-MIB (ipNetToMediaIfPhysAddress)

Any help or would be appreciated.

Rob
 
I think I know what you're looking for, but let me know if I'm way off base here:
What I've had to do in the past is to walk the whole ipNetToMediaTable (.1.3.6.1.2.1.4.22.1) and stick it all in a hash that I can then use to find the IP-MAC pairs.
That along with the contents of the dot1dTpFdbTable (.1.3.6.1.2.1.17.4.3) allow me to find pretty much any device on our network.
 
Hi anthonyanderberg

Can you explain the hash process? This is what im looking for but not too sure what you mean about the hash bit.

Regards

Rob
 
Sorry, I program in Perl and often assume everyone else does too - or at least I assume they should be using Perl. :)

A hash (sometimes called an associative array) is a data structure in Perl that allows me to stick the data in memory and then easily pull out the IP/MAC pair(s) I'm looking for.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top