Network Layer Protocols

FREE Online Courses: Elevate Skills, Zero Cost. Enroll Now!

The Network Layer houses many protocols, all of which perform different important functions. We take a brief look at these protocols now:

Network Layer Protocols

1. Address Resolution Protocol (ARP):

address resolution protocol

It is used to link an IP address to a MAC address. The MAC address etched on the NIC identifies each device on the network. As a result, we may argue that devices require the MAC address in order to communicate on a local area network. The MAC address may be readily modified.

For example, if a machine’s NIC breaks, the MAC address changes but the IP address remains unchanged. When an internet address is known, ARP is used to determine the MAC address of the node.

Working of ARP:

The device will first check its internet list, known as the ARP cache, to see whether an IP address includes a matching MAC address. It will use the command arp-a to check the ARP cache on command prompt.

If the ARP cache is empty, the device broadcasts the message to the whole network, requesting a matching MAC address from each device. The device with the matching IP address will then respond with its MAC address to the sender. Once the MAC address is received by the device, communication between two devices is possible.

If the device receives the MAC address, it stores the MAC address in the ARP cache. Using the command arp -a, we may examine the ARP cache in the command prompt.

Types of ARP entries:

Dynamic entry: A dynamic entry is one that is produced automatically when a sender broadcasts their message to the whole network. Dynamic entries are not permanent and are deleted on a regular basis.
Static entry: This is an entry in which the IP to MAC address relationship is manually entered using the ARP command tool.

2. Reverse Address Resolution Protocol (RARP):

reverse address resolution protocol (RARP)

Reverse Address Resolution Protocol is the protocol used to acquire an IP address from a server. The RARP protocol uses a message format similar to the ARP protocol. RARP frames, like ARP frames, are transferred from one computer to another in the data section of a frame.

If the host wishes to know its IP address, it broadcasts to the whole network the RARP inquiry packet containing its physical address. The RARP packet is recognised by a RARP server on the network, which responds with the host IP address.

3. Internet Control Message Protocol (ICMP):

ICMP is an abbreviation for Internet Control Message Protocol. The Internet Control Message Protocol (ICMP) is a network layer protocol that hosts and routers utilise to transmit alerts of IP datagram issues back to the sender.

To determine if the target is accessible and responding, ICMP employs echo test/reply.

ICMP handles both control and error messages, although its primary role is to report errors rather than to fix them.

An IP datagram has both the source and destination addresses, but it does not know the address of the previous router through which it was transmitted. As a result, ICMP can only transmit messages to the source and not to the immediate routers.

The error messages are communicated to the sender using the ICMP protocol. Errors are returned to the user processes as a result of ICMP packets.

ICMP messages are sent as part of an IP datagram.

Structure of ICMP Message:

icmp message

  • The first field indicates the message’s nature.
  • The second column specifies the reason for sending a certain message type.
  • Checksum field contains the checksum for the whole ICMP message.

Types of Errors Reported by ICMP:

a. Redirection: When a host has a tiny routing table, a redirection message is generated. When the host has a restricted number of entries and transmits the datagram to the incorrect router. When a router gets a datagram, it forwards it to the appropriate router and sends the “Redirection message” to the host in order to update its routing table.

b. Parameter Problems: When a router or host detects a missing value in an IP datagram, the router discards the datagram and sends the “parameter issue” message back to the originating host.

c. Time Exceeded: Another name for Time Exceeded is “Time-To-Live.” It is a parameter that specifies how long a packet should be kept before being discarded.

d. Destination Unreachable: When the destination cannot be reached, the message “Destination Unreachable” is delivered from the receiver to the sender, or the packet is discarded.

e. Source Quench: The source quench message’s aim is to control congestion. The message is delivered from the overburdened router to the source host in order to lower the transmission rate. ICMP will take the IP address of the rejected packet and append the source quench message to the IP datagram to notify the source host that its transmission rate has been reduced. The source host will lower the transmission rate so that the router is not congested.

4. Internet Group Message Protocol (IGMP):

internet group message protocol (IGMP)

IGMP is an abbreviation for Internet Group Message Protocol. The IP protocol allows for two kinds of communication:

  • Unicasting refers to communication between a single sender and a single recipient. As a result, we may call it one-to-one communication.
  • Multicasting occurs when a sender wishes to deliver the same message to a large number of recipients at the same time. This is known as multicasting, and it involves one-to-many communication.

Hosts and routers utilise the IGMP protocol to support multicasting and identify hosts in a LAN that are members of a group.

Structure of IGMP Message:

igmp message

Type: It specifies the kind of IGMP message. IGMP messages are classified into three types: Membership Query, Membership Report, and Leave Report.

Maximum Response Time: Only the Membership Query message uses this field. It specifies how long the host can wait before sending the Membership Report message in response to the Membership Query message.

Checksum: It determines the full payload of the IP datagram that contains the IGMP message.

Group Address: The behaviour of this field is determined on the kind of message transmitted.

Membership Query: The group address for Membership Query is set to zero for General Query and to multicast group address for a particular query.

Membership Report: The group address for Membership Report is set to the multicast group address.

Leave Group: It is set to the multicast group address for Leave Group.

IGMP Messages:

Membership Query Message

A router sends this message to all hosts on a local area network to identify the set of all multicast groups that the host has joined. It also checks if the hosts on a connected interface have joined a certain multicast group.

The group address in the query is zero because the router expects one answer from a host for each group on that host that has one or more members.

Membership Report Message

The host sends a membership report message in response to the membership query message.

When a host wants to join a multicast group without waiting for a membership question message from the router, it can emit membership report messages.

A router, as well as all hosts on a connected interface, get membership report messages.

Each membership report message contains the multicast address of a particular group in which the host wishes to participate.

The IGMP protocol is unconcerned with which hosts have joined the group or how many hosts are in a single group. It only concerns if one or more connected hosts are members of a single multicast group.

A router’s membership Query message includes a “Maximum Response time.” The host waits for a random length of time ranging from 0 to the maximum response time after receiving a membership inquiry message and before delivering the membership report message. If a host notices that another associated host has sent the “Maximum Report message,” it discards its own since the attached router already knows that one or more hosts have joined a single multicast group. This is referred to as feedback suppression. It optimises efficiency by eliminating the needless sending of a “Membership Report message.”

Leave Report

When the host fails to deliver the “Membership Report message,” it indicates that the host has left the group. Because the host is aware that there are no members in the group, it will not report the group when the next query is received.

Summary:

In this article we looked at the various types of protocols present in the network layer, and also covered the protocols in detail. We looked at the structures of these various protocols and also the mode of operation of each.

Did you like this article? If Yes, please give DataFlair 5 Stars on Google

follow dataflair on YouTube

Leave a Reply

Your email address will not be published. Required fields are marked *