Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re: How to identify router IP address

by Abigail-II (Bishop)
on Jun 22, 2004 at 13:39 UTC ( #368715=note: print w/ replies, xml ) Need Help??


in reply to How to identify router IP address

Your best bet will be to call whoever is responsible for configuring the router. See, there's nothing magical about IP addresses that make it a router, *any* machine could be a router. If the machine you are running the script on is connected to the same network as the router you are interested in is, its routing table might list it. But maybe it doesn't. Maybe you can run a router discovery protocol. But maybe you can't. It all depends on the network policies. So contact the person or people responsible for setting up the router and/or network. They should know. We don't. All we can say is that 0 < x <= 255.

Abigail


Comment on Re: How to identify router IP address
Download Code
Re^2: How to identify router IP address
by dba (Monk) on Jun 22, 2004 at 13:43 UTC
    Apologize if I was not clear. This is my home Netgear MR814 4 port router. The internet IP changes (almost) everytime when I reboot the router.
      might it suggest DynDNS it allows you to dynamically update a hostname... ala soandso.rules.net so you can always connect to that hostname.. but the true ip behind it is updated via the DynDNS plugin whenever the router DHCP's. You might also want to upgrade the (assuming this is coming from your home cable or dsl connection) your account to have a static IP. ( I don't know if DynDNS can correctly determine the true outgoing ip address being used... because the machine connected to the router should be something like 192.168.1.101..but if the cable modem goes directly into the machine via ethernet port it should work fine
      so you would need something like DynDNS

      I'll suggest something other than DynDNS, and actually use Perl in the process. I keep an external web server with this simple CGI:

      #!/usr/bin/perl use CGI 'header'; print header('text/plain'); print $ENV{REMOTE_ADDR};

      Then you can query that CGI from inside your network and get the IP address. That information is stored on the router itself, of course, but it isn't necessarily easy to get at automatically.

      ----
      send money to your kernel via the boot loader.. This and more wisdom available from Markov Hardburn.

      A bit of clicking using the Netgear website reveales that the router has a web interface. I'd expect the configured address can be grabbed from your routers website. Did you check?

      Abigail (bless my ISP who provides me with a static IP address)

        How do you access the web interface if you don't know its ip address?

        Update: This was stupid. You mean the external ip address, I see.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://368715]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (10)
As of 2014-10-31 18:48 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    For retirement, I am banking on:










    Results (223 votes), past polls