Javatpoint Logo
Javatpoint Logo

Network Layer in OSI Model

The network layer is the third layer from the bottom of the OSI model. This layer transfers variable-length data sequences while maintaining the quality of service from source to destination and from one network to another.

Network Layer in OSI Model

This layer handles many links, and data are expressed in the form of packets. The essential function it performs is routing which means packets are transmitted from one network to another to reach the destination with the help of the routers. Routing is the process that chooses the fast and reliable shortest path for traveling data packets from one place to another, which means this layer ensures that the data packets are transmitted over the best possible route.

Functions of Network Layer in the OSI Model:

Network Layer in OSI Model
  • Internetworking: It is the process of connecting different networks by using intermediate devices such as switches, routers, gateways, and more to forward the data packets.
  • Host-to-Host delivery of data: It is also known as source-to-destination data delivery or machine-to-machine data delivery. The network layer has the responsibility of transmitting packets of data from one host to another. It makes sure that the data packets reach the correct destination system.
  • Logical Addressing: The data packets sent by the sender contain both source and destination IP addresses in the header so that the data packets can reach their desired destination without any problem. An IP address is utilized to recognize the device in the network. An IP address is a mixture of two things: Host ID and Network ID. There are many networks, hosts, machines, or servers, so adding an IP address to the header identifies the correct host the data packet should reach.
  • Routing: It is the process of choosing the best path for securely transmitting data packets from the source host to the destination host. There are many routers between the sender and receiver, and routing is done with the help of these routers. Packets of data are routed from one router to another router and then to another router based on the information available in the header and forwarding table; thus, the data packets reach the destination device. There are various routing algorithms which are protocols that are followed to transmit data packets using the routing process.
  • Fragmentation: Each node has a size capacity to receive data. The maximum capacity that a node can achieve is called the Maximum Transmission Unit (MTU). Different nodes may have different capacities. If the data size exceeds the Maximum Transmission Unit (MTU), then the data packet is broken into fragments, and the process is called fragmentation. After that, all the fragments are sent to the destination host. Fragmentation is done in the network layer by routers.
  • Packetizing: It handles the data received from the upper layer and converts it into packets to reach the destination. If the packet is segmented at the source, then the network layer must ensure that each fragment reaches the destination properly and correctly.
  • Congestion Control: If the load on the network exceeds the capacity of the network leads to congestion which can also be handled in the network layer. Congestion control is a technique used to control congestion which can be handled using the Leaky Bucket and Token Bucket algorithms. As per Leaky Bucket Algorithm, whatever the speed of the data packet from the source host, the packets are thrown into the bucket, which leaks the data at a constant rate, i.e., high traffic is converted into constant traffic with the help of the Leaky Bucket. On the other hand, according to the token bucket algorithm, tokens are thrown into a bucket at regular intervals, and if the bucket reaches its maximum capacity, it stops taking tokens. It holds all the tokens until the capacity is reached, queues up the tokens, and sends them to the destination.

Protocols of the network layer

However, there are many protocols that are used by the network layer to perform its task properly, and we will discuss some of the protocols below:

  • IGMP: It is an abbreviation for Internet Group Management Protocol. It is used to set up multicasting on a network. In other words, we can say that it allows devices to join a multicasting group so that all the devices can receive the same data. It can be utilized for many networking applications, such as online gaming and video streaming.
  • ICMP: It is an abbreviation for Internet Control Message Protocol. It sends a message to the sender if something unexpected happens during data processing. Hosts, routers, and other network devices use this protocol to communicate about errors and then update hosts, routers, and other network devices.
  • ARP: It is an abbreviation for Address Resolution Protocol. Its job is to resolve the IP address to the MAC address. It is important to know the IP address and MAC address of the devices for the purpose of communication. If you know the IP address of the device but do not know the MAC address, then ARP helps to find the MAC address for proper communication.
  • DHCP: It is an abbreviation for Dynamic Host Configuration Protocol. Making the device accessible to the internet requires the device to be allotted an IP address which can be done manually or automatically with the help of a network administrator. network administrator. If there are too many devices, then the network administrator configures a special host called a DHCP server that automatically assigns IP addresses to all the hosts in the network so that they can communicate with each other.
  • OSPF: It is an abbreviation for Open Shortest Path First. It is called an (IGRP) Interior Gateway Routing Protocol. OSPF observes the situation of all network connections and automatically determines the shortest path for routing data packets. It operates within a single AS (Autonomous System). It utilizes the link state routing or the shortest path first algorithm.
  • BGP: It is an abbreviation for Border Gateway Protocol. It is an external gateway routing protocol, and the job of this protocol is to route the data over the internet to the destination in a fast and efficient manner. Autonomous systems are linked to each other with the help of BGP.

Conclusion

  • This article gave you information about the network layer in the OSI model. This layer is responsible for sending data packets from one host to another.
  • The network layer in the OSI model performs many functions, such as internetworking, host-to-host delivery of data, logical addressing, routing, fragmentation, packetizing, and congestion control.
  • The major role of the network layer is to convert the data received from the upper layer into data packets and transfer them using the best route to the destination system without any data loss.
  • You have studied protocols of network layer like Internet Group Management Protocol (IGMP), Internet Control Message Protocol (ICMP), Address Resolution Protocol (ARP), Dynamic Host Configuration Protocol (DHCP), Open Shortest Path First (OSPF). and Border Gateway Protocol (BGP).






Youtube For Videos Join Our Youtube Channel: Join Now

Feedback


Help Others, Please Share

facebook twitter pinterest

Learn Latest Tutorials


Preparation


Trending Technologies


B.Tech / MCA