Skip to content
geeksforgeeks
  • Tutorials
    • Python
    • Java
    • Data Structures & Algorithms
    • ML & Data Science
    • Interview Corner
    • Programming Languages
    • Web Development
    • CS Subjects
    • DevOps And Linux
    • School Learning
    • Practice Coding Problems
  • Courses
    • DSA to Development
    • Get IBM Certification
    • Newly Launched!
      • Master Django Framework
      • Become AWS Certified
    • For Working Professionals
      • Interview 101: DSA & System Design
      • Data Science Training Program
      • JAVA Backend Development (Live)
      • DevOps Engineering (LIVE)
      • Data Structures & Algorithms in Python
    • For Students
      • Placement Preparation Course
      • Data Science (Live)
      • Data Structure & Algorithm-Self Paced (C++/JAVA)
      • Master Competitive Programming (Live)
      • Full Stack Development with React & Node JS (Live)
    • Full Stack Development
    • Data Science Program
    • All Courses
  • Aptitude
  • Engineering Mathematics
  • Discrete Mathematics
  • Operating System
  • DBMS
  • Computer Networks
  • Digital Logic and Design
  • C Programming
  • Data Structures
  • Algorithms
  • Theory of Computation
  • Compiler Design
  • Computer Org and Architecture
Open In App
Next Article:
Transport Layer responsibilities
Next article icon

Network Layer Services

Last Updated : 27 Jan, 2025
Comments
Improve
Suggest changes
Like Article
Like
Report

The network layer is a part of the communication process in computer networks. Its main job is to move data packets between different networks. It helps route these packets from the sender to the receiver across multiple paths and networks. Network-to-network connections enable the Internet to function. These connections happen at thenetwork layer which sends data packets between different networks. In the 7-layer OSI model, the network layer is layer 3. The Internet Protocol (IP) is a key protocol used at this layer, along with other protocols for routing, testing, and encryption.

Services Offered by Network Layer

The services which are offered by the network layer are as follows: 

1. Assigning Logical Address

Logical addressing is the process of assigning unique IP addresses (IPv4 or IPv6) to devices within a network. Unlike physical addresses (MAC addresses), logical addresses can change based on network configurations. These addresses are hierarchical and help identify both the network and the device within that network. Logical addressing is important for:

  • Enabling communication between devices on different networks.
  • Facilitating routing by providing location-based information.

2. Packetizing

The process of encapsulating the data received from the upper layers of the network (also called payload) in a network layer packet at the source and decapsulating the payload from the network layer packet at the destination is known as packetizing. 

The source host adds a header that contains the source and destination address and some other relevant information required by the network layer protocol to the payload received from the upper layer protocol and delivers the packet to the data link layer. 

The destination host receives the network layer packet from its data link layer, decapsulates the packet, and delivers the payload to the corresponding upper layer protocol. The routers in the path are not allowed to change either the source or the destination address. The routers in the path are not allowed to decapsulate the packets they receive unless they need to be fragmented.  

3. Host-to-Host Delivery

The network layer ensures data is transferred from the source device (host) to the destination device (host) across one or multiple networks. This involves:

  • Determining the destination address.
  • Ensuring that data is transmitted without duplication or corruption.

Host-to-host delivery is a foundational aspect of communication in large-scale, interconnected systems like the internet.

4. Forwarding

Forwarding is the process of transferring packets between network devices such as routers, which are responsible for directing the packets toward their destination. When a router receives a packet from one of its attached networks, it needs to forward the packet to another attached network (unicast routing) or to some attached networks (in the case of multicast routing).The router uses:

  • Routing tables: These tables store information about possible paths to different networks.
  • Forwarding decisions: Based on the destination IP address in the packet header. Forwarding ensures that packets move closer to their destination efficiently.

5. Fragmentation and Reassembly of Packets

Some networks have a maximum transmission unit (MTU) that defines the largest packet size they can handle. If a packet exceeds the MTU, the network layer:

  • Fragments the packet into smaller pieces.
  • Adds headers to each fragment for identification and sequencing. At the destination, the fragments are reassembled into the original packet. This ensures compatibility with networks of varying capabilities without data loss.

Read more about Fragmentation at Network Layer.

6. Logical Subnetting

Logical subnetting involves dividing a large IP network into smaller, more manageable sub-networks (subnets). Subnetting helps:

  • Improve network performance by reducing congestion.
  • Enhance security by isolating parts of a network.
  • Simplify network management and troubleshooting. Subnetting uses subnet masks to define the range of IP addresses within each subnet, enabling efficient address allocation and routing.

