craigmayhew
Posts: 3
Joined: Sun Feb 03, 2013 10:37 am

This kernal does not support RARP.

Sun Feb 03, 2013 10:43 am

I was trying to find a command on the raspberryPi that would give me an IP from a MAC address. Unfortunately when running "rarp -a" via ssh I see this message "This kernel does not support RARP.".

Does anyone know how I can get the kernal to support RARP? Does this mean recompiling the kernal or will I need to code the functionality myself?

Failing that, is there another command that will do what I need on the PI?

User avatar
gordon@drogon.net
Posts: 2024
Joined: Tue Feb 07, 2012 2:14 pm
Location: Devon, UK

Re: This kernal does not support RARP.

Sun Feb 03, 2013 10:54 am

craigmayhew wrote:I was trying to find a command on the raspberryPi that would give me an IP from a MAC address. Unfortunately when running "rarp -a" via ssh I see this message "This kernel does not support RARP.".

Does anyone know how I can get the kernal to support RARP? Does this mean recompiling the kernal or will I need to code the functionality myself?

Failing that, is there another command that will do what I need on the PI?
Linux (and therefor the Pi) hasn't supported RARP for a number of years now. Possibly over a decade ago. It's an obsolete protocol and really should not be used.

It's been replaced by DHCP - so to get an IP address on your Pi, you need to run a DHCP server on your LAN somewhere.

If you don't have a DHCP server, then you need to set a static IP address on the Pi - just google for something like: debian set static ip address

-Gordon
--
Gordons projects: https://projects.drogon.net/

craigmayhew
Posts: 3
Joined: Sun Feb 03, 2013 10:37 am

Re: This kernal does not support RARP.

Sun Feb 03, 2013 11:00 am

The Pi already has an IP address. My need was to see if another device (not the PI) is on the LAN. That other device will be using DHCP and not a static IP, so in order to get the IP address of the second device, I was hoping to look up the IP from the MAC address.

As a work around - I have found this command which will scan the network and therefore populate the arp cache:

sudo fping -s -g 192.168.0.1 192.168.0.254 -r 1

I could improve that further by only scanning the DHCP range.

User avatar
gordon@drogon.net
Posts: 2024
Joined: Tue Feb 07, 2012 2:14 pm
Location: Devon, UK

Re: This kernal does not support RARP.

Sun Feb 03, 2013 11:56 am

craigmayhew wrote:The Pi already has an IP address. My need was to see if another device (not the PI) is on the LAN. That other device will be using DHCP and not a static IP, so in order to get the IP address of the second device, I was hoping to look up the IP from the MAC address.

As a work around - I have found this command which will scan the network and therefore populate the arp cache:

sudo fping -s -g 192.168.0.1 192.168.0.254 -r 1

I could improve that further by only scanning the DHCP range.
Yes, that's probably the easiest way - although if you look further, then it seems like the arping command might help you, but it doesn't as you really need to know the IP address first.... However once fping has done its thing, then you can check the local ARP table (arp -n | fgrep MAC) or then arping the IP addresses returned to work out their MAC addresses, then check that against what you're looking for.

-Gordon
--
Gordons projects: https://projects.drogon.net/

efflandt
Posts: 359
Joined: Mon Dec 03, 2012 2:47 am
Location: Elgin, IL USA

Re: This kernal does not support RARP.

Mon Feb 04, 2013 8:08 pm

Install nmap and read its man pages (man nmap). Depending upon what options you use, besides a simple ping scan of an IP list or range, options can be set to scan likely ports to find computers that even have ping disabled and possibly determine their OS.

User avatar
gordon@drogon.net
Posts: 2024
Joined: Tue Feb 07, 2012 2:14 pm
Location: Devon, UK

Re: This kernal does not support RARP.

Mon Feb 04, 2013 8:24 pm

efflandt wrote:Install nmap and read its man pages (man nmap). Depending upon what options you use, besides a simple ping scan of an IP list or range, options can be set to scan likely ports to find computers that even have ping disabled and possibly determine their OS.
Nut, meet Mr. sledgehammer.

-Gordon
--
Gordons projects: https://projects.drogon.net/

Return to “General programming discussion”