When you need to poll the ARP table of a device, conventional wisdom is to use ipNetToMediaPhysAddress
or atPhysAddress
; however, both of these OIDs are deprecated according to Cisco's documentation.
These OIDs work just fine; however, I'm building a new tool so it makes sense to use the most current OID, if possible.
Is there a non-deprecated SNMP OID to query for the ARP table in a device? Google hasn't turned this answer up for me, so far...
Mircea's answer works well on newer IOS...
[mpenning@something]$ snmpbulkwalk -v 2c -c public -Osq 192.0.2.1 ipNetToPhysicalPhysAddress
ipNetToPhysicalPhysAddress.2.ipv4."192.0.2.1" a4:4c:11:90:56:80
ipNetToPhysicalPhysAddress.2.ipv4."192.0.2.2" a4:4c:11:96:68:0
ipNetToPhysicalPhysAddress.2.ipv4."192.0.2.101" 0:90:b:43:80:74
[mpenning@something]$ snmpbulkwalk -v 2c -c public -Oqv 192.0.2.1 sysDescr
Cisco IOS Software, C3900 Software (C3900-UNIVERSALK9-M), Version 15.2(2)T1, RELEASE SOFTWARE (fc1)
Technical Support: http://www.cisco.com/techsupport
Copyright (c) 1986-2012 by Cisco Systems, Inc.
Compiled Wed 29-Feb-12 23:44 by prod_rel_team
[mpenning@something]$
Older IOS requires use of ipNetToMediaPhysAddress
You should use
ipNetToPhysicalTable
as defined by RFC 4293. SoipNetToMediaPhysAddress
becomesipNetToPhysicalPhysAddress