How to get IP address of an ethernet device

P

Pavel A.

Hello,

I have a lot of ethernet interfaced boxes: routers, WLAN access points etc etc,
and often forget or lose their IP addresses (or somebody else helps with the confusion).
Do you know an utility that can detect the IP & subnet of a device ?

If not, I'm going to write such utility.
It will assume that the box is connected to a dedicated netcard on PC with a cross cable or thru a hub.

The question is, what is the best way to solicit from a device a packet that reveals it's IP address?
Send ARP? Ping to broadcast ethernet address & broadcast IP, with TTL=1?

Thanks in advance,
- PA
 
S

Steve Winograd [MVP]

"Pavel A." said:
Hello,

I have a lot of ethernet interfaced boxes: routers, WLAN access points etc etc,
and often forget or lose their IP addresses (or somebody else helps with the confusion).
Do you know an utility that can detect the IP & subnet of a device ?

If not, I'm going to write such utility.
It will assume that the box is connected to a dedicated netcard on PC with a cross cable or thru a hub.

The question is, what is the best way to solicit from a device a packet that reveals it's IP address?
Send ARP? Ping to broadcast ethernet address & broadcast IP, with TTL=1?

Thanks in advance,
- PA

Here are some programs that can find devices and their IP addresses on
a network:

http://www.angryziber.com/ipscan/
http://www.gabn.net/junodj/ws_ping.htm
--
Best Wishes,
Steve Winograd, MS-MVP (Windows Networking)

Please post any reply as a follow-up message in the news group
for everyone to see. I'm sorry, but I don't answer questions
addressed directly to me in E-mail or news groups.

Microsoft Most Valuable Professional Program
http://mvp.support.microsoft.com
 
P

Pavel A.

Thanks Steve.

Hmm.... brute force scanners do not quite fit here.
The target device is connected directly to my machine without router.
So I must change my own subnet or add routing rules for the range to scan.
What I need is combination of IP and raw ethernet sniffer.
Listening on the wire can tell if the device sends server advertisements
or dhcp requests. in the latter case it may have no IP address at all.

Lastly, none of these tools allow to select the interface to sniff on - need
to disconnect from the public network before using them.

Can raw sockets be used to sniff everything on the wire? even non-IP packets?

-PA
 
D

Dave Lowther

What I need is combination of IP and raw ethernet sniffer.
Listening on the wire can tell if the device sends server advertisements
or dhcp requests. in the latter case it may have no IP address at all.

Lastly, none of these tools allow to select the interface to sniff on - need
to disconnect from the public network before using them.

Can raw sockets be used to sniff everything on the wire? even non-IP
packets?

Have you considered using the WinPcap library. It's free and is used as the
capture layer for the Ethereal packet sniffer. The library is easy to use if
you are a C programmer with some experience of socket programming.

http://winpcap.polito.it/install/default.htm

Dave.
 

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