Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

MAC & IP address 1

Status
Not open for further replies.

mrakotaj

IS-IT--Management
Feb 12, 2004
1
CZ
Hi,

can somebody tell me how can I detect IP address of device with MAC address I know. I have a device using DHCP that is not visible as a PC or router. It's SONY NSP-100 but I don't have a remote control to this device and need to manage it.

THX
Jan
 
arp (address resolution protocol).

command line interface varies from o/s to o/s (on windows it's simply "arp macaddress").


<marc> i wonder what will happen if i press this...[ul][li]please tell us if our suggestion has helped[/li][li]need some help? faq581-3339[/li][/ul]
 
you could also view the arp table by entering the command arp -a, and then matching the MAC address you know with the IP address to the left of it.

ARP is used to obtain the MAC address when you know the IP address, its RARP (reverse address resolution protcol) that does the opposite.

In either case you should get the IP you are looking for.
 
1st - your device must have assigned an IP
2nd - your device shoud be in the same subnet with a computer from where you want too see the mac/ip pair.

If 1) && 2)
just create a .bat file (on Win machine) with next script


will ping all computers
and at the end will do an `arp -a'
the time out is set to 30ms (enough for a LAN)
you have to set MY_NET variable to match your subnet


### START SCRIPT
@echo off
set MY_NET=192.168.101.
echo Just wait....

FOR /L %%i IN (1,1,254) DO echo . && ping -n 1 -w 30 %MY_NET%%%i > tmp.out
arp -a
### END


PM
 
> 'with MAC address I know'

If you know the MAC address, rarp is the quickest solution (the 'arp macaddress' command on windows is an implementation of rarp: MS integrate arp and rarp into one command).

pinging everything on the subnet generates network traffic, and mimics the behaviour of a number of (recent, common) viruses. it may set sysadmin alarm bells off, and it would drive my loggers crazy!

<marc> i wonder what will happen if i press this...[ul][li]please tell us if our suggestion has helped[/li][li]need some help? faq581-3339[/li][/ul]
 
#1 why to ping all - if you didnt change packets (communicate) with the device the MAC/IP pair is not in your ARP table , so you have to do a packet transmition in some way with that IP, wihch IP ?!

#2 - a lot of traffic, it's just about 254x2(ping && `pong') packets

#3 - for me atleast the `arp MAC' doesnt work (on Win2000)

C:\Documents and Settings\marcel.preda>arp -a

Interface: 192.168.101.8 on Interface 0x1000003
Internet Address Physical Address Type
192.168.101.2 00-03-47-ce-ef-d2 dynamic
192.168.101.3 00-07-95-f4-e6-d1 dynamic
192.168.101.101 00-80-5f-95-83-86 dynamic

C:\Documents and Settings\marcel.preda>arp 00-03-47-ce-ef-d2

C:\Documents and Settings\marcel.preda>arp 000347ceefd2

C:\Documents and Settings\marcel.preda>arp 00.03.47.ce.ef.d2

Maybe I'm missing an option


PM
 
I think the notion is that the arp table has a short life, so you need to do something to refresh it.
 
If the device is using DHCP, and you know the MAC address, can't you go into your DHCP server and see what IP was assigned to it? Most DHCP servers keep a table that is accesible.

You'll only see an arp entry if your machine has talked to the other machine within whatever aging time is set.

Also, what type of network are you on. If you're on a Windows network, check WINS, and DNS as well. The machine may have registered itself when booting up.
 
my mistake, I forget that arp purely interrogated the ARP cache.

The 'look up IP from MAC' question has popped up a few times - perhaps it's time for a MAC->IP client?!

In the meantime, predamarcel's suggestion looks like the most viable. Much as I dislike sending pings around a network, unless you can access the info in the DHCP server I don't see an easy alternative.

<marc> i wonder what will happen if i press this...[ul][li]please tell us if our suggestion has helped[/li][li]need some help? faq581-3339[/li][/ul]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top