close
The Wayback Machine - https://web.archive.org/web/20240819184237/https://www.geeksforgeeks.org/network-layer-protocols/
Open In App

Network Layer Protocols

Last Updated : 24 Jun, 2024
Comments
Improve
Suggest changes
Like Article
Like
Save
Share
Report
News Follow

Network Layer is responsible for the transmission of data or communication from one host to another host connected in a network. Rather than describing how data is transferred, it implements the technique for efficient transmission. In order to provide efficient communication protocols are used at the network layer. The data is being grouped into packets or in the case of extremely large data it is divided into smaller sub packets. Each protocol used has specific features and advantages. The below article covers in detail the protocols used at the network layer.

Functions of Network Layer

The network layer is responsible for providing the below-given tasks:

  • Logical Addressing: Each device on the network needs to be identified uniquely. Therefore network layer provides an addressing scheme to identify the device. It places the IP address of every sender and the receiver in the header. This header consists of the network ID and host ID of the network.
  • Host-to-host Delivery of Data: The network layer ensures that the packet is being delivered successfully from the sender to the receiver. This layer makes sure that the packet reaches the intended recipient only.
  • Fragmentation: In order to transmit the larger data from sender to receiver, the network layer fragments it into smaller packets. Fragmentation is required because every node has its own fixed capacity for receiving data.
  • Congestion Control: Congestion is defined as a situation where the router is not able to route the packets property which results in aggregation of packets in the network. Congestion occurs when a large amount of packets are flooded in the network. Therefore network layer controls the congestion of data packets in the network.
  • Routing and Forwarding: Routing is the process that decides the route for transmission of packets from sender to receiver. It mostly chooses the shortest path between the sender and the receiver. Routing protocols that are mostly used are path vector, distance vector routing, link state routing, etc.

Network Layer Protocols

There are various protocols used in the network layer. Each protocol is used for a different task. Below are the protocols used in the network layer: 

Protocols at each Layer

Protocols at each Layer

1. IP (Internet Protocol)

IP stands for Internet Protocol. Internet Protocol helps to uniquely identify each device on the network. Internet protocol is responsible for transferring the data from one node to another node in the network. Internet protocol is a connectionless protocol therefore it does not guarantee the delivery of data. For the successful delivery higher level protocols such as TCP are used to guarantee the data transmission. The Internet Protocol is divided in two types. They are:

  • IPv4: IPv4 provides with the 32 bit address scheme. IPv4 addressing has four numeric fields and are separated by dot. IPv4 can be configured either using DHCP or manually. IPv4 does not provide with more security features as it does not support authentication or encryption techniques. IPv4 is further divided into five classes as Class A, Class B, Class C, Class D and Class E.
  • IPv6: IPv6 is the most recent version of IP. If provided with a 128 bit addressing scheme. IP address has eight fields that are separated by colon, and these fields are alphanumeric. The IPv6 address is represented in hexadecimal. IPv6 provides with more security features such as authentication and encryption. IPv6 supports end-to-end connection integrity. IPv6 provides with more range of IP address as compared to IPv4. 
     

Difference between IPv4 and IPv6: IPv4 vs IPv6

2. ARP (Address Resolution Protocol)

ARP stands for Address Resolution Protocol. ARP is used to convert the logical address ie. IP address into physical address ie. MAC address. While communicating with other nodes, it is necessary to know the MAC address or physical address of the destination node. If any of the node in a network wants to know the physical address of another node in the same network, the host then sends an ARP query packet. This ARP query packet consists of IP address and MAC address of source host and only the IP address of destination host. This ARP packet is then received to every node present in the network. The node with its own IP address recognises it and sends it MAC address to the requesting node. But sending and receiving such packets to know the MAC address of destination node it increases the traffic load. Therefore in order to reduce this traffic and improve the performance, the systems that makes use of ARP maintain a cache of recently acquired IP into MAC address bindings.

How Does ARP Work?

  • The host broadcasts an ARP inquiry packet containing the IP address over the network in order to find out the physical address of another computer on its network.
  • The ARP packet is received and processed by all hosts on the network; however, only the intended recipient can identify the IP address and reply with the physical address.
  • After adding the physical address to the datagram header and cache memory, the host storing the datagram transmits it back to the sender.
ARP

ARP

Types of ARP Entries

  • Static Entry: This type of entry is created when a user uses the ARP command utility to manually enter the IP to MAC address association.
  • Dynamic Entry: A dynamic entry is one that is automatically formed when a sender broadcasts their message to the whole network. Dynamic entries are periodically removed and are not permanent.

3. RARP

