LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 05-16-2008, 06:33 AM   #1
jf.argentino
Member
 
Registered: Apr 2008
Location: Toulon (France)
Distribution: FEDORA CORE
Posts: 492

Rep: Reputation: 50
Asking for an unknown IP address from a known MAC address


Hello,

I want to know if it's possible to get a remote host IP address given its MAC address, is there an existing tool for that purpose?

I have google'ing, see arping, rarp and their friends, but nothing seems to handle my problem.

Maybe there's an hidden option to ping or arping which display the MAC adrress, then I can broadcast until grep'ing the search one?

I'm lost in the IP protocol jungle, anybody to guide me?
 
Old 05-16-2008, 07:05 AM   #2
lsteacke
Member
 
Registered: Jul 2007
Distribution: Ubuntu
Posts: 99

Rep: Reputation: 16
How does RARP not solve this problem? Isn't that exactly what it was designed to do? Obtain an IP address when only knowing the MAC address??
 
Old 05-16-2008, 07:33 AM   #3
jf.argentino
Member
 
Registered: Apr 2008
Location: Toulon (France)
Distribution: FEDORA CORE
Posts: 492

Original Poster
Rep: Reputation: 50
If I have well understanding, RARP is based on a database which isn't dynamically filled. And my problem is to recover IP address from a user configuration error.

I explain: my remote device is an underwater system which can't be dismount. The user can define the system IP address through an embedded web server.

But if the user make a "keyboard fault" when entering a new IP address, and validate it, the system is lost until we can guess it's new IP address.

That's why i'm searching for a "dynamic" tool. More over, my system will be integrated into an existent network, where it would be very difficult to install a complex system like RARP.
 
Old 05-30-2008, 12:49 AM   #4
lazareth1
LQ Newbie
 
Registered: May 2008
Posts: 14

Rep: Reputation: 0
Quote:
Originally Posted by jf.argentino View Post
If I have well understanding, RARP is based on a database which isn't dynamically filled. And my problem is to recover IP address from a user configuration error.

I explain: my remote device is an underwater system which can't be dismount. The user can define the system IP address through an embedded web server.

But if the user make a "keyboard fault" when entering a new IP address, and validate it, the system is lost until we can guess it's new IP address.

That's why i'm searching for a "dynamic" tool. More over, my system will be integrated into an existent network, where it would be very difficult to install a complex system like RARP.
Well I suggest using a network sniffer program which will pick up every packet on the network and tell you source IP addresses etc. Just install it onto a comptuer and then connected it directly to this underwater device via a cross-over cable if there is no switch/hub in between.

PS. RARP IS dynamic and is usually running by default.
 
Old 05-30-2008, 05:55 PM   #5
baldy3105
Member
 
Registered: Jan 2003
Location: Cambridgeshire, UK
Distribution: Mint (Desktop), Debian (Server)
Posts: 875

Rep: Reputation: 184Reputation: 184
You don't want Reverse ARP. Reverse ARP allows a host to say "this is _MY_ MAC, does anyone know what _MY_ IP should be." The device that is require to response indeed requires a database to do so.

Inverse ARP is the function you want, which allows a host to say "attention MAC address a.b.c.d.e.f, what is your IP address?"

Sadly Inverse ARP is rarely implemented and indeed the only mention I can find regarding kernel support is that it is experimental. i.e it may or may not work, but you will probably need to compile it in yourself, and b.t.w don't rely on it. The only thing I can suggest is that any address change is done via ifconfig and not immediately made permanent. Only once you have re-established contact via the NEW address, should a change be made to the permanent network config.

This way if the worst happens then at least you can get them to power cycle the unit. The power must be remotely accesible right?

On Cisco routers we set the box to reload after 10 or 20 minutes when doing things that might lock us out. If all is OK then we can cancel the reload. If we get locked out, no worries, it'll all come back in 10 or 20 minutes.

You should be able to do the same with the shutdown command on the remote devices.

Cheers

Pete
 
Old 06-01-2008, 06:38 AM   #6
jf.argentino
Member
 
Registered: Apr 2008
Location: Toulon (France)
Distribution: FEDORA CORE
Posts: 492

Original Poster
Rep: Reputation: 50
Thanks for your replies.
Quote:
Inverse ARP is the function you want, which allows a host to say "attention MAC address a.b.c.d.e.f, what is your IP address?"
OK, I'll will look in this way...

Quote:
The only thing I can suggest is that any address change is done via ifconfig and not immediately made permanent.
This is the solution I have choose. If we can't reach the system just power down it and it come back to its previous configuration, configuration changes are made permanently by properly reboot the system...

Regards
 
Old 06-01-2008, 07:23 AM   #7
jf.argentino
Member
 
Registered: Apr 2008
Location: Toulon (France)
Distribution: FEDORA CORE
Posts: 492

Original Poster
Rep: Reputation: 50
I found this utility: "linkloop", but:
-it doesn't display the IP address when a system reply. I think I can easily change the program for this purpose.
-the daemon nor the utility seems to work on a bonded network interface... And my embedded system has a bonding interface.

So one more expert advice: "socket(AF_INET, SOCK_PACKET, htons(ETH_P_802_2))" display an "Address family not supported by protocol" when done on a bonding interface. Is there any workaround?
 
  


Reply

Tags
ip, mac


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
Single DHCP server ,to provide the ip address to a MAC address in two different subne alix123 Linux - Software 5 05-08-2007 11:16 PM
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 IP address of a machine if I know their MAC Address dysenteryduke Linux - Networking 13 09-12-2005 10:21 AM
how to get ip address, broadcast address, mac address of a machine sumeshstar Programming 2 03-12-2005 04:33 AM
DHCP Server MAC Address found, IP address not assigned wmburke Linux - Wireless Networking 17 11-17-2004 10:33 AM


All times are GMT -5. The time now is 11:30 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