The Network and Transport Layers
Understand how addressing and reliable delivery move data across networks.
The Network and Transport Layers is a free Network+ Academy lesson on CoddyKit — lesson 3 of 4. You can read the complete lesson below for free — then practise it hands-on in the browser with a built-in code editor and a 24/7 AI tutor. It is part of the Network+ Academy learning path, one of 4 lessons in the course, and your progress syncs across the web and the CoddyKit app.
The Middle Layers
Above the local-only data link layer sit two layers that make wider communication possible. Layer 3 is the network layer and Layer 4 is the transport layer. The network layer moves data between separate networks using logical addresses, while the transport layer manages the conversation between applications, including reliability. Together they carry data across the internet and deliver it to the right program.
Layer 3: Network
The network layer handles logical addressing and routing, choosing paths so data can travel across multiple networks. Its star is the IP address (Internet Protocol), a logical address that identifies a device anywhere on the internet, unlike a local MAC address. The network layer is where the journey from one network to a distant one is planned and directed.
IP Addresses
An IP address is a logical, hierarchical address that can be routed across the internet. Because it is structured, routers can use parts of it to decide direction, like reading a postal code. IP addresses can be assigned and changed, unlike fixed MAC addresses. This logical addressing is what lets a packet find a server on the other side of the world.
Routers Live Here
Routers are the key devices at Layer 3. A router reads the destination IP address of each packet and forwards it toward the correct network, hop by hop. Routers connect different networks together, which is why your home router joins your LAN to the internet. Whenever data must cross from one network to another, a Layer 3 router makes the decision.
Packets
The network layer unit is the packet. A packet wraps the transport-layer data with an IP header containing the source and destination IP addresses. Routers read this header to route the packet. Unlike a frame, a packet is built to travel across many networks, keeping the same IP addresses end to end even as the local frames around it change at each hop.
Layer 4: Transport
The transport layer manages end-to-end communication between applications. It breaks data into segments, can ensure reliable delivery, and uses port numbers to direct data to the right program. While Layer 3 gets packets to the right device, Layer 4 makes sure they reach the right application on that device and arrive correctly.
TCP for Reliability
TCP (Transmission Control Protocol) is the reliable transport protocol. It sets up a connection, numbers segments, confirms delivery with acknowledgments, and resends anything lost. TCP guarantees data arrives complete and in order, which is ideal for web pages, email, and file transfers. The trade-off is some extra overhead from all that careful tracking.
UDP for Speed
UDP (User Datagram Protocol) is the fast, lightweight transport protocol. It sends data without connections, acknowledgments, or guaranteed order. This makes UDP quick and efficient, ideal for live video, voice calls, and gaming, where speed matters more than resending a lost packet. UDP trades reliability for low overhead and minimal delay.
Ports Direct Traffic
Port numbers let one device run many network applications at once. Each service listens on a port, such as 80 for web traffic or 443 for secure web traffic. The transport layer uses ports to deliver incoming data to the correct application. Without ports, a device could not tell whether arriving data was for the browser, email, or a game.
How They Work Together
Together these layers form the core of internet delivery. The network layer uses IP addresses and routers to deliver a packet to the right device across many networks. The transport layer then uses ports and TCP or UDP to deliver the data to the right application reliably or quickly. Layer 3 finds the device; Layer 4 finds the program.
The Big Picture
Layer 3, the network layer, handles logical IP addressing and routing through routers, moving packets between networks. Layer 4, the transport layer, manages end-to-end delivery with ports and chooses between reliable TCP and fast UDP. These middle layers are why data can cross the global internet and still arrive at exactly the right application.
Quick Check
Which layer uses IP addresses and routers to move data between separate networks?
Recap
The network layer (Layer 3) uses logical IP addresses and routers to route packets between separate networks. The transport layer (Layer 4) manages end-to-end delivery, using port numbers to reach the right application and choosing TCP for reliable, ordered delivery or UDP for fast, lightweight transfer. Layer 3 finds the device; Layer 4 finds the program. Together they carry data across the internet.
Frequently asked questions
Is the “The Network and Transport Layers” lesson free?
Yes — the full text of “The Network and Transport Layers” is free to read here on the web, and the Network+ Academy course includes 4 lessons in total. To practise it interactively (a built-in code editor and a 24/7 AI tutor) and unlock the rest of the Network+ Academy course, upgrade to CoddyKit PRO.
What will I learn in “The Network and Transport Layers”?
Understand how addressing and reliable delivery move data across networks. You practise Network+ Academy with hands-on code you run directly in the browser, and a 24/7 AI tutor answers your questions as you work through the lesson.
Do I need any experience to start Network+ Academy?
No prior experience is required. Network+ Academy on CoddyKit is structured for beginners through advanced learners; this is — lesson 3 of 4, so you can start here or from the beginning and move at your own pace.
How long does the “The Network and Transport Layers” lesson take?
Most CoddyKit lessons take about 5–10 minutes. Each one is bite-sized and interactive, so you make steady progress and pick up exactly where you left off across the web and the app.
Can I write and run code in this Network+ Academy lesson?
Yes. Every Network+ Academy lesson includes a built-in code editor, so you write and run real code right in your browser and get instant AI feedback — no local setup required.
All lessons in this course
- Why a Layered Model Helps
- The Physical and Data Link Layers
- The Network and Transport Layers
- Session, Presentation, and Application Layers