Lectures 22-24 (ARP, RARP, DHCP)

TCP/IP Protocol Suite: Address Resolution Protocol (ARP)

1. Introduction

The TCP/IP Protocol Suite serves as the foundational networking framework that allows communication across interconnected devices. Within this suite, the Address Resolution Protocol (ARP) plays a crucial role in mapping logical addresses (IP addresses) to physical addresses (MAC addresses), enabling devices to communicate over the local network.

2. Objectives of ARP

  • Logical vs. Physical Addresses:

    • Logical addresses (IP addresses) uniquely identify devices in a network, while physical addresses (MAC addresses) identify devices at the hardware level within the local network segment.

  • Static vs. Dynamic Mapping:

    • Static mapping involves manually configuring IP-to-MAC address pairs, whereas dynamic mapping allows ARP to automatically discover and bind addresses.

    • ARP utilizes a dynamic approach to maintain an up-to-date mapping of logical to physical addresses, adjusting to network changes seamlessly.

    • Proxy ARP:

    • Proxy ARP can bridge different segments of a network by allowing a device to respond to ARP requests on behalf of another device, effectively creating a subnetting effect and simplifying routing between different network segments.

3. Address Mapping

3.1 Essentials of Address Mapping

Packet delivery across networks requires two levels of addressing:

  • Logical Addresses:

    • Utilized by higher-layer protocols such as TCP, ensuring data delivery over IP networks.

  • Physical Addresses:

    • Necessary for accessing the network interface and sending frames through the data link layer.

3.2 ARP Functionality

When a host or router needs to send an IP datagram to another device, it processes an ARP request to discover the corresponding physical address. The ARP process involves:

  • Accepting a logical address and querying the local network for the associated physical address.

  • Upon resolution, the IP-to-MAC address mapping is passed to the data link layer for further processing.

4. ARP Operation

4.1 Broadcast vs. Unicast

  • An ARP request is broadcast to all devices on the local network segment, allowing any device that recognizes the requested IP address to respond.

  • In contrast, an ARP reply is unicast back to the requester, ensuring directed communication for the resolved address.

4.2 Cases for ARP Usage

  • Host to Host Communication on Same Network:

    • When two devices communicate within the same network, the sender uses ARP to resolve the recipient's IP address to a MAC address for seamless data transmission.

  • Host to Host Communication on Different Networks:

    • The sender first finds the next hop router’s IP address from its routing table and uses ARP to obtain the router’s MAC address for forwarding the data.

  • Router Forwarding for Host on Different Networks:

    • Routers utilize routing tables to identify the next router’s IP and then use ARP to discover its physical address.

  • Router Forwarding for Host on Same Network:

    • In this case, the router ensures the IP datagrams are correctly mapped to MAC addresses for efficient data transfer.

5. ARP Packet Structure

5.1 Example of ARP Request and Reply

An example illustrating an ARP request and reply between two hosts typically includes source and destination IP and MAC addresses.

  • An ARP data field is usually 28 bytes long, and addresses can be represented in hexadecimal format for clarity and precision.

6. Proxy ARP

Proxy ARP allows a router to act on behalf of another host by responding to ARP requests, facilitating communication across different network segments without requiring explicit configuration by the end devices.

7. IP Address Determination at Startup

For machines that lack permanent storage, such as diskless workstations, obtaining an IP address involves broadcasting requests to locate a DHCP server capable of dynamically assigning an IP.

8. Reverse Address Resolution Protocol (RARP)

RARP operates similarly to ARP but in reverse, enabling devices to discover their own IP address based on their known MAC address by broadcasting requests, which are answered by RARP servers. This is particularly useful for devices that do not have permanent storage for IP configurations.

  • Redundant RARP servers enhance reliability, ensuring that requests are fulfilled even if a server fails.

9. Alternatives to RARP

9.1 BOOTstrap Protocol (BOOTP)

BOOTP was developed as an alternative to RARP, employing UDP/IP for communication. It identifies hosts by their MAC addresses, thus streamlining the allocation of IP addresses without manual configuration.

9.2 Dynamic Host Configuration Protocol (DHCP)

DHCP extends BOOTP functionality, offering flexibility in IP address assignments. It can allocate both temporary (dynamic) and permanent (static) IP addresses.

  • The protocol also incorporates a repository of available IP addresses, substantially reducing administrative overhead and enabling on-demand addressing.

  • A stateless configuration method requires a dedicated DHCP server to handle address allocation efficiently.

10. DHCP Implementation

10.1 State Machine of DHCP

The DHCP process traverses several states:

  • INITIALIZE: Starting state where the client begins the request cycle.

  • SELECT: The client processes DHCPDISCOVER messages to identify available DHCP servers.

  • REQUEST: Through this phase, the client negotiates the terms of the IP lease with the selected server.

  • BOUND: Once the negotiation is successful, the client enters the normal operational state.

  • RENEW: Prior to the lease expiration, the client may extend its lease to ensure continued access.

  • REBIND: If the lease time runs out, the client re-establishes the lease with the DHCP server to maintain network connectivity.

11. DHCP Details

The scalability of DHCP allows networks to grow without the need for relay agents.

  • The address renewal process has implications for associated DNS interactions, as it also impacts how host identification is managed.

  • Various configurations for binding