10-10-2013 10:01 PM
Hi All,
Right now dot1dTpFdbPort(.1.3.6.1.2.1.17.4.3.1.2) OID is being used to find the mac address of the devices connected to a particular switch. It is being found out by passing the VLAN ID and dot1dTpFdbPort OID in the community string(A C# library sharpsnmp is used for this..). We get the list of Bridge port number connected to the switch from which we can get the associated ID which is MAC ID.
But in general, Is it possible to find the IP address of the devices connected to the switch in a similar manner?... Can specific OID be used for this purpose..
When we have the mac address we can use ARP method to get the device IP but then is it possible to get the IP address using OID?
Thanks in Advance.
Solved! Go to Solution.
10-11-2013 01:07 AM
The switch does not know the IP of the connected device, since it is a layer 2 device. It only knows the mac address.
The default gateway of the connected device will be able to make the relation between the mac address and the IP address.
So on this device you can collect the ARP table via SNMP.
Cheers,
Michel
10-11-2013 01:07 AM
The switch does not know the IP of the connected device, since it is a layer 2 device. It only knows the mac address.
The default gateway of the connected device will be able to make the relation between the mac address and the IP address.
So on this device you can collect the ARP table via SNMP.
Cheers,
Michel
10-11-2013 07:01 PM
Thank you Micheal Hegeraat. We'll try having the IP address retrived from the default gateway.
10-11-2013 07:11 PM
Hello Joshua,
What model switch and which IOS is it running? It is possible to see a listing of ip to mac to port associations if your switch is running ip device tracking.
You could attempt to use the "sh ip device tracking all" command however it may not be enabled or supported.
10-12-2013 12:19 AM
Indeed Damien,
C3750 IOS >= 12.2.52SE
And there is even a mib that could provide the interesting mac/IP details.
http://tools.cisco.com/Support/SNMP/do/BrowseMIB.do?local=en&step=2&mibName=CISCO-PAE-MIB
This might be kind of cutting edge, so careful for sharp edges and loose ends. :-)
Cheers,
Michel
10-16-2013 07:30 PM
Thank you Damien Miller and Michel Hegeraat for your inputs.. seems like there is one more thread as well on this .. working on those inputs as well..
10-16-2013 07:33 PM
Josh,
Getting the IP Address of devices connected to a Layer 2 switch has a new "twist".
Try this:
conf t
ip device tracking
interface range g1/0/1 - 24
ip device tracking max 10
end
---- Wait for approximately 10 seconds ----
sh ip device tracking max 10
-- or --
sh ip device tracking interface
03-10-2014 06:18 AM
Always learning something new :).
Works perfectly also in L2 switches - at least on 2960S switches with 15.0.2.SE.
Best regards
Isaac Alves
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