Obtaining router external address

Peter plp-ysDPMY98cNQDDBjDh4tngg at public.gmane.org
Fri Apr 22 20:30:19 UTC 2005


On Fri, 22 Apr 2005, Lennart Sorensen wrote:

> On Fri, Apr 22, 2005 at 10:27:33PM +0300, Peter wrote:
>> we had this thread about getting the address of the router from the lan
>> side. Solutions involving parsing the response of an external site were
>> recorded. I am using such a solution. However, someone said he can
>> obtain it using SNMP. I just tried and I can't on my router. Would the
>> person like to share that information here ?
>
> Well some routers do offer SNMP and some don't.  Some you have to turn
> the feature on too.  I know my USR8054 has a setting for enabling SNMP,
> although I haven't looked at what info it provides, but I suspect the
> external IP would be one of them.  I should check that sometime.

I turned it on obviously. I used a client called neo to test it. The IP 
info is not there, or I don't know how to spec the resource path to get 
it.

I can get a list of interfaces, and what's up etc and even macs but I 
can't resolve wan macs from the lan. This is a hen-or-egg problem. The 
router should be able to do this somehow but I can't find the way. Also, 
I'm interested in a more generalised solution.

I can use a script to pull the data from the web page of the router 
status or same via ssh. I would like something more elegant. Hacking the 
router is not an option.

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