|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Stay one step ahead of the competition. Evaluate and give feedback
on some of the hottest web development tools on the market today.
Make your opinion heard! Click
Here
|
|
#1
|
|||
|
|||
|
retrieve router's IP number
I have a Linux (Red Hat) server running behind a router. My "world" IP number is dynamic, so I'd like to be able to retrieve it using a script. Traceroute, ping, and dig do not give me the info I need. ifconfig gives me the private IP number. I am currently using
Code:
lynx -dump www.whatismyip.com and capturing the output, but I don't like relying on an outside source if avoidable. (And I don't like hammering their site.) Does anyone know of any Linux command that would return my world IP? |
|
#2
|
|||
|
|||
|
you missed the most important part here what router are you using? as if it was a cisco you would right a script to telnet to the router and do a [sh ip int brie | i interface ] then grep the address line. also do a man on trace and see if there are extended commands as cisco routers can trace a full async path with return route in that case you would grep the last public address.
Last edited by juniperr : March 3rd, 2004 at 02:31 PM. |
|
#3
|
|||
|
|||
|
Siemens SpeedStream 2614
As far as I know, it only provides a simple web interface. |
![]() |
| Viewing: Dev Shed Forums > System Administration > Networking Help > retrieve router's IP number |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|