RARP stands for Reverse Address Resolution Protocol. RARP works opposite of ARP. Reverse Address Resolution Protocol is used to convert MAC address ie. physical address into IP address ie. logical address. RARP provides with a feature for the systems and applications to get their own IP address from a DNS( Domain Name System) or router. This type of resolution is required for various tasks such as executing reverse DNS lookup. As Reverse Address Resolution Protocol works at low level it requires direct network addresses. The reply from the server mostly carries a small information but the 32 bit internet address is used and it does not exploit the full potential of a network such as ethernet.

How Does RARP Work?

  • Data is sent between two places in a network using the RARP, which is on the Network Access Layer.
  • Every user on the network has two distinct addresses: their MAC (physical) address and their IP (logical) address.
  • Software assigns the IP address, and the hardware then builds the MAC address into the device.
  • Any regular computer connected to the network can function as the RARP server, answering to RARP queries. It must, however, store all of the MAC addresses’ associated IP addresses. Only these RARP servers are able to respond to RARP requests that are received by the network. The information package must be transmitted over the network’s lowest tiers.
  • Using both its physical address and Ethernet broadcast address, the client transmits a RARP request. In response, the server gives the client its IP address.
RARP

RARP

Difference between ARP and RARP: ARP vs RARP

4. ICMP

ICMP stands for Internet Control Message Protocol. ICMP is a part of IP protocol suite. ICMP is an error reporting and network diagnostic protocol. Feedback in the network is reported to the designated host. Meanwhile, if any kind of error occur it is then reported to ICMP. ICMP protocol consists of many error reporting and diagnostic messages. ICMP protocol handles various kinds of errors such as time exceeded, redirection, source quench, destination unreachable, parameter problems etc. The messages in ICMP are divided into two types. They are given below:

  • Error Message: Error message states about the issues or problems that are faced by the host or routers during processing of IP packet.
  • Query Message: Query messages are used by the host in order to get information from a router or another host.

How Does ICMP Work?

  • The main and most significant protocol in the IP suite is called ICMP. However, unlike TCP and UDP, ICMP is a connectionless protocol, meaning it doesn’t require a connection to be established with the target device in order to transmit a message.
  • TCP and ICMP operate differently from one another; TCP is a connection-oriented protocol, while ICMP operates without a connection. Every time a connection is made prior to a message being sent, a TCP Handshake is required of both devices.
  • Datagrams including an IP header containing ICMP data are used to transmit ICMP packets. An independent data item like a packet is comparable to an ICMP datagram.
ICMP

ICMP

5. IGMP

IGMP stands for Internet Group Message Protocol. IGMP is a multicasting communication protocol. It utilizes the resources efficiently while broadcasting the messages and data packets. IGMP is also a protocol used by TCP/IP. Other hosts connected in the network and routers makes use of IGMP for multicasting communication that have IP networks. In many networks multicast routers are used in order to transmit the messages to all the nodes. Multicast routers therefore receives large number of packets that needs to be sent. But to broadcast this packets is difficult as it would increase the overall network load. Therefore IGMP helps the multicast routers by addressing them while broadcasting. As multicast communication consists of more than one senders and receivers the Internet Group Message Protocol is majorly used in various applications such as streaming media, web conference tools, games, etc.

How Does IGMP Work?

  • Devices that can support dynamic multicasting and multicast groups can use IGMP.
  • The host has the ability to join or exit the multicast group using these devices. It is also possible to add and remove customers from the group using these devices.
  • The host and local multicast router use this communication protocol. Upon creation of a multicast group, the packet’s destination IP address is changed to the multicast group address, which falls inside the class D IP address range.

Difference between ICMP and IGMP: ICMP vs IGMP

Frequesntly Asked Question on Network Layer Protocols – FAQs

Is Transmission Control Protocol(TCP) a network layer protocol?

No, TCP is a transport layer protocol. TCP provides with a reliable connection between all the applications. Data is being sent from one host to another without any error and duplication issues.

Which layer protocols are designed for end- users?

Application layer protocols are designed for end-users. Application layer consists of protocols such as HTTP, HTTPS, FTP, SMTP, SSH etc.

State the format of ICMP message?

The ICMP message is of 32 bit. It consists of 3 fields. First field is of 8 bit that states type of message, second field is of 8 bit that states the reason of message and the third field is of 16 but that consists of actual ICMP message.

What is CIDR?

CIDR stands for Classless Inter-Domain Routing , it is basically addressing type which allows more effective and efficient use of IP address.

What is NAT?

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.



Similar Reads

