Previous | Next (bootparams) | Next (tftpd) | Table of Contents

Setting up the rarpd server, Diskless NetBSD HOW-TO

The next stage of the diskless booting process is for the bootloader to determine the client's IP address. Here, it uses rarp, Reverse ARP (Address Resolution Protocol). The rarpd server will map the client's ethernet hardware address to an IP address and send this information back to the client.

Since rarp is not TCP/IP, it cannot be passed through a router (thus the stipulation that your client and the server(s) must be on the same subnet). It also means that your server must have device drivers that are able to send unspecified data to the ethernet.

Setting up rarp, NetBSD
Setting up rarp, OpenBSD
Setting up rarp, FreeBSD
Setting up rarp, Mac OS X and Darwin
Setting up rarp, Linux
Setting up rarp, SunOS
Setting up rarp, Solaris
Setting up rarp, NEWS-OS
Setting up rarp, NEXTSTEP (couldn't get it to work)
HP-UX 9 and earlier don't have rarpd
Setting up rarp, HP-UX 10 and later


NetBSD and OpenBSD

If you have built your own kernel, make sure you have the following in your config file:
pseudo-device   bpfilter
The GENERIC kernel distributed with NetBSD has this compiled in.

  1. Create an /etc/ethers file, listing your client:
    #/etc/ethers
    CC:CC:CC:CC:CC:CC     client

  2. Add your client to the /etc/hosts file:
    192.168.1.10 client

  3. # ps -aux | grep rarp
    If it's not already running, then run:
    # /usr/sbin/rarpd -a -d

This will start rarpd in debugging mode. When the rarpd server gets a request, it will print this:

got a packet

If RARP fails, the client will print:

No response for RARP request
le(0,0,0,0): Unknown error: code 60
boot: Unknown error: code 60
If RARP succeeds, the client will print:
boot: client IP address: 192.168.1.10

Continue on to setting up bootparams or tftpd


FreeBSD

  1. Create an /etc/ethers file, listing your client:
    #/etc/ethers
    CC:CC:CC:CC:CC:CC     client

  2. Add your client to the /etc/hosts file:
    192.168.1.10 client

  3. # ps -aux | grep rarp
    If it's not already running, then run:
    # /usr/sbin/rarpd -a -s -v -f

This will start rarpd in the foreground (i.e. you can ^C out of it). There is no debugging command line option. If you are having problems with RARP, then you may need to add the following to /etc/syslog.conf:

!rarpd
*.*                                             /var/log/bootlog
You will then need to kill -HUP the process for syslog. It will print the following message in /var/log/bootlog:
Jul 25 23:10:42 rarpserver rarpd[562]: fxp0 CC:CC:CC:CC:CC:CC at 192.168.1.10 REPLIED

If RARP fails, the client will print:

No response for RARP request
le(0,0,0,0): Unknown error: code 60
boot: Unknown error: code 60
If RARP succeeds, the client will print:
boot: client IP address: 192.168.1.10

Continue on to setting up bootparams or tftpd


Mac OS X and Darwin

Mac OS X and Darwin have a rarpd, and it is very similar to NetBSD and OpenBSD. Unfortunately, it doesn't assume the proper directory for the TFTP server, so you need to do the silliness with /private/tftpboot

  1. # mkdir -p /private/tftpboot
    # ln -s /private/tftpboot /tftpboot

  2. Create an /etc/ethers file, listing your client:
    #/etc/ethers
    CC:CC:CC:CC:CC:CC     client

  3. Add your client to the NetInfo database:
    # nicl . -create /machines/client ip_address 192.168.0.10

  4. # ps -aux | grep rarp
    If it's not already running, then run:
    # /usr/sbin/rarpd -a -d

This will start rarpd in debugging mode. When the rarpd server gets a request, it will print this:

got a packet
If RARP fails, the client will print:
No response for RARP request
le(0,0,0,0): Unknown error: code 60
boot: Unknown error: code 60
If RARP succeeds, the client will print:
boot: client IP address: 192.168.1.10

Continue on to setting up bootparams or tftpd


Linux

There are two different ways to run rarp on Linux. You can use the userland rarpd, or build it into your (<2.3) kernel.

Linux userland rarpd (should work with all kernels)

There are at least two known implementations of userland rarp. There is an older one (by D.Brashear & J.Hutzelman) at ftp://ftp.dementia.org/pub/net-tools (source only), and a newer one (by A. Kuznetsov & J.Jelinek) that comes in all (?) recent distributions.

  1. Get the package as an RPM from ftp://rawhide.redhat.com or the Debian woody with apt-get rarpd.
    Sources can be found at least on a local debian mirror under /pool/main/r/rarpd/.

  2. Create an /etc/ethers file, listing your client:
    #/etc/ethers
    CC:CC:CC:CC:CC:CC     client

  3. Add your client to the /etc/hosts file:
    192.168.1.10 client

  4. # /path/to/rarpd -A
    See rarp(8) for more details.

If RARP fails, the client will print:

No response for RARP request
le(0,0,0,0): Unknown error: code 60
boot: Unknown error: code 60
If RARP succeeds, the client will print:
boot: client IP address: 192.168.1.10

Continue on to setting up bootparams or tftpd

Linux kernel rarp ( kernel<2.3 )

If you don't want to (or can't) use the userland rarpd, you will need to compile rarp support in the kernel or (if your kernel supports it) add it as a loadable module.

  1. Compile a kernel with RARP support. Run one of the following:
    # make config
    # make menuconfig
    # make xconfig

  2. Alternatively, add the RARP kernel module:
    # modprobe rarp
    Note, this does not require rebooting, but you will need to run this command after each reboot to keep RARP enabled.

  3. Add your client to the /etc/hosts file:
    192.168.1.10 client

  4. # /sbin/arp -s client CC:CC:CC:CC:CC:CC

  5. # /sbin/arp -a
    This will print the arp cache. Check to make sure your client is there:
    Address                HWtype  HWaddress           Flags Mask      Iface
    client.test.net        ether   CC:CC:CC:CC:CC:CC   CM    *         eth0

  6. # /sbin/rarp -s client CC:CC:CC:CC:CC:CC
    If RARP is not compiled into your kernel, you will get one of the two following error messages:
    SIOCSRARP: Invalid argument
    This kernel does not support RARP.

  7. # /sbin/rarp -a
    This will print the rarp cache. Check to make sure your client is there:
    IP address       HW type             HW address
    192.168.1.10     10Mbps Ethernet     CC:CC:CC:CC:CC:CC

