Board index » Visual Studio » retrieving an ip address

retrieving an ip address

Visual Studio92
Hey all



is there a way to retrieve the ip address that is being broadcasted by my router to the internet



ari


-
 

Re:retrieving an ip address



"ari" <anonymous@discussions.microsoft.com>wrote in message

Quote
Hey all,



is there a way to retrieve the ip address that is being broadcasted by my

router to the internet?



ari



I am not sure I understand what you mean by "broadcasted" as network

broadcasts are not

a normal function of a NAT router. I will ass-u-me you mean the IP address

asigned

to the WAN port of your router by your ISP.



I just wrote a script to do this and it e-mails the results to a command

line specified

address(s). Perhaps the easiest way is to use whatismyip.com. I then parsed

the

html from that page to obtain the IP address.



Another way that is more reliable in the case that whatismyip.com is either

down or

decides not to be a "free" resource anymore is to access the HTML status

page of

your router and parse for the IP from that page. I use an SMC Barricade so

the

url for that is 192.168.123.254/status.htm">192.168.123.254/status.htm



This WILL vary depending on your router and it firmware level. The second

method is also not very portable as it is tied to specific hardware and

firmware

versions.



TDM





-