Basic IP Support Protocols
1.Address Resolution Protocol (ARP)
Address Resolution Protocol (ARP) is one of the major protocol of the TCP/IP protocol suite. The main goal of Address Resolution Protocol (ARP) is to map an IPv4 address (32-bit Logical Address) to its corresponding MAC Address (48-bit Physical Address). Network Applications use IPv4 Address to communicate with another device at the Application Layer. Datalink layer deal with MAC address (48 bit Physical Address) for addressing, and this address (physical address) is configured into the network card of the system permanently.
Here, we are providing the complete study notes on the Basic IP Support Protocols for the preparation of GATE, Computer Science Engineering Exam.
Note- The main responsibility of ARP is to translate IP address into physical address.
Note: ARP determines the hardware address/physical address, also called Media Access Control (MAC) address, of a host from its well-known IP address.
The important terms associated with ARP are :
- ARP Cache: After resolving MAC address, the ARP sends it to the source where it stores in a table for future reference. The subsequent communications can use the MAC address from the table
- ARP Cache Timeout: It indicates the time for which the MAC address in the ARP cache can reside
- ARP request: This is nothing but broadcasting a packet over the network to validate whether we came across destination MAC address or not.
ARP request packet contains:
- The physical address of the sender.
- The IP address of the sender.
- The physical address of the receiver is 0s.
- The IP address of the receiver
Note, that the ARP packet is encapsulated directly into data link frame.
- ARP response/reply: It is the MAC address response that the source receives from the destination which aids in further communication of the data.
Cases when ARP is used:
- CASE-1: The sender is a host and wants to send a packet to another host on the same network.
- Use ARP to find another host’s physical address
- CASE-2: The sender is a host and wants to send a packet to another host on another network.
- Sender looks at its routing table.
- Find the IP address of the next hop (router) for this destination.
- Use ARP to find the router’s physical address
- CASE-3: the sender is a router and received a datagram destined for a host on another network.
- Router check its routing table.
- Find the IP address of the next router.
- Use ARP to find the next router’s physical address.
- CASE-4: The sender is a router that has received a datagram destined for a host in the same network.
- Use ARP to find this host’s physical address.
NOTE: An ARP request is a broadcast, and an ARP response is a Unicast.
2. DHCP: The Network Management Protocol That Provides You an IP Address
What is Dynamic host configuration protocol?
- Dynamic – Automatically
- Host – Any computer that is connected to the network
- Configuration – To configure a host means to provide network information(ip address, subnet mask, Gateway address) to a host
- Protocol – Set of rules
Basically, the main role of a DHCP server is to configure a host in a network dynamically.
In simple words, DHCP (Dynamic Host Configuration Protocol) can be defined as a set of rules that is responsible for dynamic configuration and management of host in a network. It dynamically assigns an IP address and other network managing parameters toa system so that it can communicate with other devices (IP networks).
It is an application layer protocol which provides:
- Subnet Mask (Option 1 – e.g., 255.255.255.0)
- Router Address (Option 3 – e.g., 192.168.1.1)
- DNS Address (Option 6 – e.g., 220.127.116.11)
- Vendor Class Identifier (Option 43 – e.g., ‘unifi’ = 192.168.1.9 ##where unifi = controller)
DHCP is based on a client-server model and based on discovery, offer, request, and ACK.
Here is how the DHCP process works when you go online:
- Your go on your computer to connect to the Internet.
- The network requests an IP address (this is actually referred to as a DHCP discover message).
- On behalf of your computer's request, the DHCP server allocates (leases) to your computer an IP address. This is referred to as the DHCP offer message.
- Your computer (remember—you're the DHCP client) takes the first IP address offer that comes along. It then responds with a DHCP request message that verifies the IP address that's been offered and accepted.
- DHCP then updates the appropriate network servers with the IP address and other configuration information for your computer.
- Your computer (or whatever network device you're using) accepts the IP address for the lease term.
DHCP discover message –
This is the first message in the communication process between any client and server. Discovr message is provoked by the client host to discover any available DHCP server/servers in the network. So this message is broadcasted in the network and received by each device of that network in order to determine the DHCP server.
DHCP offer message –
This message is sent as response from the DHCP server to the requesting host in this message specifying the unleased IP address with other TCP configuration information. DHCP offer message is broadcasted by server.
DHCP request message –
When a requesting client gets an offer message, it again acknowledges by broadcasting a DHCP request message. Client will generate a gratuitous ARP to find whether there is any other host present in the network with same IP address. If client gets no reply by other host, so t means there is no host with same TCP configuration in the network and then the message is broadcasted to the server acknowledging the acceptance of IP address and a Client ID is also added in DHCP request message.
Note – DHCP request message is broadcasted after the ARP request is broadcasted by the host to check whether any other host is not using offered IP address. If there is no reply from any other host, then the client host broadcast the DHCP request message to the server acknowledging the acceptance of IP address with other TCP/IP Configuration.
DHCP acknowledgement message –
DHCP acknowledgement message is sent in response to the request message received, the DHCP server will make an entry specifying client ID and then bind the offered IP address with the lease time. Finally, the client will have the IP address provided by server.
DHCP negative acknowledgement message –
Whenever a DHCP server receives a request for IP address that is invalid so it sends a DHCP Nak (Negative acknowledgement) message to client. For example -when the server has no unused IP address or the pool is empty, then DHCP Nak message is sent to client by the server.
Advantages – The advantages of using DHCP include:
- centralized management of IP addresses
- ease of adding new clients to a network
- reuse of IP addresses reducing the total number of IP addresses that are required
- simple reconfiguration of the IP address space on the DHCP server without needing to reconfigure each client
3. Internet Control Message Protocol (ICMP)
ICMP (Internet Control Message Protocol) is an internet layer protocol used by network devices to diagnose network communication issues. Mainly ICMP is used to determine whether data is reaching desired correct destination in a timely manner or not. Generally, ICMP protocol is used on network devices, such as routers, gateway etc. .
What Is ICMP Used For?
IP (Internet Protocol) doesn't have any inbuilt mechanism for detecting and sending error and control messages. So, IP depends on Internet Control Message Protocol (ICMP) to provide an error control. It is used for error reporting and management related queries. ICMP is a supporting protocol that is mostly used by networking devices such as routers for sending the error messages and operations information.
When two devices are connected over the Internet, the ICMP generates errors to share with the sending device so that any of the data didn't get to its intended destination.
Source quench message:
Source quench message is a request to host(destination) to decrease the traffic rate for message sending . Or in simple words we can say that, when receiving host detects that traffic rate (rate of sending packets) is too fast, then it sends the source quench message to the source to slow down the message sending speed (rate) so that no packet can be lost.
- ICMP will take source IP from the discarded packet and informs to source by sending source quench message. Then source will reduce the speed of transmission so that router will free for congestion.
- When the congestion router is far away from the source the ICMP will send hop by hop source quench message so that every router will reduce the speed of transmission.
Whenever router receives data packets then calculated header checksum should always be equal to received header checksum then only packet is accepted by the router otherwise rejected.
- If there is a mismatch packet will be dropped by the router. ICMP will take the source IP from the discarded packet and informs to source by sending parameter problem message.
Time exceeded message :
- When some fragments are lost in a network then the holding fragment by the router will be dropped then ICMP will take source IP from discarded packet and informs to the source, of discarded datagram due to time to live field reaches to zero, by sending time exceeded message.
Destination un-reachable :
- Destination unreachable is generated by the host or its inbound gateway to inform the client that the destination is unreachable for some reason.
- There is no necessary condition that only router give the ICMP error message some time destination host send ICMP error message when any type of failure (link failure, hardware failure, port failure etc.) happen in the network.
Redirection message :
- Redirect requests data packets be sent on an alternate route. The message informs to a host to update its routing information (to send packets on an alternate route).
- If host tries to send data through a router R1 and R1 sends data on a router R2 and there is a direct way from host to R2. Then R1 will send a redirect message to inform the host that there is a best way to the destination directly through R2 available. The host then sends data packets for the destination directly to R2.
The router R2 will send the original datagram to the intended destination.
But if datagram contains the routing information of the packet then this message will not be sent even if another better route is available. As redirected messages should only be sent by the gateways and not by the Internet hosts.
- Whenever a packet is forwarded into a wrong direction later it is redirected in a current direction and then ICMP will send re-directed message.
4. Network Address Translation (NAT)
- To access the Internet, one public IP address is needed, but we can use a private IP address in our private network. The idea of NAT is to allow multiple devices to access the Internet through a single public address. To achieve this, the translation of private IP address to a public IP address is required.
- Network Address Translation (NAT)is a process in which one or more local IP address is translated into one or more Global IP address and vice versa in order to provide Internet access to the local hosts.
- Also, it does the translation of port numbers i.e. masks the port number of the host with another port number, in the packet that will be routed to the destination. It then makes the corresponding entries of IP address and port number in the NAT table. NAT generally operates on router or firewall.
Network Address Translation (NAT) working –
Mostly, Network Address Translation is configured with the border router i.e. the router which has one interface in the local network and one interface in the global network. When a packet travels outside the local (inside) network, then NAT transforms that local (private) IP address into a global (public) IP address. When a packet enters into the local network, the global (public) IP address is changed into a local (private) IP address.
If NAT addresses got finished, i.e., no more address is left in the configuring pool then the packets will be dropped and an Internet Control Message Protocol (ICMP) host unreachable packet will be send to the destination.
Advantages of NAT –
- NAT conserves legally registered IP addresses.
- It provides privacy as the device IP address, sending and receiving the traffic, will be hidden.
- Eliminates address renumbering when a network evolves.
Disadvantage of NAT –
- Translation results in switching path delays.
- Certain applications will not function while NAT is enabled.
- Complicates tunnelling protocols such as IPsec.
- Also, the router being a network layer device, should not tamper with port numbers(transport layer) but it has to do so because of NAT.
You can go with the detailed champion study plan for GATE CS 2022 from the following link:
Detailed GATE CSE 2022 Champion Study Plan
Candidates can also practice 112+ Mock tests for exams like GATE, ISRO, DRDO, BARC, NIELIT, etc. with the BYJU'S Exam Prep Test Series check the following link:
Click Here to Avail GATE CSE Test Series!
Sahi Prep Hai Toh Life Set Hai!!
Commentswrite a comment