Introduction to Network Layer
The Network Layer manages source-to-destination packet delivery, ensuring data finds its way across complex, interconnected networks.
Purpose of Network Layer
While the Data Link Layer handles delivery between two adjacent nodes, the Network Layer is responsible for the host-to-host delivery of a packet across multiple links.
Source-to-Destination Delivery
Network Layer Services
Logical Addressing
Provides unique addresses (logical) to distinguish between source and destination systems regardless of the physical link.
Routing
Determines the best route for packets among multiple networks using routers or switches to select the most efficient path.
Packetizing
Encapsulates payloads into packets (IP datagrams) with headers containing addressing and control information.
Error Control
Uses checksums to check for header corruption and utilizes ICMP for reporting delivery failures.
Congestion Control
Manages network congestion, particularly when data flow exceeds the capacity of a router or a specific network segment.
Flow Control
Not provided directly by the network layer; the receiver's task is usually straightforward as packets arrive individually.
Logical vs. Physical Addressing
Understanding the difference between layer 2 and layer 3 addresses is fundamental to network communication.
| Feature | Physical (MAC) | Logical (IP) |
|---|---|---|
| Scope | Delivery within the same local link. | End-to-end delivery across multiple networks. |
| Assignment | Burned into the NIC (Permanent). | Assigned by software (Changeable). |
| Identity | Identifies the specific device. | Identifies the network connection. |
| Example | 00:1A:2B:3C:4D:5E | 192.168.1.1 |
Packet Encapsulation
As data moves down the OSI stacks, each layer adds its own control information. The Network Layer creates the IP Datagram.
- Takes a Segment from the Transport Layer.
- Adds L3 Header (Source IP, Dest IP, TTL, etc.).
- Passes the Packet to the Data Link Layer.