Network Layer
Network Layer
Network Layer
Introduction
Maintain the quality of data and pass and transmit data from source to its
destination.
Handles routing.
choosing best bath for data to transfer, not just for packets.
Routing
Numerous routers are used to find out the best and safest route to
transmit the data packets. Various routing algorithms are used to
determine the best path, like link state routing, Distance Vector
Routing, Flooding, Random Walk etc.
Network Layer 1
there are multiple routers between the sender and the receiver, so the
data packets are routed by using all these available routers.
Logical Addressing
The sender and receiver’s IP addresses are placed in the header by the
network layer.
There are two part in an IP address, a Host ID and Network ID, using the
Host ID it can be confirmed that the packets were sent by the
authorized sender and it has successfully reached the desired receiver.
Host-to-Host delivery
logical subnetting
Each node has a limit on the size of data it can receive, called the
Maximum Transmission Unit (MTU). If a data packet is too large, it is
broken into smaller pieces (fragmented) to fit the MTU. These smaller
packets are sent to the receiver, where they are reassembled in the
correct order to recreate the original data. Routers handle the
fragmentation process.
error handling
It can detect issues, correct errors, and resend packets that are either
incorrect or didn’t reach the receiver.
Network Layer 2
congestion control
Leaky Bucket: Data enters the bucket at any speed but leaves at a
steady, controlled rate to reduce congestion.
Token Bucket: Tokens are added to the bucket over time, and only
data with available tokens is sent, ensuring a controlled flow.
Encapsulates the data received from transport layer and also adds
important header parts to packets, and it is decapsulated at receiver’s
side.
IP
IPsec
Network Layer 3
Layer and is used to create secure virtual private networks (VPNs) and
protect data transmitted over public networks. IPsec can encrypt data
to ensure confidentiality and use protocols like AH (Authentication
Header) and ESP (Encapsulating Security Payload) to verify the
authenticity and integrity of the data being sent.
ICMP
ARP
Summary
The Network Layer is the third layer of the OSI model responsible for routing
data packets between devices across networks. It determines the best paths
for data transmission, adds source and destination addresses to packets, and
manages traffic to prevent congestion. Additionally, it handles error detection
and can retransmit packets if necessary. Overall, the Network Layer ensures
efficient and reliable data delivery across the network.
Network Layer 4