7. Network Address Translation (NAT)

NAT allows multiple devices in a private network to share a single public IP address for internet access. This is achieved by:

  • Translating private IP addresses to a public IP address for outbound traffic.
  • Reversing the process for inbound traffic. Benefits of NAT include:
  • Conserving IPv4 addresses by reducing the need for unique public IPs for each device.
  • Enhancing security by masking internal IP addresses from external networks.

8. Routing

Routing is the process of moving data from one device to another device. These are two other services offered by the network layer. In a network, there are a number of routes available from the source to the destination. The network layer specifies some strategies which find out the best possible route. This process is referred to as routing. There are a number of routing protocols that are used in this process and they should be run to help the routers coordinate with each other and help in establishing communication throughout the network.

Advantages of Network Layer Services

  • Packetization service in the network layer provides ease of transportation of the data packets.
  • Packetization also eliminates single points of failure in data communication systems.
  • Routers present in the network layer reduce network traffic by creating collision and broadcast domains.
  • With the help of Forwarding, data packets are transferred from one place to another in the network.

Disadvantages of Network Layer Services

  • There is a lack of flow control in the design of the network layer.
  • Congestion occurs sometimes due to the presence of too many datagrams in a network that is beyond the capacity of the network or the routers. Due to this, some routers may drop some of the datagrams, and some important pieces of information may be lost.
  • Although indirect error control is present in the network layer, there is a lack of proper error control mechanisms as due to the presence of fragmented data packets, error control becomes difficult to implement.

Next Article
Transport Layer responsibilities

A

aman1699
Improve
Article Tags :
  • Computer Networks
  • GATE CS
  • Computer Networks-Network Layer
  • Network Layer

