473,748 Members | 10,737 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How do I determine my WAN address?

I need to find out the IP address of my local network on the WAN. There is
alot of information on getting my local machine IP address but I can't find
anything for getting the IP address my network is on.

I was thinking I could make a HTTP Request to a server which displays your
IP address as they see it and scrape it out of the response but I was hoping
for a method which is less dependent on some server out on the web...
May 17 '06 #1
8 10381
MrNobody,

What do you mean the IP address of your network? There is no such
thing. Your network is composed of different machines all connected to each
other. There is no single one IP address for the network.

What are you trying to do?
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard. caspershouse.co m

"MrNobody" <Mr******@discu ssions.microsof t.com> wrote in message
news:AB******** *************** ***********@mic rosoft.com...
I need to find out the IP address of my local network on the WAN. There is
alot of information on getting my local machine IP address but I can't
find
anything for getting the IP address my network is on.

I was thinking I could make a HTTP Request to a server which displays your
IP address as they see it and scrape it out of the response but I was
hoping
for a method which is less dependent on some server out on the web...

May 17 '06 #2
Hi,

"Nicholas Paldino [.NET/C# MVP]" <mv*@spam.guard .caspershouse.c om> wrote in
message news:eP******** ******@TK2MSFTN GP05.phx.gbl...
MrNobody,

What do you mean the IP address of your network? There is no such
thing. Your network is composed of different machines all connected to
each other. There is no single one IP address for the network.

What are you trying to do?


I think he means the IP of the gateway he use to connect to the internet.
"Wan address" is how it;s usually described in most of the DSL modems
--
--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation
May 17 '06 #3
I was thinking I could make a HTTP Request to a server which displays your
IP address as they see it and scrape it out of the response but I was
hoping
for a method which is less dependent on some server out on the web...


Hi,

unfortunatelly it's the only way I know of. you may use a couple of them
just in case one fails
--
--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation
May 17 '06 #4
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#)
May 17 '06 #5
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#)

May 17 '06 #6
Hi,

"MrNobody" <Mr******@discu ssions.microsof t.com> wrote in message
news:A7******** *************** ***********@mic rosoft.com...
You playing the semantics game with me right?
More likely you did not explain correctly what you wanted in the first
place.
The IP address of my network as seen outside my network.
This also is incorrect, you may have several IPs assigned to your network by
your service provider.
For example, if I wanted to connect to a machine on my home network from
outside,
In most cases you will have another problem, you need to configure the
router to forward those packages to the correct internal computer.
Also none of the solutions given here will solve this problem, You
originally asked how to know the "external" IP from the internal network.
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#)


May 17 '06 #7
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


Ah, good idea! Was thinking about contacting external servers for this when
I could just get it off my router's web interface.

Thanks for the help
May 17 '06 #8
Hi,

"MrNobody" <Mr******@discu ssions.microsof t.com> wrote in message
news:37******** *************** ***********@mic rosoft.com...
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


Ah, good idea! Was thinking about contacting external servers for this
when
I could just get it off my router's web interface.

I would go for the external servers. The router can be changed, more
important the password of the router can change more often. even it's
possible that you need to create a seesion.
May 18 '06 #9

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

16
8100
by: siliconmike | last post by:
Hi, I'm looking for a reliable script that would connect to a host and somehow determine whether an email address is valid. since getmxrr() only gets the mx records.. Links/pointers ? Mike
7
4459
by: ad | last post by:
Hi, As title, How to determine if a string is an EMail account?
1
1208
by: Jeff S | last post by:
How can I determine the IP address of users creating new sessions of my ASP.NET application?
4
9427
by: Selden McCabe | last post by:
Does anyone know how to determine the client's MAC address from within ASP.Net? I suppose it would have to be java or vb script running on the browser, but I haven't been able to find an example... Thanks, ---Selden McCabe
10
6833
by: Raffi | last post by:
Hi, I'm looking for a way using JavaScript to determine if the browser window has an address bar. Thanks, Raffi
3
6110
by: billie | last post by:
Hi all. I'm searching for a module that permits me to low-level interact with ethernet interfaces of my system. I would like to determine at least the first of the followings values: 1 - IP address assigned to the interface 2 - subnet mask 3 - default gateway 4 - primary and secondary dns 5 - default wins server 6 - mac address
18
2842
by: Abhishek | last post by:
lets consider that I have defined an integer like this. int a=5; now taking the fact that an integer is allocated 2 bytes in memory and the memory address increases in the left to right direction, which way is the 16bit representationof 5 stored.. i.e 15 is 0000000000001111 representation in binary right? if the memory address increases in left to right direction with each memory address being capable of holding 8bits (i.e 1 byte)..can u...
13
3839
by: softwaredoug | last post by:
I can't see to easily find this on google or in a newsgroup Is there a standard function/macro/whatever you can call and determine the distance in a C program how deep one is in the C call stack from main. Something along the lines: int main() {
6
3405
by: BA | last post by:
Hi Everyone, I have an application that sits behind a server farm, the application needs to pass its NLB IP address in the message that it sends to another service. From C# code, how can I determine the IP address of the network load balanced machine that the message is generated from? So, in essence, I have server1, server2 and server3 sitting behind the NLB IP address 100.1.2.100, then I have server4 and server5 sitting behind NLB...
2
1595
by: Trmbne2000 | last post by:
Hi, I'm developing a service provider listing service. Part of the specification is to have both an address and a 'seasonal address' for each listing. The database stores the start and end months during which the seasonal address should be displayed as the address. Right now I am just grabbing everything out of the database, and using ASP to determine which address to display (seasonal if it is within the month range, normal otherwise ). ...
0
8830
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9541
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
9321
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9247
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6796
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6074
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4874
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3312
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2215
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.