If RARP fails, the client will print:

No response for RARP request
le(0,0,0,0): Unknown error: code 60
boot: Unknown error: code 60
If RARP succeeds, the client will print:
boot: client IP address: 192.168.1.10

Continue on to setting up bootparams or tftpd


SunOS

If you have already configured your SunOS machine as an NFS server and if /tftpboot exists, then the RARP daemon may already be running.

  1. Create an /etc/ethers file, if one doesn't already exist. You should have created this during the rbootd or tftp installation. The /etc/ethers file should list your client:
    #/etc/ethers
    CC:CC:CC:CC:CC:CC     client

  2. # ps aux | grep rarpd
    If both rarp processes are not running, you'll need to:
    # /usr/etc/rarpd -a -d

If RARP fails, the client will print:

No response for RARP request
le(0,0,0,0): Unknown error: code 60
boot: Unknown error: code 60
If RARP succeeds, the client will print:
boot: client IP address: 192.168.1.10

Continue on to setting up bootparams or tftpd


Solaris

If you have already configured your Solaris machine as an NFS server and if /tftpboot exists, then the RARP daemons may already be running.

  1. Create an /etc/ethers file, if one doesn't already exist. You should have created this during the rbootd or tftp installation. The /etc/ethers file should list your client:
    #/etc/ethers
    CC:CC:CC:CC:CC:CC     client

  2. # /usr/bin/ps -ef | grep rarpd
    If it's not already running, then you need to:
    # /usr/sbin/in.rarpd -d -a

This will start rarpd in debugging mode. For Solaris, it prints out a bunch of stuff. Here is an example of the Solaris rarpd handling requests from the client.

If RARP fails, the client will print:

No response for RARP request
le(0,0,0,0): Unknown error: code 60
boot: Unknown error: code 60
If RARP succeeds, the client will print:
boot: client IP address: 192.168.1.10

Continue on to setting up bootparams or tftpd


NEWS-OS

  1. Create an /etc/ethers file, if one doesn't already exist. You should have created this during the rbootd or tftp installation. The /etc/ethers file should list your client:
    #/etc/ethers
    CC:CC:CC:CC:CC:CC     client

  2. # /etc/rarpd

If RARP fails, the client will print:

No response for RARP request
le(0,0,0,0): Unknown error: code 60
boot: Unknown error: code 60
If RARP succeeds, the client will print:
boot: client IP address: 192.168.1.10

Continue on to setting up bootparams or tftpd


NEXTSTEP

NEXTSTEP has rarp functionality, since it is capable of netbooting sparc hardware. We tried briefly and couldn't get it to work. Please send us feedback and let us know how to set this up properly. What follows is our best guess.

  1. Create an /etc/ethers file, if one doesn't already exist. The /etc/ethers file should list your client:
    #/etc/ethers
    CC:CC:CC:CC:CC:CC     client

  2. # /usr/etc/arpLoader

If RARP fails, the client will print:

No response for RARP request
le(0,0,0,0): Unknown error: code 60
boot: Unknown error: code 60
If RARP succeeds, the client will print:
boot: client IP address: 192.168.1.10

Back to the top


HP-UX 9 and earlier

Sorry, HP-UX 9 does not have rarp services. It might be possible to find source code and compile the daemon, but I couldn't find it.

If you find this, please let us know.

Back to the top


HP-UX 10

  1. Create /etc/rarpd.conf, with your client addresses (ethernet and IP):
    CC:CC:CC:CC:CC:CC 192.168.1.10

  2. # ps -ef | grep rar
    If it's not already running, then you need to run:
    # /usr/sbin/rarpd -d

This will start rarpd in debugging mode. For HP-UX 10, it prints out a lot of stuff. Here is an example of the HP-UX 10 rarpd handling requests from the client.

Oddly, I couldn't ^C out of this, I had to launch another shell and kill the rarpd process.

If RARP fails, the client will print:

No response for RARP request
le(0,0,0,0): Unknown error: code 60
boot: Unknown error: code 60
If RARP succeeds, the client will print:
boot: client IP address: 192.168.1.10

Continue on to setting up bootparams or tftpd


Previous | Next (bootparams) | Next (tftpd) | Table of Contents
NetBSD Home Page
NetBSD Documentation top level

(Contact us) $NetBSD: rarp.html,v 1.4 2019/04/14 20:34:28 sevan Exp $
Copyright © 1998-2004 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.