Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'Find an Airport Extreme's WAN address in Terminal' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Find an Airport Extreme's WAN address in Terminal
Authored by: digitalsushi on Dec 13, '10 08:23:06AM
I couldnt figure out how to make my mib resolve my 2009 airport extreme... but i have no idea how snmp works, either.
But this works for me. I don't figure this is specific to my general device (i think this is generic)

#!/bin/bash
ROUTER=`netstat -nr|awk '/^0.0.0.0/ {print $2}'`
gw=`snmpwalk -Os -c public -v 1 $ROUTER iso.3.6.1.2.1.4.21.1.7.0.0.0.0|awk '{print $4}'`
ip=`snmpwalk -Os -c public -v 1 $ROUTER iso.3.6.1.2.1.4.21.1.7.$gw|awk '{print $4}'`
echo $ip



[ Reply to This | # ]