Active6 years, 3 months ago
There are two tools worth using to explore the available Fortinet’s SNMP data, they are snmpwalk and snmpget. The snmpwalk allows you to pull all the data under a section of the SNMP tree while snmpget will retrieve a specific value and must be passed the fully qualified path to the value. An example of each is below. NET-SNMP Tutorial - Using local MIBs The net-snmp tools can translate numeric object identifies (OIDs) into textual object identifiers using the MIB description files. The net-snmp toolkit provides a few of the standard MIBs, but certainly doesn't contain all the MIBs known to man.
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...
Older IOS requires use of
ipNetToMediaPhysAddress
Mike Pennington
Mike PenningtonMike Pennington7,29099 gold badges3434 silver badges8080 bronze badges
1 Answer
You should use
ipNetToPhysicalTable
as defined by RFC 4293. So ipNetToMediaPhysAddress
becomes ipNetToPhysicalPhysAddress
ipNetToMediaTable OBJECT-TYPE SYNTAX SEQUENCE OF IpNetToMediaEntry MAX-ACCESS not-accessible STATUS deprecated DESCRIPTION 'The IPv4 Address Translation table used for mapping from IPv4 addresses to physical addresses.
Mircea VutcoviciMircea Vutcovici
13.5k33 gold badges4242 silver badges6969 bronze badges