Table Of Contents

Reverse Address Resolution Protocol (RARP) - Q&A

Questions

  1. What is RARP?
  2. To which OSI layer does RARP belong?
  3. Which RFC specifies the requirements for RARP?
  4. Why is RARP needed?
  5. What is a RARP server?
  6. Where is the mapping between the MAC address and IP addresses stored in a RARP server?
  7. Can RARP be used in a network other than Ethernet?
  8. How does RARP resolve an Ethernet MAC address to an IP address?
  9. When is a RARP request packet generated?
  10. What happens when a RARP server receives a RARP request packet?
  11. What happens when a host receives a RARP reply packet?
  12. What is the length of a RARP request and reply packet?
  13. What is the RARP packet format?
  14. Does RARP use the same packet format as ARP?
  15. How is a RARP packet differentiated from an ARP packet?
  16. Is the format of a RARP request packet the same as that of a RARP reply packet?
  17. How is a RARP request differentiated from a RARP reply packet?
  18. What are the values for the source and destination IP address fields in a RARP request packet?
  19. What are the values for the source and destination IP address values in a RARP reply packet?
  20. Do all the hosts in a network process a RARP packet?
  21. What will happen if more than one RARP server in a network responds to a RARP request?
  22. What will happen if a RARP reply is not received for a RARP request?
  23. Are there any alternative protocols to RARP?

