LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices

Reply
 
Search this Thread
Old 08-14-2005, 04:41 PM   #1
dysenteryduke
LQ Newbie
 
Registered: Jan 2005
Posts: 8

Rep: Reputation: 0
How to find IP address of a machine if I know their MAC Address


Hi,

I recently picked up an NCD 88K terminal server, and was wondering how I can figure out the IP address o fhe macine. The MAC address is printed on teh bottom of the machine. Is there any way I can scan my local network to try and find the IP address that corresponds to the MAC address? It would be really nice to just hook up a monitor to the machine, but the female connector is a 26 pin ( 2 rows of 9, 1 row of 8) connector, which I've never seen before. Also when I do an arp -a the mac Address does not show up in my arp table.

thanks,

Jeff
 
Old 08-14-2005, 05:23 PM   #2
Franklin
Senior Member
 
Registered: Oct 2002
Distribution: Slackware, WinXP, Windows 7
Posts: 1,253

Rep: Reputation: 55
from a console as root type:
Code:
# arp -na
This should give you the mac address and the ip assigned for all machines on the network.

Not sure if this is what you are looking for.

edit:

Actually, on second thought, I'm not certain that's true.
Perhaps it may be useful anyway. I'll check on that and if someone doen't correct me before that I'll correct myself.


Last edited by Franklin; 08-14-2005 at 05:34 PM.
 
Old 08-14-2005, 05:41 PM   #3
Franklin
Senior Member
 
Registered: Oct 2002
Distribution: Slackware, WinXP, Windows 7
Posts: 1,253

Rep: Reputation: 55
Yes, I right. It does give the mac address.
 
Old 08-14-2005, 07:30 PM   #4
yvesg
Member
 
Registered: May 2004
Distribution: SuSe v9.3 Professional
Posts: 33

Rep: Reputation: 15
rarp is used to look up ip from mac
 
Old 08-14-2005, 11:08 PM   #5
carl.waldbieser
Member
 
Registered: Jun 2005
Location: Pennsylvania
Distribution: Kubuntu
Posts: 197

Rep: Reputation: 32
Of course, if you are like me and your kernel does not support rarp (because it was discontinued in kernel version 2.3), the poor man's lookup is to write a script that:
1) pings every address in the subnet.
2) does an arp -a
3) Finds the line with the correct MAC address and gets the IP address from that line.

Step 1 is really cheating, I guess, and it is probably not a good idea to flooding a large network with pings. However, for a smallish subnet (say with 253 addresses, x.y.z.1 - x.y.z.254), the liberal use of fping may be acceptable. This forces your computer to look up the MAC of each address it pings, and hopefully, it will store them for a few seconds while steps 2 & 3 extract the IP address.
 
1 members found this post helpful.
Old 08-15-2005, 01:08 AM   #6
primo
Member
 
Registered: Jun 2005
Posts: 542

Rep: Reputation: 34
It's easier to ping the subnet's broadcast address with "ping -b" then ^C and then look at "arp -a"
 
Old 08-15-2005, 01:32 AM   #7
Matir
Moderator
 
Registered: Nov 2004
Location: San Jose, CA
Distribution: Ubuntu
Posts: 8,507

Rep: Reputation: 118Reputation: 118
Rather than ^C it, just do 'ping -b -c1 192.168.1.0', but replace the IP with that of your network
 
Old 08-15-2005, 08:33 AM   #8
Andreas Huppert
LQ Newbie
 
Registered: Nov 2004
Location: Freising, Germany
Distribution: Fedora 3
Posts: 6

Rep: Reputation: 0
set up a tcpdump with "ether host aa:bb:cc:dd:ee:ff" option
Huppert
 
Old 08-15-2005, 08:48 AM   #9
FliesLikeABrick
Member
 
Registered: Aug 2005
Location: NY,USA
Distribution: Debian, Gentoo, Ubuntu
Posts: 103

Rep: Reputation: 15
i believe that arp -na will only give you the IP and mac of computers that are connected to "this" computer. I ran it on one of my boxes and it only showed 3: the router, and two computers which are connected with mounted shares. There are about 8 other computers on my network which didn't show up (and are all not connected)
 
Old 08-15-2005, 09:45 AM   #10
okmyx
Member
 
Registered: May 2004
Location: Cornwall, UK
Distribution: Ubuntu 8.04
Posts: 464

Rep: Reputation: 31
Hook the unit up to a PC with a cross over ethernet cable. Then run Ethereal and see if you can collect any packets. Ethereal should display the IP address along with any other info.
 
Old 08-15-2005, 09:52 AM   #11
dysenteryduke
LQ Newbie
 
Registered: Jan 2005
Posts: 8

Original Poster
Rep: Reputation: 0
collecting packets with ethereal

thanks for all the replies. I think connecting to iit with a crossover cable and collecting packets with ethereal is my only option because I think the device has a static IP and I have no idea what it might be. So if I set up my linux machine with an ip of 192.168.0.2 and connect to the terminal device with a crossover, will I still be able to pick up packets if the other device is on another subnet?(im at work, or i would just try it)

thanks,

Jeff
 
Old 08-15-2005, 10:01 AM   #12
imitheos
Member
 
Registered: May 2005
Location: Greece
Posts: 374

Rep: Reputation: 55
Maybe i am wrong, but how about "arping" ?

In my box it works ok:

root@box:~# arping -i eth1 00:E0:29:XX:YY:ZZ
ARPING 00:E0:29:XX:YY:ZZ
60 bytes from 192.168.0.AAA (00:e0:29:XX:YY:ZZ): icmp_seq=0 time=47.922 usec
60 bytes from 192.168.0.AAA (00:e0:29:XX:YY:ZZ): icmp_seq=1 time=44.823 usec
60 bytes from 192.168.0.AAA (00:e0:29:XX:YY:ZZ): icmp_seq=2 time=84.877 usec
 
Old 09-12-2005, 08:07 AM   #13
gustavst
LQ Newbie
 
Registered: Sep 2005
Distribution: Slackware
Posts: 2

Rep: Reputation: 0
What version of arping are you running? The version that comes with the current iputils package can only ping IP addresses.
/GSt
 
Old 09-12-2005, 10:21 AM   #14
gustavst
LQ Newbie
 
Registered: Sep 2005
Distribution: Slackware
Posts: 2

Rep: Reputation: 0
Problem found: There are two versions of arping. One by Alexey Kuznetsov that pings IP addresses and one by Thomas Habets that pings MAC addresses.
Why on earth give them the same name?
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to find an IP address from the MAC address of a remote machine ? jitz Linux - General 3 01-03-2006 07:55 AM
How to find MAC address of a specified IP address ? longtongfish Programming 1 07-12-2005 03:26 PM
how to get ip address, broadcast address, mac address of a machine sumeshstar Programming 2 03-12-2005 04:33 AM
how can i find mac address compzoo Linux - Networking 3 02-03-2005 02:02 PM
How to know MAC address ( Machine address)?? vanhelsing Linux - Networking 3 08-12-2004 09:30 AM


All times are GMT -5. The time now is 07:23 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration