11-04-2006 10:32 AM
Hi, I'am looking for a way that I could take which MAC or IP addresses is learned on a routers port(layer 3) and which is this port via snmp(OIDs). Is there any? I am looking something like procedure "Using SNMP to Find a Port Number from a MAC Address on a Catalyst Switch" (documentation of Cisco) it refers about layer 2 switches I want to find the procedure for routers layer 3. Thanks in advance.
11-04-2006 11:28 AM
This is exactly what CiscoWorks Campus Manager does. It reads the CAM/MAC tables from switches, and cross-references that with the ARP tables from routers.
The objects used to obtain the ARP tables are (from the IP-MIB):
ipNetToMediaPhysAddress (MAC address)
ipNetToMediaNetAddress (IP address)
You may also be interested in the other two objects from the ipNetToMediaTable, ipNetToMediaIfIndex and ipNetToMediaType to help you decide which addresses to accept.
11-05-2006 04:39 AM
Thank you for your reply. But I want some explanations to be given. The ipNetToMediaTable contains information about CAM/MAC tables. The ipNetToMediaIfIndex returns {1.3.6.1.2.1.4.22.1.1.1.x.y.z.w Integer32 1}
&
1 is the IfIndex that the x.y.z.w(Is it the ip address? e.g. 10.0.0.1) learned now on that port? Or the one that learned one time and now is dumped into the table?
11-05-2006 09:25 AM
The ipNetToMediaTable has nothing to do with the CAM tables. It contains information analogous to "show arp". ipNetToMediaIfIndex returns the ifIndex for the interface on which the entry was learned. So, IP address x.y.z.w was learned on the interface with the ifIndex of 1.
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide