Welcome to Dream.In.Code
Getting C# Help is Easy!

Join 107,162 C# Programmers for FREE! Ask your question and get quick answers from experts. There are 1,352 online right now! We've got more than 500 tutorials and 2,000 snippets. Join and find out why Dream.In.Code is the #1 programming help community on the internet! Registration is fast and FREE... Join Now!



IP Address Look up on Ethernet

 
Reply to this topicStart new topic

IP Address Look up on Ethernet, look up unknown ip addess of connected device

GSReddy
post 1 Aug, 2008 - 11:20 AM
Post #1


New D.I.C Head

*
Joined: 23 May, 2007
Posts: 1


My Contributions


Hi

I would need to look up the IP address on other end connected hardware through ethernet. I mean, connect laptop to one end of ethernet and other end to hardware. But, I do not know the hardware IP Address, Subnet mask, and Gateway.

I'm wondring, is there any way that I can write peace of code in c# to pull those address from connected hardware.

I greatly appreciate your help.

Thank you,
Reddy
User is offlineProfile CardPM

Go to the top of the page


skaoth
post 1 Aug, 2008 - 01:09 PM
Post #2


D.I.C Regular

Group Icon
Joined: 7 Nov, 2007
Posts: 319



Thanked 5 times

Dream Kudos: 100
My Contributions


Are you using a crossover cable to connect these devices together (laptop to hardware)?
If you are then the info you need is here: http://en.wikipedia.org/wiki/Ethernet_crossover_cable
at the bottom of the page section "Networks created using crossover cable"

If your not, then you may never know. because what means that the two devices will have to use a router to communicate with each other. When using routers, it is pretty much unknown what the internal addressing scheme is. This is assuming that the two devices are on separate networks

This post has been edited by skaoth: 1 Aug, 2008 - 01:11 PM
User is offlineProfile CardPM

Go to the top of the page

DeCompile
post 1 Aug, 2008 - 04:07 PM
Post #3


D.I.C Head

**
Joined: 20 Jul, 2008
Posts: 116



Thanked 3 times
My Contributions


The great thing about today's hardware in respect to the previous era's hardware is that network adaptors of today will actually auto - negotiate their network.

This means that if they detect that they are connected to another computer directly, they will swap their internals and act as if they have a cross over cable connected.

In regards to your question, if the other computer has a static IP address and you are connecting directly to it you can do it this way:

It can be done, unfortunately it takes a very very long time to find it. As you have to set the network address of every available network subnet. So that's over 65 million different combinations. There are shortcuts, but even still. It will be quicker to just read it off the other computer.

Otherwise you would have to:

Change IP address of the local network adapter, and subnet.
Ping all addresses available in that subnet and then change to the next one.
User is online!Profile CardPM

Go to the top of the page

skaoth
post 1 Aug, 2008 - 08:17 PM
Post #4


D.I.C Regular

Group Icon
Joined: 7 Nov, 2007
Posts: 319



Thanked 5 times

Dream Kudos: 100
My Contributions


QUOTE
The great thing about today's hardware in respect to the previous era's hardware is that network adaptors of today will actually auto - negotiate their network.


Am I starting to show my age here!!
User is offlineProfile CardPM

Go to the top of the page

DeCompile
post 1 Aug, 2008 - 08:32 PM
Post #5


D.I.C Head

**
Joined: 20 Jul, 2008
Posts: 116



Thanked 3 times
My Contributions


It certainly could be. biggrin.gif

Although, I will admit you do see 'legacy' devices in the field sometimes.
User is online!Profile CardPM

Go to the top of the page

Fast ReplyReply to this topicStart new topic
Time is now: 8/27/08 09:23PM

Live C# Help!

C# Tutorials

Reference Sheets

C# Snippets

Bye Bye Ads

Free DIC T-Shirt

T-Shirt Example

Related Sites

Monthly Drawing

Thumb Drive

Partners

Top Contributors

Top 10 Kudos This Month