1. Introduction
When a system boots with a local disk, the IP address is typically read from the configuration file on disk. However, diskless machines, such as x terminals or diskless workstations, require additional methods to obtain an IP address.
Each system on the network has a unique hardware address, which is configured by the network interface manufacturer. The RARP implementation of diskless systems is to read a unique hardware address from the interface card and then send a copy of the RARP request (a frame of data that is broadcast on the network), requesting a host to respond to the IP address of the diskless system (in the Rarp answer).
2. Rarp Grouping format
The format of the RARP grouping is basically consistent with the ARP grouping. The main difference between them is that the frame type code for the RARP request or answer is 0x8035, and the operation code for the RARP request is 3, and the answer operation code is 4.
Note: Rarp requests are transmitted in a broadcast manner, and the response is generally unicast (unicast).
3, the design of Rarp server
Rarp is conceptually simple, but the design of a RARP server is related to the system and is more complex. Instead, providing an ARP server is simple, usually a part of TCP/IP implementation in the kernel. Since the kernel knows the IP address and the hardware address, when it receives an ARP request asking for an IP address, it can simply provide the answer with the corresponding hardware address.
(1) RARP Server as User process
The complexity of the RARP server is:
1) The server typically provides a mapping of the hardware address to the IP address for multiple hosts (all diskless systems on the network) that are contained in a disk file. Because the kernel does not normally read and parse disk files, the functionality of the RARP server is provided by the user process, not as part of the kernel's TCP/IP implementation.
2) The RARP request is transmitted as a special type of Ethernet data frame (the Frame Type field value is 0x8035), indicating that the RARP server must be able to send and receive this type of Ethernet data frame.
(2) multiple RARP servers per network
A complication of the RARP server implementation is that RARP requests are broadcast on the hardware layer, which means that they are not forwarded by the router. In order for the diskless system to boot in the state of the RARP server shutdown, it is usually possible to provide multiple RARP servers on a single network (such as a cable).
As the number of servers increases (to provide redundant backups), network traffic increases as each server sends a RARP response to each RARP request. Diskless systems that send RARP requests generally take the first received RARP response. (for ARP, only one host sends an ARP reply). Each RARP server responds simultaneously, which increases the probability that the Ethernet will collide.
"TCP/IP Detailed Volume 1: Protocol" chapter 5th RARP: Reverse Address Resolution Protocol-reading notes (reprint)