- Address Resolution Protocol (ARP)
- Reverse Address Resolution Protocol (RARP)
- Exam Prep Questions
- Need to Know More?
Reverse Address Resolution Protocol (RARP)
RARP provides the opposite service to ARP in that it is used when only the ethernet address is known and the IP address is needed.
RARP requests are most commonly sent by diskless clients and JumpStart clients during bootup. A diskless client contains no local storage and knows only its own ethernet address. A JumpStart client contains local storage, but uses the ethernet address to locate the JumpStart boot server (to start a remote installation of the Solaris operating environment). The client uses the RARP protocol to broadcast this ethernet address and asks for the corresponding IP address.
The following fragment of output from the snoop command shows a client that is booting. The client issues a RARP request to attempt and find its IP address. The server that is listening for RARP requests responds. The items of interest are in bold:
... ETHER: ----- Ether Header ----- ETHER: ETHER: Packet 5 arrived at 14:35:1.14 ETHER: Packet size = 64 bytes ETHER: Destination = ff:ff:ff:ff:ff:ff, (broadcast) ETHER: Source = 8:0:20:8e:48:de, Sun ETHER: Ethertype = 8035 (RARP) ETHER: ARP: ----- ARP/RARP Frame ----- ARP: ARP: Hardware type = 1 ARP: Protocol type = 0800 (IP) ARP: Length of hardware address = 6 bytes ARP: Length of protocol address = 4 bytes ARP: Opcode 3 (REVARP Request) ARP: Sender's hardware address = 8:0:20:8e:48:de ARP: Sender's protocol address = 255.255.255.255, BROADCAST ARP: Target hardware address = 8:0:20:8e:48:de ARP: Target protocol address = ? ARP: ETHER: ----- Ether Header ----- ETHER: ETHER: Packet 6 arrived at 14:35:1.18 ETHER: Packet size = 42 bytes ETHER: Destination = 8:0:20:8e:48:de, Sun ETHER: Source = 8:0:20:b3:41:1b, Sun ETHER: Ethertype = 8035 (RARP) ETHER: ARP: ----- ARP/RARP Frame ----- ARP: ARP: Hardware type = 1 ARP: Protocol type = 0800 (IP) ARP: Length of hardware address = 6 bytes ARP: Length of protocol address = 4 bytes ARP: Opcode 4 (REVARP Reply) ARP: Sender's hardware address = 8:0:20:b3:41:1b ARP: Sender's protocol address = 192.168.0.28, ultra10 ARP: Target hardware address = 8:0:20:8e:48:de ARP: Target protocol address = 192.168.0.21, systema ARP: ...
Notice that in the first packet, the type is REVARP request and the ethernet destination address is ff:ff:ff:ff:ff:ff, which is the ethernet broadcast address. Also, the ARP: Target protocol address is set to ? because the IP address is unknown at this point.
Also in the first packet, the receiving boot server knows which ethernet address to respond to because the sender's hardware address is the same as the Target hardware address8:0:20:8e:48:de.
The second packet shows the type is REVARP reply and the ARP: Target protocol address is now set to the IP address of the client (192.168.0.21). This is the server responding to the client with its IP address.
The in.rarpd daemon
The daemon that listens on a server for incoming RARP requests is in.rarpd. The daemon is started at boot time by the script /etc/rc3.d/S16boot.server. The script starts the daemon only if the directory /tftpboot exists.
CAUTION
The in.rarpd daemon is started by the /etc/rc3.d/S16boot.server script. Prior to Solaris 9, in.rarpd was started by a different script, namely, /etc/rc3.d/S15nfs.server. Make sure you are not tricked by this if it appears in a question on the exam.
When an incoming RARP request is received from a client, the server process refers to two files to satisfy the request. The first is /etc/ethers, which contains the ethernet address and the corresponding hostname. The second file is /etc/inet/hosts, which contains the hostname and the corresponding IP address. Because it references both of these files, in.rarpd is capable of resolving the IP address from the ethernet address provided by the client. It is the IP address that is returned to the client.
CAUTION
The file /etc/hosts is a symbolic link to /etc/inet/hosts. The link has been retained for compatibility with Berkeley Software Distribution (BSD) versions of Unix. You should be aware that this link exists.
If you encounter problems with a client that is failing to locate its IP address, you can use the snoop command to monitor RARP packets and you can also run in.rarpd with the -d option to obtain additional debug messages. The following output from running in.rarpd -d, shows the messages that are displayed when the server does not know the ethernet address:
/usr/sbin/in.rarpd:[1] device hme0 ethernetaddress 8:0:20:b3:41:53 in.rarpd:[1] device hme0 address 192.168.0.28 in.rarpd:[1] device hme0 subnet mask 255.255.255.0 in.rarpd:[3] starting rarp service on device hme0 address 8:0:20:b3:41:1b in.rarpd:[3] RARP_REQUEST for 8:0:20:8e:48:de in.rarpd:[3] could not map hardware address to IP address in.rarpd:[3] RARP_REQUEST for 8:0:20:8e:48:de in.rarpd:[3] could not map hardware address to IP address in.rarpd:[3] RARP_REQUEST for 8:0:20:8e:48:de in.rarpd:[3] could not map hardware address to IP address
This code shows what happens on the server. The client, however, receives a different messagethe following is displayed repeatedly because it is not receiving a response from the server:
Timeout waiting for ARP/RARP packet
The error is normally due to one of the following:
The ethernet address for the client has been entered incorrectly in /etc/ethers.
The ethernet address entry for the client does not exist in /etc/ethers.
The IP address or hostname entry for the client has been entered incorrectly in /etc/inet/hosts.
The IP address or hostname entry for the client does not exist in /etc/inet/hosts.
The in.rarpd daemon is not running on the server.
You can also gain useful information from the debug option of in.rarpd because it can be used to eliminate some of the potential causes of problems. The following output shows the messages that are displayed when a JumpStart client successfully obtains its IP address:
ultra10# in.rarpd -d in.rarpd:[1] device hme0 ethernetaddress 8:0:20:b3:41:1b in.rarpd:[1] device hme0 address 192.168.0.28 in.rarpd:[1] device hme0 subnet mask 255.255.255.0 in.rarpd:[3] starting rarp service on device hme0 address 8:0:20:b3:41:1b in.rarpd:[3] RARP_REQUEST for 8:0:20:8e:48:de in.rarpd:[3] trying physical netnum 192.168.0.0 mask ffffff00 in.rarpd:[3] good lookup, maps to 192.168.0.21 in.rarpd:[3] immediate reply sent in.rarpd:[3] RARP_REQUEST for 8:0:20:8e:48:de in.rarpd:[3] trying physical netnum 192.168.0.0 mask ffffff00 in.rarpd:[3] good lookup, maps to 192.168.0.21 in.rarpd:[3] immediate reply sent
The previous code shows that a RARP request has been received (RARP REQUEST for 8:0:20:8e:48:de) and executes a successful search for the ethernet address (good lookup, maps to 192.168.0.21). It then returns the requested information (the IP address) to the client (immediate reply sent).