Network Layer·Lesson 1 of 11

Network Layer

01

The Layer That Connects Networks

A single network — say, all the devices connected to your home Wi-Fi — can pass data around among its own members. But the internet is millions of separate networks joined together, and getting a message from your laptop to a server on the other side of the world means crossing many of them. The Network layer is the part of networking that makes this possible. Its whole job is to move a chunk of data, called a , from a device on one network to a device on another, however many networks lie in between.

The one-liner

The Network layer moves packets from a source device to a destination device across multiple networks. It handles two big questions: which device (addressing) and which path (routing).

🌍

The national postal network

Delivering a letter within your own street is easy — a local carrier walks it over. But sending it to another city means handing it to a national network of sorting hubs that pass it from hub to hub until it reaches the right city. The Network layer is that national network: it carries data between separate local networks, deciding the route hub by hub.

02

Where It Sits in the Stack

Networking is organized into layers, each stacked on the one below it and each with a single responsibility. The Network layer sits in the middle. Below it, the Data Link layer handles delivery across one single local link. Above it, the Transport layer manages the conversation between the two end programs. The Network layer's special role is the one neither of those covers: hopping across many networks to connect a source and a destination that aren't on the same local network.

The Network layer and its neighbours

Transport layer

End-to-end delivery between two programs

Above

Network layer

Routes packets across multiple networks

You are here

Data Link layer

Delivery over a single local link

Below
03

What the Network Layer Does

Everything the Network layer does serves that one goal — getting a packet from source to destination across networks. Its work breaks down into four main jobs:

The four core jobs

  • Logical addressing — giving every device an IP address that works across networks, so a packet knows where it's ultimately headed
    • Unlike a hardware address, an IP address isn't tied to one physical device forever
  • Routing — choosing a path from the source network to the destination network out of many possible routes
    • Done by devices called routers, using a map of known routes
  • Forwarding — the local action at each router of moving a packet from its incoming link to the correct outgoing link
  • Fragmentation — splitting a packet into smaller pieces when a link can't carry its full size, then reassembling it later
04

The Packet, and 'Best Effort'

The Network layer's unit of data is the packet. It takes the data handed down from the layer above, wraps it in a header carrying the source and destination , and sends it on its way. One thing to understand early: the Network layer promises to *try* its best to deliver each packet, but it makes no guarantee. This is called — packets can be lost, duplicated, or arrive out of order, and it's up to higher layers to notice and recover.

🚫

"The Network layer makes sure all my data arrives correctly and in order."

It doesn't. The Network layer only does best-effort delivery — it forwards packets toward the destination but makes no promises about loss or ordering. Guaranteeing complete, in-order delivery is the job of the Transport layer above it, using a protocol like TCP.

Q:What is the main responsibility of the Network layer?

A: To deliver packets from a source device to a destination device across multiple networks. It does this through logical addressing (IP addresses), routing (choosing a path), forwarding (moving packets hop by hop), and fragmentation (fitting packets to each link's size limit). Its data unit is the packet, its main protocol is IP, its device is the router, and it offers best-effort — not guaranteed — delivery.

Quick Revision Cheat Sheet

Job: Move packets from source to destination across networks

Data unit: Packet (also called a datagram)

Addressing: Logical IP address

Core tasks: Addressing, routing, forwarding, fragmentation

Main protocol: IP (Internet Protocol)

Device: Router

Delivery: Best-effort — no guarantee of arrival or order