ARP Table via SNMP
I read some posts about getting the arp table of the pfsense via SNMP. I am not able to get it?!
I have enable all snmp modules; SNMP ist working:
root@daffy:~# snmpwalk 172.27.0.1 -c public -v2c |head
SNMPv2-MIB::sysDescr.0 = STRING: "ipdrouter.ipdynamics.local 1345880010 FreeBSD 8.1-RELEASE-p6"
SNMPv2-MIB::sysObjectID.0 = OID: BEGEMOT-MIB::begemot.220.127.116.11
EXPRESSION-MIB::sysUpTimeInstance = Timeticks: (1303876) 3:37:18.76
But no arp table:
root@daffy:~# snmpwalk 172.27.0.1 -c public -v2c ipNetToMediaPhysAddress
RFC1213-MIB::ipNetToMediaPhysAddress = No Such Instance currently exists at this OID
root@daffy:~# snmpwalk 172.27.0.1 -c public -v2c ipNetToPhysicalPhysAddress
IP-MIB::ipNetToPhysicalPhysAddress = No Such Object available on this agent at this OID
root@daffy:~# snmpwalk 172.27.0.1 -c public -v2c ipNetToPhysicalTable
IP-MIB::ipNetToPhysicalTable = No Such Object available on this agent at this OID
Same here, apparently it was working around 1.2:
Would be great if it came back :)
If I may suggest an improvement with regards to IPv6, ipNetToPhysicalPhysAddress (18.104.22.168.22.214.171.124.1.4) table might be a nice new home for it.
What can be observed on other networking devices (e.g. switches), that the old ipNetToMediaPhysAddress (126.96.36.199.188.8.131.52.1.2) is kept and ipv6NetToMediaPhysAddress (184.108.40.206.220.127.116.11.12.1.2) is added for ND entries…
I had given up on getting ARP tables from pfSense too, I didn't know it was not working and thought it was me. Would definitely like to see it working.
Since the SNMP data was requested by an external webserver, it is also possible to get some webpage info through this php webserver.
Created to following script on pfSense /usr/local/www/arp.php
$dhcpFile = shell_exec('arp -na'); echo $dhcpFile . "\n" ; ?>
E.g. https://pfsenseAddress/arp.php o wget https://pfsenseAddress/arp.php -O arp_table
Just tested 2.2.3-RELEASE and it's back again, yieih!!!