Obtaining router external address

Peter plp-ysDPMY98cNQDDBjDh4tngg at public.gmane.org
Sat Apr 23 07:29:14 UTC 2005


On Fri, 22 Apr 2005, Barnaby Jeans wrote:

> Peter,
>
> If you have enabled SNMP on your router and set the appropriate
> community name then you should be able to execute the following
> (assuming you have the Net-SNMP utils)
>
> snmpwalk -c COMMUNITY_NAME -v 1 ROUTER_INTERNAL_IP ipAdEntAddr
>
> If you have every setup correctly you should get something similar to
> the following:
>
> IP-MIB::ipAdEntAddr.x.x.x.x = IpAddress: x.x.x.x
> IP-MIB::ipAdEntAddr.192.168.1.1 = IpAddress: 192.168.1.1
>
> You should get 2 addresses back, one is obviously the internal address
> of your router (which a quick grep -v  would remove) and the other one
> (with the x.x.x.x) will be the external IP of the router.
>
> If you want to get creative and see what other information is available,
> simply re-run the command leaving off the ipAdEntAddr piece (snmpwalk -c
> community_name -v 1 router_ip)
>
> Hope this helps.

Ok, thanks. I was using a tool called neo which apparently does not have 
this capability. I will get snmpwalk and see if it works here (it 
should).

thanks,
Peter
--
The Toronto Linux Users Group.      Meetings: http://tlug.ss.org
TLUG requests: Linux topics, No HTML, wrap text below 80 columns
How to UNSUBSCRIBE: http://tlug.ss.org/subscribe.shtml





More information about the Legacy mailing list