When you try and connect to your home network, you are connecting to a
single machine/device with a single IP address. The network itself doesn't
have one single address that you connect to. Rather, you have a point that
you expose which will grant you access, such as a proxy server, a router, a
VPN server, etc, etc.
You could see it as semantics, but I consider a network to be a
multitude of devices, each with their own IP address. The network itself
doesn't have a single address, just the connection point you use to get to
the network, whatever that connection point is.
As for the answer to your question, it will depend on the router itself.
Some routers have an API that they expose which will allow you to get router
information from it. So based on the brand of your router, you should check
that route first.
If that doesn't work, most routers have a way of connecting through a
web browser to the router itself to get information about the router
(including the IP address it has on the Internet). You should be able to
make a request to that and then scrape that information.
--
- Nicholas Paldino [.NET/C# MVP]
-
mv*@spam.guard. caspershouse.co m
"MrNobody" <Mr******@discu ssions.microsof t.com> wrote in message
news:A7******** *************** ***********@mic rosoft.com...
You playing the semantics game with me right?
The IP address of my network as seen outside my network.
For example, if I wanted to connect to a machine on my home network from
outside, I don't try conatacting the IP address I get when I type
ipconfig
in the command prompt when I'm on that target machine at home, because
that
is an IP address only known to my home network- and this is what most
examples of determining IP address gives you. Instead I have to connect
to
my router's web interface to see what my WAN IP address is. Then I can
forward the request to the target machine.
So I need the IP address which my ISP has assigned to my home whether it's
going to a router, a computer, a switch- whatever (it's not static IP so
tht's why I need a way to find out via C#)