# rarpd for permanent ARP table entries?



## Erratus (May 21, 2013)

In a static configured LAN /etc/ethers and  /etc/hosts have been populated accordingly.


```
# arp -f /etc/ethers
```
 sets the entries in the ARP table to permanent as expected, but only until a reboot.

Next having added to /etc/rc.conf:

```
# static ARP table /etc/ethers
rarpd_enable="YES"
```
but intended ethers do not show up as permanent.

As an internet search is surprisingly silent on that, I hope on little help here?


----------



## kpa (May 21, 2013)

As far as I know rarpd(8) (Reverse ARP daemon) can not be used for such purpose. It's a historic leftover from days before DHCP and tftp(1) that servers only one purpose which is to tell a machine that is booting from network its IP address based on the MAC address.

If your intent is to use static ARP look into what ifconfig(8) can do for you.


----------



## Erratus (May 21, 2013)

/etc/rc.d/rarpd does that look too outdated?

```
#!/bin/sh
#
# $FreeBSD: src/etc/rc.d/rarpd,v 1.7.4.2.2.2 2012/11/17 08:47:01 svnexp Exp $
#

# PROVIDE: rarpd
# REQUIRE: DAEMON cleanvar
# BEFORE:  LOGIN
# KEYWORD: nojail

. /etc/rc.subr

name="rarpd"
rcvar="rarpd_enable"
command="/usr/sbin/${name}"
pidfile="/var/run/${name}.pid"
required_files="/etc/ethers"

load_rc_config $name
run_rc_command "$1"
```

*M*aybe some options have to be chosen to make it work?

****

Found /etc/rc.d/static_arp which looks pretty hot to my problem too. But

```
# man -a static_arp
No manual entry for static_arp
```

Who knows how to use this one?


----------



## kpa (May 21, 2013)

It's documented in rc.conf(5)


```
static_arp_pairs
                 (str) Set to the list of static ARP pairs that are to be
                 added at system boot time.  For each whitespace separated
                 element in the value, a static_arp_âŸ¨elementâŸ© variable is
                 assumed to exist whose contents will later be passed to a
                 â€œarp -Sâ€ operation.  For example

                 static_arp_pairs="gw"
                 static_arp_gw="192.168.1.1 00:01:02:03:04:05"
```

BTW, there's a double meaning to "static arp". First is your case here, nothing out of the ordinary. The second one is when you want to restrict traffic on a network to only known MAC addresses, effectively turning off ARP resolution. This type of static ARP would be configured with ifconfig(8).


----------

