Ip address

M

maneshcs

Hi,

I have to fetch the ip address through which internet is connected.

I have multiple network cards and i know through Dns i can fetch all the IP
address of my machine. But my current problem is i have to find out through
which IP internet is connected and i can establish an outbound connection.
I found some information in HTTPWebRequest and all but i am not having a
clear picture. Can anyone please help me with the above...

--
Manesh.C.S.
M2 Software and Services,
M Squared Building,
Technopark Campus,
Trivandrum -695581
Kerala,India.
Office: 0471-3042581
www.m2india.com
 
N

Nick Hounsome

I think that you will have to use a config file or database.

There is nothing special about "the internet" it is just another network.

Alternatively just try to contact a site that is always likely to be up (eg.
google or msdn) using each address in turn. You can combine this with the
config file or database approach to make it invisible to the user and yet
avoid having to do it every time your app runs.

The only other thing I can think of is that there might be some way to
deduce it from the use of DHCP (if you are using that)
 
M

maneshcs

Thanks...

But i need a code snippet through which i can bind each ip address and
connect to the net. pleaseee help meeeee....

--
Manesh.C.S.
M2 Software and Services,
M Squared Building,
Technopark Campus,
Trivandrum -695581
Kerala,India.
Office: 0471-3042581
www.m2india.com
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top