How to Retrieve WAN IP of Router/Gateway

102 views
Skip to first unread message

reasley

unread,
Mar 16, 2007, 1:10:46 PM3/16/07
to The Java Posse
Hello everyone,
I am trying to retrieve the IP assigned to my router from my ISP. Can
someone give me some pointers on how to retrieve this information from
within the network? I appreciate any information that you can provide.
Thanks :)

Rich Liu

unread,
Mar 16, 2007, 4:09:42 PM3/16/07
to java...@googlegroups.com

Casper Bang

unread,
Mar 16, 2007, 5:38:15 PM3/16/07
to The Java Posse
You could use a tracert approach, I've done that from C# before. You
send out UDP packets to a known internet host, incrementing the TTL
one until you find a valid internet address (Not in the range of
10.0.0.0-10.255.255.255, 172.16.0.0-172.31.255.255 and
192.168.0.0-192.168.255.255).

/Casper

10.0.0.0 through 10.255.255.255
169.254.0.0 through 169.254.255.255 (APIPA only)
172.16.0.0 through 172.31.255.255
192.168.0.0 through 192.168.255.255

On Mar 16, 9:09 pm, "Rich Liu" <richliu2...@gmail.com> wrote:
> You can tryhttp://www.whatismyipaddress.com/

Rob Wilson

unread,
Mar 22, 2007, 8:06:43 AM3/22/07
to The Java Posse
Another options...

Some routers allow you to login to it, so if you type from your DOS
command window (assuming windows)

ipconfig /all

take not of your gateway IP address, if it's 192.168.2.1 then type
http://192.168.2.1 into your browser, you should then have a 'WAN'
page that tells you your current IP address.

Reply all
Reply to author
Forward
0 new messages