Mon, 16 May 2011

Airport Extreme, SNMP and MRTG

I was recently trying to set up MRTG on MacOS X, and I hit a stumbling block that I thought I would share with the internets in case it helps save someone the hassle.

Actually, it has little to do with MRTG, as I quickly established that snmptable, snmpwalk, and snmpget all suffered from the same problem: Even though I had properly configured my Airport Extreme to allow SNMP access, I'd get back an error that said "Timeout: No Response from [ip address]".

I tried several settings, and each time I clicked "Update" in the Airport Admin Utility on my Mac, it said the router restarted (with a surprisingly quick restart time) and the setting appeared to have been applied.

Still inaccessible at port 161, I figured that the Airport Extreme probably needed a hard restart. Tsk tsk to Apple for allowing a quick soft restart in the SNMP settings window to let the user think the setting had been applied when it hadn't! If you're running commands like
snmpwalk -v 1 -c public [Airport IP Address] system
and
snmpget -v 2c -c public -M /usr/share/snmp/mibs:$HOME/share/mibs \ -m+AIRPORT-BASESTATION-3-MIB [Airport IP Address] AIRPORT-BASESTATION-3-MIB::sysConfFirmwareVersion.0
and getting SNMP "Timeout: No Response" errors, even though you've clicked the "Allow SNMP" checkbox in the "Logging and Statistics" tab of the Advanced panel in Airport Utility, the solution is simple.

Right click (control click) your Airport Extreme in Airport Utility and click the "Restart..." option. It should take about a minute to reload, and you'll notice your snmpwalk/snmpgets are now succeeding, your Airport Extreme will be accepting UDP packets on port 161, and software like MRTG (if properly configured) will start to work.




Khan Klatt

Khan Klatt's photo