Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Is there some way for me to find IP address of machine connected in same LAN from its MAC address.

share|improve this question

3 Answers 3

Since you are on the same lan you can check your machines arp table. If the machine doesn't show up you can ping your broadcast address to get all machines to respond to you.

On windows the command you are looking for is arp -a (on nix you just need to type arp)

If the machine is on another subnet, you have to have access to the layer 3 device (router, L3 switch, firewall) you can look at the arp table there.


As asked how to ping your broadcast address:

First you will need to figure out your broadcast address. with /8/16/24 addresses this is fairly easy. I'll use a /24 for this example.

Setup:

IP: 192.168.2.150
NETMASK: 255.255.255.0

Your broadcast address is the last IP in your subnet. (for more about subnetting Evan Anderson has a GREAT write up.

in my case my broadcast address would be 192.168.2.255. So i would do ping 192.168.2.255 to ping my broadcast address. This is basically asking all machines on your network to talk to you via ICMP echo. To do this your machine needs to get the mac address, so it sends and arp-request to all machines on the network, and they all reply with their mac address. Then your machine has thier MAC -> IP mapping in it's arp table.

share|improve this answer
    
how do u do this "If the machine doesn't show up you can ping your broadcast address to get all machines to respond to you." –  Kazoom Feb 5 '10 at 1:00
    
thanks, however when i send broadcast to my subnet i get request timedout. IP Address. . . . . . . . . . . . : 10.129.5.180 Subnet Mask . . . . . . . . . . . : 255.255.255.0 so my subnet mask is 10.129.5.255. so ping 10.129.5.255 but it times out –  Kazoom Feb 5 '10 at 1:57

For windows system,there is a free tool called mac scanner.

share|improve this answer

Pinging the broadcast address doesn't always guarantee a response. From my experience only printer software replies to broadcast ping.

What you need is actually called Reverse-Arp but it has been superseded by BOOTP. However I can't guess how BOOTP can help to get your answer.

Layer 2 discovery protocols such as LLDP and CDP are supposed to help, but they don't operate on a query/response model but instead rely on sending periodic beacons. If you are sure your LAN comprises only of Windows 7 PC's you can listen to LLDP packets and filter out the interesting ones.

But the most foolproof method to me seems to be the Netbios. Netbios queries returns details which includes interface IP and Mac address details. I would use a tool such as nbtscan and grep for the MAC address

nbtscan 192.168.1.0/24 | findstr "00:11:22"

This has the additional advantage one can query across subnets, provided there is no firewall in between.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.