Network Layer – Mapping Physical to Logical Address (RARP , BOOTP and DHCP)
In the previous post, we have seen a complete overview of the IPv6 protocol and its features. Now in this post, we mainly understand the protocols by which a host can map a physical address to a logical (IP) address. There may be occasions when an organization does not have enough IP addresses to assign to each workstation , it needs to assign IP addresses on demand.
The workstation can send its physical address and ask for a short time lease . The workstation can find its physical address by checking its interface, but it does not know its IP address.(in this post we mainly discuss the RARP , DHCP, and BOOTP protocols)
What is Reverse Address Resolution Protocol (RARP) ?
We have already learned about ARP protocol in our previous post. Now the Reverse Address Resolution Protocol (RARP) finds the logical address for a machine that knows only its physical address. ARP is used for solving the problem of finding out which Ethernet address corresponds to a given IP address.
That means ARP is used for the mapping of IP address to physical or MAC address. But sometimes we have to deal with the reverse case i.e. we have to obtain the IP address corresponding to the given Ethernet (MAC) address. Such a problem can occur when booting a diskless workstation.
Each host or router is assigned one or more logical (IP) addresses, which will be unique and independent of the physical (hardware) address of the machine. In order to create an IP datagram, a host (or router) needs to know its own IP address .
The IP address of any machine is usually taken from its configuration file stored on a disk file. However, a diskless machine is usually booted from ROM, which will have very minimum booting information. The problem of obtaining the IP address when an Ethernet address is given can be solved by using RARP (Reverse Address Resolution Protocol).
The newly booted workstation is allowed to broadcast its Ethernet address. The RARP server after receiving this request, checks the Ethernet address in its files and finds the corresponding IP address. This IP address is then sent back.
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. The requesting machine must be running a RARP client program, the responding machine must be running a RARP server program.
There is a serious problem with RARP, broadcasting is done at the data link layer. The physical broadcast address, as in the case of Ethernet, does not pass the boundaries of a network.This is the reason that RARP is almost obsolete. Two protocols, BOOTP and DHCP, are replacing RARP.
What is the BOOTP protocol ?
The Bootstrap Protocol (BOOTP) is basically a client/server protocol designed to provide a 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 some different network.
The disadvantage of RARP is that it uses a destination address of all is (limited broadcasting) to reach the RARP server. In order to get around this problem, another bootstrap protocol called BOOTP has been invented.
Unlike RARP, it uses UDP messages which are forwarded over routers. It also furnish a diskless workstation with additional information, which includes the IP address of the file server holding the memory image, the IP address of the default router, and also the subnet mask to use.
The advantage of BOOTP over RARP is that both the client and server are application layer processes. As in other application-layer processes, a client can be in one network and the server in another, separated by several other networks.But there is one problem that must be solved. The BOOTP request is broadcast because the client does not know the IP address of the server.
Further , a broadcast IP datagram cannot pass through any router. To solve this problem, there will be a need for an intermediary. One of the hosts (or a router that can be configured to operate at the application layer) can be used as a relay. The host in this case is called a relay agent. The relay agent clearly knows the unicast address of a BOOTP server.
When it receives this type of packet, it will encapsulate the message in a unicast datagram and sends the request to the BOOTP server. The packet carrying a unicast destination address, is routed by any router and reaches the BOOTP server.
The BOOTP server will know the message that comes from a relay agent because one of the fields in the request message defines the IP address of the relay agent. The relay agent, after receiving the reply, finally sends it to the BOOTP client.
What is DHCP protocol ?
BOOTP is not a dynamic configuration protocol. When any client requests its IP address, the BOOTP server checks a table that matches the physical address of the client with its IP address.
This binding between the physical address and the IP address of the client is predetermined. Now consider a scenario where , if a host moves from one physical network to another. or what if a host wants a temporary IP address?
BOOTP cannot handle these situations because the binding between the physical and IP addresses is static and fixed in a table until changed by the administrator. BOOTP is a static configuration protocol . The Dynamic Host Configuration Protocol (DHCP) has been devised to provide static and dynamic address allocation that can be manual or automatic.
DHCP automatically configures hosts that connect to a TCP/IP network. It provides a mechanism for assigning a temporary IP address to host. A DHCP server has a database that statically binds physical addresses to IP addresses.
DHCP generally has a second database with a pool of available IP addresses. This second database makes DHCP dynamic. When any DHCP client requests a temporary IP address, the DHCP server goes to the pool of available (or 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 in its static database. If an entry with the requested physical address already exists in the static database, the permanent IP address of the client will be returned.
On the other hand, if the entry does not exist in the static database, the server then selects an IP address from the available pool, then assigns the address to the client, and then adds the entry to the dynamic database .
In the next post we will look into the other important protocols of the network layer.Stay tuned.
Aric is a tech enthusiast , who love to write about the tech related products and ‘How To’ blogs . IT Engineer by profession , right now working in the Automation field in a Software product company . The other hobbies includes singing , trekking and writing blogs .