Network Layer
The Network Layer is the third layer of the OSI reference model. It is responsible for end-to-
end delivery of packets from the source host to the destination host across multiple
interconnected networks. This layer ensures that data reaches the correct destination efficiently,
even when the source and destination are on different networks.
1. Functions of the Network Layer
The major functions of the network layer are:
Logical addressing
Routing
Packet forwarding
Congestion control
Internetworking
Fragmentation and reassembly
2. Logical Addressing
The network layer provides logical addresses to uniquely identify devices in a network.
Logical addresses are independent of physical hardware.
In the Internet, IP addresses (IPv4 / IPv6) are used.
Logical addressing allows communication across different networks.
Example: [Link] is an IPv4 address.
3. Routing
Routing is the process of selecting the best path for packet transmission from source to
destination.
Types of Routing:
Static Routing: Routes are fixed and manually configured.
Dynamic Routing: Routes change automatically based on network conditions.
Routing Algorithms:
Distance Vector Routing
Link State Routing
Path Vector Routing
Efficient routing improves network performance and reliability.
4. Packet Forwarding
Once the route is decided, packets are forwarded from one router to another.
Each router examines the destination IP address and forwards the packet to the next
hop.
This process continues until the packet reaches its destination.
5. Connectionless and Connection-Oriented Services
Connectionless Service:
No prior connection is established.
Each packet is treated independently.
Best-effort delivery.
Example: Internet Protocol (IP)
Connection-Oriented Service:
A virtual circuit is established before data transfer.
All packets follow the same path.
Provides ordered and reliable delivery.
📌 Example: ATM, Frame Relay
6. Congestion Control
Congestion occurs when too many packets are present in the network.
Causes:
Limited bandwidth
High traffic load
Slow routers
Control Techniques:
Traffic shaping
Load shedding
Admission control
Congestion control helps reduce packet loss and delay.
7. Quality of Service (QoS)
Quality of Service ensures guaranteed performance for certain applications.
QoS Parameters:
Bandwidth
Delay
Jitter
Packet loss
QoS is important for real-time applications such as video conferencing and VoIP.
8. Internetworking
Internetworking connects multiple heterogeneous networks.
The network layer hides differences in hardware and protocols.
Routers and gateways are used for internetworking.
IP plays a major role in internetworking.
9. Fragmentation and Reassembly
Different networks support different Maximum Transmission Unit (MTU) sizes.
Large packets are fragmented into smaller packets.
Reassembly is performed at the destination.
This ensures compatibility between networks.
10. Error Handling and Control Messages
The network layer detects and reports errors.
Control messages are sent to indicate problems such as unreachable destinations.
ICMP is commonly used for error reporting.
Conclusion
The Network Layer plays a vital role in computer networks by enabling logical addressing,
routing, packet forwarding, congestion control, QoS, and internetworking. Proper
functioning of this layer ensures reliable and efficient data communication across large and
complex networks like the Internet.
Difference between IPv4 and IPv6
Feature IPv4 IPv6
IP version Internet Protocol version 4 Internet Protocol version 6
Feature IPv4 IPv6
Address length 32-bit address 128-bit address
Address space About 4.3 billion addresses About 3.4 × 10³⁸ addresses
Address format Dotted decimal notation Hexadecimal colon-separated notation
Example address [Link] 2001:0db8:85a3::8a2e:0370:7334
Address exhaustionLimited and almost exhausted Very large, practically unlimited
Header size Variable (20–60 bytes) Fixed (40 bytes)
Complex header with many
Header complexity Simplified header
fields
Configuration Manual or DHCP Auto-configuration (stateless) supported
Security IPsec optional IPsec mandatory (built-in)
Broadcast support Supports broadcast No broadcast (uses multicast and anycast)
NAT requirement NAT widely used NAT not required
Fragmentation Done by sender and routers Done only by sender
Checksum Header checksum present No header checksum
QoS support Limited QoS support Better QoS using Flow Label
Mobility support Limited Better support for mobile devices
Explain the Design Issues of the Network Layer.
Answer:
The Network Layer is responsible for end-to-end delivery of packets from the source host to
the destination host across multiple interconnected networks. The main design issues of the
network layer focus on how packets are routed, forwarded, controlled, and delivered efficiently
while maintaining reliability and quality of service.
The important design issues of the network layer are explained below:
1. Store-and-Forward Packet Switching
In packet-switched networks, data is divided into packets. Each router must receive the entire
packet, store it temporarily, and then forward it to the next router. This method allows error
checking at every hop and efficient utilization of network resources, but it introduces
transmission delay.
2. Services Provided to the Transport Layer
The network layer must decide the type of service it provides to the transport layer.
Connectionless service: No connection setup is required. Each packet is treated
independently and may follow different paths. Delivery is on a best-effort basis.
Example: Internet Protocol (IP)
Connection-oriented service: A connection is established before data transmission. All
packets follow the same route, ensuring ordered and reliable delivery.
Example: Virtual circuits in ATM and Frame Relay
3. Implementation of Connectionless Service (Datagram Networks)
In a datagram network, each packet carries the complete destination address. Routers do not
maintain any connection state information. Routing decisions are made independently for each
packet, providing high flexibility and robustness. If a router fails, packets can be rerouted
through alternate paths.
4. Implementation of Connection-Oriented Service (Virtual Circuit Networks)
In virtual circuit networks, a path is established before data transmission. Routers maintain
information about the virtual circuit. All packets follow the same path, resulting in predictable
performance and better quality of service. However, router failure can disrupt the connection.
5. Routing
Routing is the process of determining the best path from the source to the destination. Routing
algorithms must be efficient, adaptive, and scalable. They can be:
Static routing
Dynamic routing
Common routing algorithms include Distance Vector and Link State routing.
6. Congestion Control
Congestion occurs when the network becomes overloaded with packets, causing packet loss and
increased delay. The network layer uses congestion control techniques such as traffic shaping,
load shedding, and admission control to prevent congestion and maintain smooth data flow.
7. Quality of Service (QoS)
Quality of Service ensures that specific traffic receives guaranteed performance. QoS parameters
include bandwidth, delay, jitter, and packet loss. QoS is essential for real-time applications like
video conferencing, multimedia streaming, and Voice over IP (VoIP).
8. Internetworking
Internetworking involves connecting multiple heterogeneous networks. The network layer hides
differences in network technologies and provides seamless communication. Routers and
gateways play a major role in internetworking, with IP acting as the universal protocol.
9. Fragmentation and Reassembly
Different networks have different Maximum Transmission Unit (MTU) sizes. When a packet
is larger than the MTU, it is fragmented into smaller packets. Reassembly is performed at the
destination to reconstruct the original packet.
10. Error Handling and Control Messages
The network layer detects and reports errors such as unreachable destinations and time-to-live
expiration. Control protocols like ICMP are used to send error and diagnostic messages,
improving network reliability.
Conclusion
The design issues of the network layer address critical aspects such as service selection, routing,
congestion control, quality of service, internetworking, and packet handling. Proper
management of these issues ensures efficient, reliable, and scalable communication in modern
computer networks.