Answers

  1. What is RARP?
    Reverse Address Resolution Protocol (RARP) is a network protocol used to resolve a data link layer address to the corresponding network layer address. For example, RARP is used to resolve a Ethernet MAC address to an IP address.

  2. To which OSI layer does RARP belong?
    RARP belongs to the OSI data link layer (layer 2).

  3. Which RFC specifies the requirements for RARP?
    RFC 903 specifies the RARP packet format and other details.

  4. Why is RARP needed?
    Normally, the IP address of a system is stored in a configuration file in the local disk. When the system is started, it determines its IP address from this file. In the case of a diskless workstation, its IP address cannot be stored in the system itself. In this case, RARP can be used to get the IP address from a RARP server.

  5. What is a RARP server?
    All the mappings between the hardware MAC addresses and the IP addresses of the hosts are stored in a configuration file in a host in the network. This host is called the RARP server. This host responds to all the RARP requests.

  6. Where is the mapping between the MAC address and IP addresses stored in a RARP server?
    The mapping between MAC addresses and IP addresses is usually stored in a configuration file in the local hard disk in the RARP server.

  7. Can RARP be used in a network other than Ethernet?
    Yes. RARP is a general protocol, which can be used to map any type of hardware MAC address to any type of network layer protocol address.

  8. How does RARP resolve an Ethernet MAC address to an IP address?
    When a diskless system is booted up, it broadcasts a RARP request packet with its MAC address. This packet is received by all the hosts in the network. When the RARP server receives this packet, it looks up this MAC address in the configuration file and determines the corresponding IP address. It then sends this IP address in the RARP reply packet. The diskless system receives this packet and gets its IP address.

  9. When is a RARP request packet generated?
    A RARP request packet is usually generated during the booting sequence of a host. A host must determines its IP address during the booting sequence. The IP address is needed to communicate with other hosts in the network.

  10. What happens when a RARP server receives a RARP request packet?
    When a RARP server receives a RARP request packet it performs the following steps:
    1. The MAC address in the request packet is looked up in the configuration file and mapped to the corresponding IP address.
    2. If the mapping is not found, the packet is discarded.
    3. If the mapping is found, a RARP reply packet is generated with the MAC and IP address. This packet is sent to the host, which originated the RARP request.

  11. What happens when a host receives a RARP reply packet?
    When a host receives a RARP reply packet, it gets its IP address from the packet and completes the booting process. This IP address is used for communicating with other hosts, till it is rebooted.

  12. What is the length of a RARP request and reply packet?
    The length of a RARP request or a RARP reply packet is 28 bytes.

  13. What is the RARP packet format?
    The various fields of a RARP request/reply packet and their length are shown below:
        +--------+ 
        |Hardware| 2 bytes
        |MAC     |
        |Address |
        |Type    |
        +--------+
        |Protocol| 2 bytes
        |Address |
        |Type    |
        +--------+
        |Hardware| 1 byte
        |MAC     |
        |Address |
        |Size    |
        +--------+
        |Protocol| 1 byte
        |Address |
        |Size    |
        +--------+
        |Op      | 2 bytes
        +--------+ 
        |Sender  | 6 bytes (depends on the above size field)
        |MAC     |
        |Address |
        +--------+
        |Sender  | 4 bytes (depends on the above size field)
        |IP      |
        |Address |
        +--------+
        |Target  | 6 bytes (depends on the above size field)
        |MAC     |
        |Address |
        +--------+
        |Target  | 4 bytes (depends on the above size field)
        |IP      |
        |Address |
        +--------+
    
    The fields are further explained below:
        +---------+-------------------------------------------------------+
        |Ethernet |For a RARP request, source MAC address is the MAC      |
        |Header   |address of the host sending the RARP request,          |
        |         |destination MAC address is the Ethernet broadcast      |
        |         |address (FF:FF:FF:FF:FF:FF), frame type field is 0x8035|
        |         |For RARP reply, source MAC address is the MAC address  |
        |         |of the RARP server replying to the RARP request,       |
        |         |destination MAC address is the MAC address of the host |
        |         |that sent the RARP request, and the frame type field is|
        |         |0x8035.                                                |
        +---------+-------------------------------------------------------+
        |Hardware |Type of the hardware MAC address present in the packet.|
        |Address  |For Ethernet the value of this field is 1.             |
        |Type     |                                                       |
        +---------+-------------------------------------------------------+
        |Protocol |Type of the protocol address requested for the MAC     |
        |Address  |address. For IP address the value of this field is     |
        |Type     |0x800.                                                 |
        +---------+-------------------------------------------------------+
        |Hardware |Size of the hardware MAC address.  For Ethernet, the   |
        |Address  |value of this field is 6.                              |
        |Size     |                                                       |
        +---------+-------------------------------------------------------+
        |Protocol |Size of the protocol address.  For IP, the value of    |
        |Address  |this field is 4.                                       |
        |Size     |                                                       |
        +---------+-------------------------------------------------------+
        |Operation|Type of operation being performed.  The value of this  |
        |         |field can be 3 (RARP request) or 4 (RARP reply).       |
        +---------+-------------------------------------------------------+
        |Source   |In a RARP request packet, this is the hardware MAC     |
        |MAC      |address of the source host.  In a RARP reply packet,   |
        |address  |this is the hardware MAC address of the RARP server    |
        |         |sending the RARP reply.                                |
        +---------+-------------------------------------------------------+
        |Source   |In a RARP request packet, this is undefined.  In a     |
        |IP       |RARP reply packet, this is the IP address of the RARP  |
        |address  |server sending the RARP reply.                         |
        +---------+-------------------------------------------------------+
        |Target   |In a RARP request packet, this is the hardware MAC     |
        |MAC      |address of the source host.  In a RARP reply packet,   |
        |address  |this is the hardware MAC address of the host, that sent|
        |         |the RARP request packet.                               |
        +---------+-------------------------------------------------------+
        |Target   |In a RARP request packet, this is undefined. In a RARP |
        |IP       |reply packet, this is the IP address of the host       |
        |address  |that sent the RARP request packet.                     |
        +---------+-------------------------------------------------------+
    

  14. Does RARP use the same packet format as ARP?
    Yes. RARP uses the same packet format as ARP.

  15. How is a RARP packet differentiated from an ARP packet?
    The frame type in the Ethernet header is used to differentiate a RARP packet from an ARP packet. The value of the opcode field in the RARP header can also be used.

  16. Is the format of a RARP request packet the same as that of a RARP reply packet?
    Yes. The packet format of a RARP request packet is same as that of a RARP reply packet.

  17. How is a RARP request differentiated from a RARP reply packet?
    The 'operation' field in the RARP packet is used to differentiate between a RARP request and a RARP reply packet.

  18. What are the values for the source and destination IP address fields in a RARP request packet?
    In an RARP request packet, the source and destination IP address values are undefined.

  19. What are the values for the source and destination IP address values in a RARP reply packet?
    In a RARP reply packet, the source IP address is the IP address of the RARP server responding to the RARP request and the destination IP address is the IP address of the host that sent the RARP request.

  20. Do all the hosts in a network process a RARP packet?
    Since a RARP request packet is a broadcast packet, it is received by all the hosts in the network. But only a RARP server processes a RARP request packet, all the other hosts discard the packet. The RARP reply packet is not broadcast, it is sent directly to the host, which sent the RARP request.

  21. What will happen if more than one RARP server in a network responds to a RARP request?
    If more than one RARP server respond to a RARP request, then only the first RARP reply received is used. All other replies are discarded.

  22. What will happen if a RARP reply is not received for a RARP request?
    If a RARP reply is not received within a reasonable amount of time, the host, which sent the RARP request, will not be able to complete its booting sequence. Usually the host will again retry sending the RARP request after a timeout period.

  23. Are there any alternative protocols to RARP?
    The BOOTP and DHCP protocols can be used instead of RARP to get the IP address from the MAC address.


Table Of Contents