Networking Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsSystem AdministrationNetworking Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
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  
Old March 3rd, 2004, 11:00 AM
valen1260 valen1260 is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Nov 2003
Location: Lexington, KY
Posts: 12 valen1260 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
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?

Reply With Quote
  #2  
Old March 3rd, 2004, 02:27 PM
juniperr juniperr is offline
network dude
Dev Shed Intermediate (1500 - 1999 posts)
 
Join Date: Dec 2003
Posts: 1,679 juniperr User rank is Second Lieutenant (5000 - 10000 Reputation Level)juniperr User rank is Second Lieutenant (5000 - 10000 Reputation Level)juniperr User rank is Second Lieutenant (5000 - 10000 Reputation Level)juniperr User rank is Second Lieutenant (5000 - 10000 Reputation Level)juniperr User rank is Second Lieutenant (5000 - 10000 Reputation Level)juniperr User rank is Second Lieutenant (5000 - 10000 Reputation Level)juniperr User rank is Second Lieutenant (5000 - 10000 Reputation Level) 
Time spent in forums: 1 Week 6 Days 21 h 55 m 2 sec
Reputation Power: 85
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.

Reply With Quote
  #3  
Old March 3rd, 2004, 04:01 PM
valen1260 valen1260 is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Nov 2003
Location: Lexington, KY
Posts: 12 valen1260 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Thumbs down router

Siemens SpeedStream 2614
As far as I know, it only provides a simple web interface.

Reply With Quote
Reply

Viewing: Dev Shed ForumsSystem AdministrationNetworking Help > retrieve router's IP number


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 1 hosted by Hostway