Network Layer · Computer Networks

Address Mapping — ARP, RARP, BOOTP and DHCP

Watch lectures

Address Mapping Protocols: ARP, RARP, BOOTP, and DHCP


1. The Need for Address Mapping

In internetworking, two levels of addresses operate concurrently:

  1. Logical (IP) Addresses: 32-bit (IPv4) or 128-bit (IPv6) global identifiers used for end-to-end packet routing across networks.
  2. Physical (MAC) Addresses: 48-bit local identifiers burned into Network Interface Cards (NICs), used by Data Link layer switches and hardware to deliver frames across the physical medium.

Because a packet cannot travel across a physical wire using an IP address alone, Address Mapping Protocols are required to bridge the gap:

                            ADDRESS MAPPING
                                   |
         +-------------------------+-------------------------+
         |                                                   |
  STATIC MAPPING                                      DYNAMIC MAPPING
 (Manual configuration table)                        (Protocol-driven resolution)
                                                             |
                                      +----------------------+----------------------+
                                      |                                             |
                               FORWARD RESOLUTION                            REVERSE RESOLUTION
                             (Known IP -> Find MAC)                        (Known MAC -> Find IP)
                                      |                                             |
                                     ARP                                   +--------+--------+
                                                                           |        |        |
                                                                         RARP     BOOTP    DHCP

2. Address Resolution Protocol (ARP)

ARP (RFC 826) maps a known Logical IP Address to an unknown Physical MAC Address on the local network segment.

 Sender (192.168.1.10)                                     Target (192.168.1.50)
         |                                                           |
         |=== 1. ARP REQUEST (Broadcast: FF:FF:FF:FF:FF:FF) =========>|
         |    "Who has IP 192.168.1.50? Tell 192.168.1.10"           |
         |                                                           |
         |<== 2. ARP REPLY (Unicast directly to Sender MAC) =========|
         |    "192.168.1.50 is at MAC BB:BB:BB:BB:BB:BB"             |
  • ARP Cache: Each host caches recently resolved mappings for 15−20 minutes15 - 20\text{ minutes} to avoid repeated broadcasts.
  • Proxy ARP: A router replies with its own MAC address on behalf of a remote subnet host.
  • Gratuitous ARP: An unsolicited broadcast of a host's own IP-to-MAC mapping, used for duplicate IP address detection and updating neighbor switch caches.

3. Reverse Address Resolution Protocol (RARP)

RARP (RFC 903) was designed for diskless workstations that have a MAC address in ROM but no local disk to store an IP address:

  • Operation: The host broadcasts an RARP request containing its MAC address. A dedicated RARP server on the local wire looks up its configuration table and returns the assigned IP address via unicast.
  • Why RARP Became Obsolete:
    1. Operates directly at the Data Link Layer (broadcasts cannot cross routers; required an RARP server on every physical subnet).
    2. Provided only the IP address, failing to provide the Subnet Mask, Default Gateway, or DNS server.

4. Bootstrap Protocol (BOOTP)

BOOTP (RFC 951) replaced RARP by operating as an Application-Layer client-server protocol over UDP/IP:

  • UDP Port 67 (Server) and UDP Port 68 (Client).
  • BOOTP Relay Agent: Allows a single centralized server to service multiple remote subnets across routers.
  • In a single packet exchange, BOOTP delivers:
    • Client IP Address.
    • Subnet Mask.
    • Default Gateway Router IP.
    • TFTP Server IP & Bootfile Name (enabling diskless operating system network booting).
  • Limitation: Uses static, manual configuration tables without dynamic address reclamation or temporary leases.

5. Dynamic Host Configuration Protocol (DHCP)

DHCP (RFC 2131) extends BOOTP, introducing Dynamic IP Address Pools and Automated Temporary Leases.

The DHCP "DORA" Four-Way Handshake:

  DHCP Client (0.0.0.0)                                    DHCP Server
          |                                                     |
          |=== 1. DHCPDISCOVER (Broadcast UDP 67) =============>|
          |    "Are there any DHCP servers available on LAN?"   |
          |                                                     |
          |<== 2. DHCPOFFER (Broadcast/Unicast UDP 68) =========|
          |    "Here is IP 192.168.1.100 from Server 1.1"       |
          |                                                     |
          |=== 3. DHCPREQUEST (Broadcast UDP 67) ==============>|
          |    "I accept 192.168.1.100 from Server 1.1"         |
          |    (Broadcast informs other servers to release IPs) |
          |                                                     |
          |<== 4. DHCPACK (Broadcast/Unicast UDP 68) ===========|
          |    "Confirmed! Here is your Mask, Gateway & DNS"    |

Lease Lifecycle & Timers:

  • T1T_1 (50% of Lease): Client sends unicast DHCPREQUEST to original server to extend the lease.
  • T2T_2 (87.5% of Lease): If no response at T1T_1, client broadcasts DHCPREQUEST to any available server.
  • 100% Expiry: Client must release the IP and restart from DHCPDISCOVER.

6. Comprehensive Multi-Protocol Comparison Table

Parameter ARP RARP BOOTP DHCP
Operating Layer Data Link / Network Data Link (raw Ethernet) Application (UDP 67/68) Application (UDP 67/68)
Input (Known) Logical IP Address Physical MAC Address Physical MAC Address Physical MAC Address
Output (Resolved) Physical MAC Address Logical IP Address IP + Bootfile + Gateway Full Config (IP, Mask, DNS, GW, Lease)
Router Traversal No (L2 broadcast) No (L2 broadcast) Yes (via Relay Agent) Yes (via Relay Agent)
Allocation Method Address Translation Static manual table Static manual table Dynamic Pooling & Leases, Auto, Manual
Current Status Active (IPv4) Obsolete Legacy Universal Standard

7. Key Exam Questions & Takeaways

  1. Why is ARP Request broadcast while ARP Reply is unicast?
    • The sender does not know the MAC address of the target, so it must query all devices on the local broadcast domain (FF:FF:FF:FF:FF:FF). The target receives the sender's MAC in the request header and replies directly via unicast.
  2. Why was DHCP developed to replace BOOTP?
    • BOOTP required manual static binding of IP addresses to MAC addresses in a database. DHCP automates IP management through dynamic address pools and temporary leases, allowing IP addresses to be reclaimed when devices disconnect.
  3. What is a DHCP Relay Agent?
    • A router process that intercepts local client DHCPDISCOVER broadcasts on UDP 67 and forwards them as unicast IP packets to a centralized DHCP server on a remote network, eliminating the need for a DHCP server on every subnet.
Free AppAndroid App

Coursify Android App

Generate AI courses, take quick quizzes between classes, and master complex engineering concepts on the go.

← All Computer Networks modules

Address Mapping — ARP, RARP, BOOTP and DHCP — Computer Networks — PYQDeck