Mapping Physical To Logical Address: RARP, BOOTP, and DHCP
Mapping Physical To Logical Address: RARP, BOOTP, and DHCP
Occasions in which a host knows its physical address, but needs to know its logical address. This may
happen in two cases:
1. A diskless station is just booted. The station can find its physical address by checking
its interface, but it does not know its IP address.
2. An organization does not have enough IP addresses to assign to each station; it needs
to assign IP addresses on demand. The station can send its physical address and
ask for a short time lease.
RARP
Reverse Address Resolution Protocol (RARP) finds the logical address for a machine
that knows only its physical address. Each host or router is assigned one or more logical
(IP) addresses, which are unique and independent of the physical (hardware) address of
the machine. To create an IP datagram, a host or a router needs to know its own IP
address or addresses. The IP address of a machine is usually read from its configuration
file stored on a disk file.
The machine can get its physical address (by reading its NIC, for example), which
is unique locally. It can then use the physical address to get the logical address by using
the RARP protocol. A RARP request is created and broadcast on the local network.
Another machine on the local network that knows all the IP addresses will respond with
a RARP reply. The requesting machine must be running a RARP client program; the
responding machine must be running a RARP server program.
Demerits:
if an administrator has several networks or several subnets, it needs to assign a RARP server for each
network or subnet. This is the reason that RARP is almost obsolete.
BOOTP
The Bootstrap Protocol (BOOTP) is a client/server protocol designed to provide physical address to
logical address mapping. BOOTP is an application layer protocol. The administrator may put the
client and the server on the same network or on different networks, as shown in Figure 21.7. BOOTP
messages are encapsulated in a UDP packet, and the UDP packet itself is encapsulated in an IP
packet.
One of the advantages of BOOTP over RARP is that the client and server are application-layer
processes.
DHCP
One major problem with the BOOTP protocol is that the table mapping the IP addresses to physical
addresses needs to be manually configured. This means that every time there is a change in a physical
or IP address, the administrator needs to manually enter the changes. DHCP, on the other hand, allows
both manual and automatic configurations. Static addresses are created manually; dynamic addresses
are created automatically.
Static Address Allocation In this capacity DHCP acts as BOOTP does. It is backwardcompatible
with BOOTP, which means a host running the BOOTP client can request a
static address from a DHCP server. A DHCP server has a database that statically binds
physical addresses to IP addresses.
Dynamic Address Allocation DHCP has a second database with a pool of available
IP addresses. This second database makes DHCP dynamic. When a DHCP client requests
a temporary IP address, the DHCP server goes to the pool of available (unused) IP
addresses and assigns an IP address for a negotiable period of time.
When a DHCP client sends a request to a DHCP server, the server first checks its
static database. If an entry with the requested physical address exists in the static database,
the permanent IP address of the client is returned. On the other hand, if the entry
does not exist in the static database, the server selects an IP address from the available
pool, assigns the address to the client, and adds the entry to the dynamic database.