Similar Reads

    Data Communication Tutorial
    Data communication plays an important role in today's interconnected world and enables the exchange of information between devices and networks. Whether you're sending an email, making a video call, or browsing the web, data communication ensures that information flows smoothly. This Data Communicat
    5 min read

    Basics of Data Communication

    Data Communication - Definition, Components, Types, Channels
    Transferring data over a transmission medium between two or more devices, systems, or places is known as data communication. Nowadays, computing and telecommunications depend heavily on this data transmission, which makes a variety of applications conceivable, including email, video chatting, the In
    7 min read
    Types of Computer Networks
    A computer network is a system that connects many independent computers to share information (data) and resources. The integration of computers and other different devices allows users to communicate more easily. It is a collection of two or more computer systems that are linked together. A network
    11 min read
    Transmission Modes in Computer Networks (Simplex, Half-Duplex and Full-Duplex)
    Transmission modes also known as communication modes, are methods of transferring data between devices on buses and networks designed to facilitate communication. They are classified into three types: Simplex Mode, Half-Duplex Mode, and Full-Duplex Mode. In this article, we will discuss Transmission
    6 min read
    Difference Between Serial and Parallel Transmission
    Data transmission is how computers and other devices send information to each other. There are two main ways to do this Serial and Parallel Transmission. In Serial Transmission, data is sent one bit at a time like sending a single line of people through a door. In Parallel Transmission data is sent
    4 min read
    How Data Encapsulation and De-encapsulation Works?
    Data encapsulation and de-encapsulation are fundamental concepts in computer networking and communication protocols. These processes are essential for transferring data across networks efficiently and securely. What is Data Encapsulation?Encapsulation is the process of adding additional information
    4 min read

    OSI Model

    Network Layer Services
    The network layer is a part of the communication process in computer networks. Its main job is to move data packets between different networks. It helps route these packets from the sender to the receiver across multiple paths and networks. Network-to-network connections enable the Internet to funct
    6 min read
    Transport Layer responsibilities
    The transport Layer is the second layer in the TCP/IP model and the fourth layer in the OSI model. It is an end-to-end layer used to deliver messages to a host. It is termed an end-to-end layer because it provides a point-to-point connection rather than hop-to-hop, between the source host and destin
    5 min read
    TCP/IP Model
    The TCP/IP model (Transmission Control Protocol/Internet Protocol) is a four-layer networking framework that enables reliable communication between devices over interconnected networks. It provides a standardized set of protocols for transmitting data across interconnected networks, ensuring efficie
    7 min read

    Data and Signals

    Frequency Domain Filters and its Types
    Frequency Domain Filters are used for smoothing and sharpening of image by removal of high or low frequency components. Sometimes it is possible of removal of very high and very low frequency. Frequency domain filters are different from spatial domain filters as it basically focuses on the frequency
    2 min read
    Difference Between Bit Rate and Baud Rate
    Both Bit rate and Baud rate are generally used in data communication to measure the speed of data. Bit rate refers to the number of bits transmitted per second in a communication system, while baud rate refers to the number of signal units or symbols transmitted per second. In some cases, multiple b
    3 min read

    Transmission of Signals

    Transmission Impairment in Data Communication
    In communication system, analog signals travel through transmission media, which tends to deteriorate the quality of analog signal, which means that the signal at the beginning of the medium is not the same as the signal at the end of the medium. The imperfection causes signal impairment. Below are
    3 min read
    What is Bandwidth? Definition, Working, Importance, Uses
    Pre-Requisite: Introduction to Bandwidth Network bandwidth is the maximum capacity of a wired or wireless communications link to deliver data via a network connection in a given amount of time. Bandwidth is typically defined as the number of bits, kilobits, megabits, or gigabits that may be sent in
    8 min read
    Digital To Digital Conversion in Computer Network
    In this article we will be discussing about digital-to-digital transmission in computer network i.e., how a digital data or information is converted into digital signal. The digital-to-digital encoding can be done by a technique called line coding. Line CodingThe process of converting the digital da
    5 min read
    Line Coding
    The process of converting binary data into a sequence of bits of the digital signal is known as Line coding. It is also known as digital PAM formats. Need of Line coding: We always come across different types of data such as text, numbers, graphical images, audio, and video. These all data are store
    2 min read
    Analog to Digital Conversion
    Digital Signal: A digital signal is a signal that represents data as a sequence of discrete values; at any given time it can only take on one of a finite number of values. Analog Signal: An analog signal is any continuous signal for which the time varying feature of the signal is a representation of
    6 min read
    Digital to Analog Conversion
    Digital Signal - A digital signal is a signal that represents data as a sequence of discrete values; at any given time it can only take on one of a finite number of values. Analog Signal - An analog signal is any continuous signal for which the time varying feature of the signal is a representation
    3 min read
    Quadrature Amplitude Modulation
    Quadrature Amplitude Modulation (QAM) is a modulation technique that can be utilized in Analog modulation concepts and digital modulation concepts. It is a combination of ASK and PSK. So, in this article, we will discuss QAM, Analog QAM, Digital QAM, and many more. Quadrature Amplitude Modulation:Qu
    5 min read
    Analog to Analog Conversion (Modulation)
    Analog Signal: An analog signal is any continuous signal for which the time varying feature of the signal is a representation of some other time varying quantity i.e., analogous to another time varying Signal. Analog to Analog Conversion - Analog-to-analog conversion, or modulation, is the represent
    3 min read
    What is Modulation?
    Modulation can be digital or analog, the input wave of the analog signal varies continuously like a sine wave. Modulation can be defined as the process of converting data into waves by adding information to a carrier signal. Such a signal can be transmitted electronically or optically, but it must h
    6 min read

    Multiplexing

    Multiplexing (Channel Sharing) in Computer Network
    Multiplexing means multiple sources but one link. An alternative approach is a Direct point-to-point connection, but it has several problems as it requires an I/O port for each device, a need line for each device, and also a large amount of wiring needed if on different floors. Instead, if we use a
    9 min read
    Types of Multiplexing in Data Communications
    Imagine you have several friends who all want to send letters to the same person at the same time. Instead of sending each letter individually, which would take a lot of time and effort, you put all the letters into one big envelope and send that. When the big envelope arrives, the letters are taken
    6 min read
    Frequency Division and Time division multiplexing
    Multiplexing is used in cases where the signals of lower bandwidth and the transmitting media is having higher bandwidth. In this case, the possibility of sending a number of signals is more. In this, the signals are combined into one and are sent over a link that has greater bandwidth of media than
    4 min read

    Transmission Media

    Types of Transmission Media
    Transmission media is the physical medium through which data is transmitted from one device to another within a network. These media can be wired or wireless. The choice of medium depends on factors like distance, speed, and interference. In this article, we will discuss the transmission media. In t
    9 min read
    Twisted-pair Cable
    Twisted-pair Cable is a transmission media. Transmission media refers to the physical path or medium used to transmit data between devices. It can be divided into two parts: Guided Media and Unguided Media. In guided media, the signal is contained within the physical limits of the transmission mediu
    4 min read
    What is Coaxial Cable ?
    Coaxial cable is typically used by cable operators, telephone companies, and internet providers to transmit data, video, and voice communications to customers. Its installation and implementation are easy but it is less efficient than optical fiber also it provides moderately low bandwidth in compar
    6 min read
    Fiber Optics and Types
    Fiber Optics or Optical Fiber is a technology that transmits data as a light pulse along a glass or plastic fiber. An Optical Fiber is a cylindrical fiber of glass that is hair-thin in size or any transparent dielectric medium. The fiber which is used for optical communication is waveguides made of
    6 min read
    Difference between Twisted pair cable, Co-axial cable and Optical fiber cable
    A computer cable is a medium used to transmit data between devices such as computers, servers, routers, and switches. Cables physically connect these devices, enabling them to communicate within a network. In computer networking, it is very important to know the distinctions between the different ty
    8 min read
    Radio Waves
    Radio waves are a special type of energy that travels through space, carrying information without needing wires. They have the longest wavelengths in the electromagnetic spectrum, meaning they stretch out much farther than other waves like visible light or X-rays. These waves can be incredibly long,
    9 min read
    Infrared light for Transmission
    Infrared light for Transmission :Infrared is the frequency of light that is not visible to the eyes .The frequency of the waves lies between three hundred gigacycles to four hundred THz. In this, the radiation is in the region of the electromagnetic spectrum . Infrared could be a communication mediu
    3 min read
    Difference between Guided and Unguided Media
    Network media or transmission media refer to the physical pathways through which data is transmitted from one device to another within a network. These ways can be wired or wireless. The selection of media depends on factors like distance, speed, and interference. In this article, we will discuss th
    4 min read

    Error Detection and Correction

    Error Detection in Computer Networks
    Error is a condition when the receiver's information does not match the sender's. Digital signals suffer from noise during transmission that can introduce errors in the binary bits traveling from sender to receiver. That means a 0 bit may change to 1 or a 1 bit may change to 0. Data (Implemented eit
    7 min read
    Forward Error Correction in Computer Networks
    Forward Error Correction (FEC) is a technique used to minimize errors in data transmission over communication channels. In real-time multimedia transmission, re-transmission of corrupted and lost packets is not useful because it creates an unacceptable delay in reproducing : one needs to wait until
    3 min read
    Vertical Redundancy Check (VRC) or Parity Check
    Vertical Redundancy Check is also known as Parity Check. In this method, a redundant bit also called parity bit is added to each data unit. This method includes even parity and odd parity. Even parity means the total number of 1s in data is to be even and odd parity means the total number of 1s in d
    3 min read
    Longitudinal Redundancy Check (LRC)/2-D Parity Check
    Longitudinal Redundancy Check (LRC) is also known as 2-D parity check. In this method, data which the user want to send is organised into tables of rows and columns. A block of bit is divided into table or matrix of rows and columns. In order to detect an error, a redundant bit is added to the whole
    2 min read
    Hamming Code in Computer Network
    Hamming code is an error-correcting code used to ensure data accuracy during transmission or storage. Hamming code detects and corrects the errors that can occur when the data is moved or stored from the sender to the receiver. This simple and effective method helps improve the reliability of commun
    10 min read
    Concepts of hamming distance
    Hamming Distance Problem: In general, it is assumed that it is more likely to have fewer errors than more errors. This “worst-case” approach to coding is intuitively appealing within itself. Nevertheless, it is closely connected to a simple probabilistic model where errors are introduced into the me
    2 min read
    Error Detection Code - Checksum
    Checksum is the error detection method used by upper-layer protocols and is considered to be more reliable than Longitudinal Redundancy Check (LRC), Vertical Redundancy Check (VRC), and Cyclic Redundancy Check (CRC). This method uses a Checksum Generator on the sender side and a Checksum Checker on
    4 min read

    Channelization

    Frequency Division Multiple Access (FDMA) Techniques
    In Frequency-Division Multiple Access the channel bandwidth is subdivided into a variety of sub-channels. FDMA is used for voice and data transmission. During this method the general channel bandwidth is shared by multiple users, therefore a variety of users can transmit their data simultaneously. N
    5 min read
    CDMA Full Form
    CDMA stands for Code Division Multiple Access. It is basically a channel access method and is also an example of multiple access. Multiple access basically means that information by several transmitters can be sent simultaneously onto a single communication channel. There are multiple users which ar
    4 min read
    What is Ethernet?
    A LAN is a data communication network connecting various terminals or computers within a building or limited geographical area. The connection between the devices could be wired or wireless. Although Ethernet has been largely replaced by wireless networks, wired networking still uses Ethernet more f
    9 min read
    Bridges (local Internetworking device)
    Prerequisites - Network Devices, Types of switches Bridge is a local internetworking device that is used to connect two or more network segments together. A bridge operates at the Data Link Layer (Layer 2) of the OSI model and uses the MAC addresses of devices to make forwarding decisions. Bridges w
    6 min read
    Introduction of Gigabit Ethernet
    The committee began working on a faster Ethernet, quickly dubbed gigabit Ethernet. The goal was to increase performance while maintaining all Ethernet standards. Gigabit Ethernet had to provide service with both unicast and broadcast using the same 48-bit address scheme and also maintaining the same
    3 min read
geeksforgeeks-footer-logo
Corporate & Communications Address:
A-143, 7th Floor, Sovereign Corporate Tower, Sector- 136, Noida, Uttar Pradesh (201305)
Registered Address:
K 061, Tower K, Gulshan Vivante Apartment, Sector 137, Noida, Gautam Buddh Nagar, Uttar Pradesh, 201305
GFG App on Play Store GFG App on App Store
Advertise with us
  • Company
  • About Us
  • Legal
  • Privacy Policy
  • In Media
  • Contact Us
  • Advertise with us
  • GFG Corporate Solution
  • Placement Training Program
  • Languages
  • Python
  • Java
  • C++
  • PHP
  • GoLang
  • SQL
  • R Language
  • Android Tutorial
  • Tutorials Archive
  • DSA
  • Data Structures
  • Algorithms
  • DSA for Beginners
  • Basic DSA Problems
  • DSA Roadmap
  • Top 100 DSA Interview Problems
  • DSA Roadmap by Sandeep Jain
  • All Cheat Sheets
  • Data Science & ML
  • Data Science With Python
  • Data Science For Beginner
  • Machine Learning
  • ML Maths
  • Data Visualisation
  • Pandas
  • NumPy
  • NLP
  • Deep Learning
  • Web Technologies
  • HTML
  • CSS
  • JavaScript
  • TypeScript
  • ReactJS
  • NextJS
  • Bootstrap
  • Web Design
  • Python Tutorial
  • Python Programming Examples
  • Python Projects
  • Python Tkinter
  • Python Web Scraping
  • OpenCV Tutorial
  • Python Interview Question
  • Django
  • Computer Science
  • Operating Systems
  • Computer Network
  • Database Management System
  • Software Engineering
  • Digital Logic Design
  • Engineering Maths
  • Software Development
  • Software Testing
  • DevOps
  • Git
  • Linux
  • AWS
  • Docker
  • Kubernetes
  • Azure
  • GCP
  • DevOps Roadmap
  • System Design
  • High Level Design
  • Low Level Design
  • UML Diagrams
  • Interview Guide
  • Design Patterns
  • OOAD
  • System Design Bootcamp
  • Interview Questions
  • Inteview Preparation
  • Competitive Programming
  • Top DS or Algo for CP
  • Company-Wise Recruitment Process
  • Company-Wise Preparation
  • Aptitude Preparation
  • Puzzles
  • School Subjects
  • Mathematics
  • Physics
  • Chemistry
  • Biology
  • Social Science
  • English Grammar
  • Commerce
  • World GK
  • GeeksforGeeks Videos
  • DSA
  • Python
  • Java
  • C++
  • Web Development
  • Data Science
  • CS Subjects
@GeeksforGeeks, Sanchhaya Education Private Limited, All rights reserved
We use cookies to ensure you have the best browsing experience on our website. By using our site, you acknowledge that you have read and understood our Cookie Policy & Privacy Policy
Lightbox
Improvement
Suggest Changes
Help us improve. Share your suggestions to enhance the article. Contribute your expertise and make a difference in the GeeksforGeeks portal.
geeksforgeeks-suggest-icon
Create Improvement
Enhance the article with your expertise. Contribute to the GeeksforGeeks community and help create better learning resources for all.
geeksforgeeks-improvement-icon
Suggest Changes
min 4 words, max Words Limit:1000

Thank You!

Your suggestions are valuable to us.

What kind of Experience do you want to share?

Interview Experiences
Admission Experiences
Career Journeys
Work Experiences
Campus Experiences
Competitive Exam Experiences