Difference Between Network Layer Protocols and Application Layer Protocols
Prerequisite: Basics of Computer Network In the world of computer networking, protocols are the set of rules that govern communication between devices. These rules dictate how devices should send and receive data over a network. Protocols are typically organized into layers, with each layer serving a specific purpose and working in conjunction with
6 min read
Why Flow Control is Used in Both Data Link Layer and Network Layer?
OSI model was established in1947 by international standard organization is a multinational body dedicated to worldwide agreement on international standards.ISO standard covers all the aspects of network communications is the Open System Interconnection model.It was introduced in the late 1070s. an open system is a set of protocols that allows any t
6 min read
Difference Between Network Topology and Network Protocols
Network Topology and Network Protocols are closely related but distinct concepts in the field of computer networking. Network Topology refers to the physical and logical arrangement of devices on a network, while Network Protocols refer to the rules and standards that govern the communication between devices on a network. Understanding the differen
4 min read
Data Link Layer Communication Protocols in IoT
Several Communication Protocols are used in Internet of Things (IoT) to provide service to the network layer. As we know IoT is based on networking of things where smart devices communicate with each other by sending and receiving data. So for that several network protocols (Communication protocols) are used to connect the IoT enabled devices and t
5 min read
Examples of Data Link Layer Protocols
Data Link Layer protocols are generally responsible to simply ensure and confirm that the bits and bytes that are received are identical to the bits and bytes being transferred. It is basically a set of specifications that are used for implementation of data link layer just above the physical layer of the Open System Interconnections (OSI) Model. S
4 min read
Transport Layer Protocols
The transport layer is the fourth layer in the OSI model and the second layer in the TCP/IP model. The transport layer provides with end to end connection between the source and the destination and reliable delivery of the services. Therefore transport layer is known as the end-to-end layer. The transport layer takes the services from its upward la
9 min read
Application Layer Protocols in TCP/IP
TCP/IP stands for Transport Control Protocol/Internet Protocol. TCP/IP suite is considered as a basis on which a virtual network exists. TCP/IP makes use of client-server model for communication where service is provided by the server to the client or other systems. TCP/IP protocol consists of four layers. TCP/IP defines the rules, standards, and f
7 min read
Protocols in Application Layer
The Application Layer is the topmost layer in the Open System Interconnection (OSI) model. This layer provides several ways for manipulating the data which enables any type of user to access the network with ease. The Application Layer interface directly interacts with the application and provides common web application services. The application la
7 min read
Session Layer Messaging Protocols in IoT
The Session Layer (Layer 5 of the OSI model) manages and controls device connections. It initiates, manages, and ends communication sessions. Several protocols have been developed for the session layer in IoT to provide efficient and reliable communication. In this article, we will discover various Session Layer Messaging Protocols in IoT. What are
5 min read
Difference between layer-2 and layer-3 switches
Prerequisite - Network Devices A switch is a device which sends a data packet in a local network. What is advantage over hub? A hub floods the network with the packet and only destination system receives that packet while others just drop due to which the traffic increases a lot. To solve this problem switch came into the picture. A switch first le
2 min read
Difference between Secure Socket Layer (SSL) and Transport Layer Security (TLS)
SSL stands for Secure Socket Layer while TLS stands for Transport Layer Security. Both Secure Socket Layer and Transport Layer Security are the protocols used to provide security between web browsers and web servers. The main difference between Secure Socket Layer and Transport Layer Security is that, in SSL (Secure Socket Layer), the Message diges
2 min read
Cisco Discovery Protocol (CDP) and Link Layer Discovery Protocol (LLDP) in Data Link Layer
Layer 2 or the Datalink layer provides physical addressing and access to media. It defines how data is to be formatted for transmission and how access to the network is to be controlled. It also provides error detection, ensuring data on higher layers is formatted correctly for transmission. Cisco Discovery Protocol (CDP) and Link Layer Discovery P
2 min read
Which Layer Called Error Detection Layer?
Answer: The Data Link layer is often referred to as the error detection layer.And, Transport Layer is also responsible for error detection and recovery in data communication. Error DetectionThe Data Link layer is responsible for transferring data frames between adjacent network nodes. During this process, it employs error detection techniques to en
1 min read
Collision-Free Protocols in Computer Network
Almost all collisions can be avoided in CSMA/CD but they can still occur during the contention period. The collision during the contention period adversely affects the system performance, this happens when the cable is long and length of packet are short. This problem becomes serious as fiber optics network came into use. Here we shall discuss some
4 min read
Types of Virtual Private Network (VPN) and its Protocols
VPN stands for Virtual Private Network (VPN), that allows a user to connect to a private network over the Internet securely and privately. VPN creates an encrypted connection that is called VPN tunnel, and all Internet traffic and communication is passed through this secure tunnel. Virtual Private Network (VPN) is basically of 2 types: 1. Remote Ac
7 min read
Network Protocols
Network Protocols are a set of guidelines governing the exchange of information in a simple, dependable and secure way. Network protocols are formal standards and policies comprised of rules, methodology, and configurations that define communication between two or more devices over a network. To effectively send and receive information, devices on
3 min read
Network Protocols and Communications
Data communication are the exchange of data between two nodes via some form of link (transmission medium) such as cable. Now these Data are exchanged in three ways : Simplex Half Duplex Full Duplex Now let us understand them one by one : Simplex : Communication is always unidirectional, i.e., one device will transmit and other will receive. E.g., K
2 min read
14 Most Common Network Protocols And Their Vulnerabilities
Network Protocols are a set of established rules which control and govern the interchange of information by following a secure, reliable, and easy method. These sets of rules are present for various applications. Some well-known examples of protocols include wired networking (like Ethernet), wireless networking (like WLANs), and Internet communicat
8 min read
Mobile IP and Network Mobility Protocols
Mobile Internet Protocol and Network Mobility are both network concepts that are related to each other which enables the devices and networks in the Internet Protocol environments. Both these protocols are used for mobile devices and network connection even when the network is in a different location and even if they move in a different network. Th
9 min read
Routing v/s Routed Protocols in Computer Network
The Network Layer of the OSI Model is responsible for providing logical addressing, which routers use to select best path for routing packets. There are two types of packets used at this layer : Data Packets - The user data is transferred in the inter-network by these data packets. Routed protocols are those protocols which support such data traffi
6 min read
Network Authentication Protocols: RADIUS, TACACS+
Network authentication protocols are known as methods that are used to verify the identity of the users or the devices that are written to access a particular network. these protocols are used to make sure that only the authorized users of the devices are granted access while making sure the unauthorized users are out. so in this article, we will u
8 min read
Types of Network Protocols and Their Uses
Network protocols are a set of rules that are responsible for the communication of data between various devices in the network. These protocols define guidelines and conventions for transmitting and receiving data, ensuring efficient and reliable data communication. What is Network Protocol?A network protocol is a set of rules that govern data comm
9 min read
Multiple Access Protocols in Computer Network
Multiple Access Protocols are methods used in computer networks to control how data is transmitted when multiple devices are trying to communicate over the same network. These protocols ensure that data packets are sent and received efficiently, without collisions or interference. They help manage the network traffic so that all devices can share t
9 min read
Wireless Network Roaming and Handover Protocols
Wireless network roaming and handover protocols does play a significant role in for mobile devices by ensuring seamless connectivity by switching between access point within WLAN(wireless local area network) and provided uninterrupted internet access to it's user regardless of the location. In this article, we will learn all about the Wireless netw
7 min read
Controlled Access Protocols in Computer Network
Controlled Access Protocols (CAPs) in computer networks control how data packets are sent over a common communication medium. These protocols ensure that data is transmitted efficiently, without collisions, and with little interference from other data transmissions. In this article, we will discuss Controlled Access Protocols. What is the Controlle
6 min read
Why Star network is More Efficient in Network Fault Tolerance in Place of Bus Network?
Answer: Star networks offer better fault tolerance than bus networks because a single point of failure in a star network (the central hub) affects only the connected device, while a fault in a bus network can disrupt communication for all devices on the bus.Advantages of Star Topology Over Bus Topology Individual Connection Points: In a star networ
2 min read
Fragmentation at Network Layer
Prerequisite - IPv4 Datagram Fragmentation and Delays Fragmentation is done by the network layer when the maximum size of datagram is greater than maximum size of data that can be held in a frame i.e., its Maximum Transmission Unit (MTU). The network layer divides the datagram received from the transport layer into fragments so that data flow is no
6 min read
Network Layer in OSI Model
OSI stands for Open Systems Interconnection. It was developed by the ISO – ‘International Organization for Standardization‘, in the year 1984. It is a 7-layer architecture with each layer having specific functionality to perform. All these 7 layers work collaboratively to transmit the data from one person to another across the globe. What is a Netw
10 min read
Supernetting in Network Layer
Supernetting is the opposite of Subnetting. In subnetting, a single big network is divided into multiple smaller subnetworks. In Supernetting, multiple networks are combined into a bigger network termed a Supernetwork or Supernet. In this article, we'll explore the purpose and advantages of supernetting, along with essential considerations for its
4 min read
Traceroute in Network Layer
Consider a situation when you are not able to access a website and can access other websites. You would want to know if this is a problem with your network, some intermediate network, or with the webserver. How do you figure it out? You can use Traceroute. What is a traceroute? Traceroute is a widely used command-line utility available in almost al
2 min read
Article Tags :
three90RightbarBannerImg