If you are under OSX Lion and onward you will notice that the Aiport Utility does not allow you to enable SNMP, along with a bunch of other options that may have been useful to you. Do not worry, the settings are there but they are just hidden by the dumbed-down interface. Just load Snow Leopard and use the Aiport Utility in Snow Leopard to enable SNMP.
To set-up SNMP on the machine quarrying the device:
aptitude install snmp snmp-mibs-downloader
which will install SNMP along with the most vital MIBs./usr/share/snmp/mibs
.You can now, for example, walk the entire tree of the Airport machine:
snmpwalk -v1 -c public 192.168.0.1 -m AIRPORT-BASESTATION-3-MIB
where:
192.168.0.1
- is the IP address of the Airport station.Consider a scenario where you have an Airport device that routes all the traffic to clients behind the Airport. You may need to retrieve the real IP address that the Airport currently has leased from your ISP.
Provided you have installed the necessary SNMP tools as mentioned in the previous section of this page, the following bash command:
snmpwalk -v1 -c public 192.168.0.1 -m AIRPORT-BASESTATION-3-MIB RFC1213-MIB::ipAdEntAddr | head -1 | awk '{ print $4 }'
where:
192.168.0.1
is the IP address on your local network of the Airport deviceshould retrieve the external IP address of the Airport device.