← All courses
Networking / Beginner

Computer Networks

Follow data across a network: from layered models and addressing to switching, routing, transport protocols, and the application services people use every day.

▤ 5 modules✓ 5 PDFs✦ 1 researched video lesson
What you’ll learn

Learning objectives

Explain the purpose of network layers and common protocols
Read basic IPv4 addressing and subnet boundaries
Differentiate switching from routing
Compare TCP and UDP and trace common application protocols
Video lesson

Learn with freeCodeCamp.org

Open on YouTube  ↗
▶

Computer Networking Fundamentals Course

freeCodeCamp.org · About 12 hours

Covers: OSI and layered networking, IPv4/subnetting, TCP/UDP, routing/switching, and common Internet protocols

Course roadmap

Learn it in 5 modules

0 of 5 completed
MODULE 01Ready to learn

Layers and the OSI model

Layering lets systems evolve one responsibility at a time. Real Internet protocols are commonly described with the TCP/IP model, which groups layers differently. Encapsulation adds headers as data moves down a stack; receiving systems remove them in reverse order.

View key idea and practice
Key idea

A network layer groups responsibilities such as physical signaling, addressing, transport, or application behavior. The OSI model is a reference framework with seven layers.

Worked example

A browser request is encoded into application data, carried by transport and Internet headers, then framed for the local link.

Try it

Describe the broad task of the network layer and the transport layer when sending a web request.

Suggested check

The network layer routes packets between networks using addresses. The transport layer provides process-to-process delivery, with TCP or UDP behavior depending on the application.

MODULE 02Ready to learn

Addresses, subnetting, and name resolution

A CIDR prefix states how many leading bits describe the network. Devices use a subnet mask and route table to decide whether a destination is local. DNS resolution happens before a client can contact a named service.

View key idea and practice
Key idea

An IP address identifies a network interface. A subnet prefix divides the address into a network portion and a host portion; DNS maps names to records such as IP addresses.

Worked example

A laptop sees a destination outside its local prefix and sends the packet to its default gateway after resolving the service name.

Try it

Explain what the prefix `/24` tells you and what a default gateway is used for.

Suggested check

A `/24` uses the first 24 address bits as the network prefix. A default gateway is the router used for destinations without a more-specific local route.

MODULE 03Ready to learn

Switching, routing, and packet paths

A host first determines the next hop, resolves a local link-layer address, and sends a frame. Routers forward packets hop by hop; each link may use different framing while the IP destination remains meaningful.

View key idea and practice
Key idea

A switch forwards frames within a local link using link-layer addresses. A router forwards packets between networks using network-layer addresses and routing information.

Worked example

In a home network, a switch connects devices on the local LAN while the wireless router forwards outbound traffic toward the internet provider.

Try it

Trace a packet from a laptop to a remote server through a home gateway, naming the roles involved.

Suggested check

The laptop sends a frame to its gateway, the gateway routes the IP packet onward, and intermediate routers select next hops until the destination network receives it.

MODULE 04Ready to learn

TCP, UDP, and transport behavior

Choose transport based on application needs. TCP suits many web and file-transfer tasks where reliable ordered delivery matters. UDP can support low-latency or application-controlled delivery, but the application must handle losses if necessary.

View key idea and practice
Key idea

TCP provides a reliable, ordered byte stream with connection setup and recovery behavior. UDP sends independent datagrams without TCP's delivery guarantees.

Worked example

A file download usually relies on TCP delivery; a live voice call may prefer low delay and tolerate an occasional lost packet.

Try it

For a time-sensitive multiplayer game update, compare TCP and UDP trade-offs without assuming one is always correct.

Suggested check

UDP avoids waiting for retransmission of stale data, which can help latency. The game must handle loss, ordering, and security as needed; some systems instead use TCP or modern secure transports.

MODULE 05Ready to learn

Application protocols and diagnostics

When diagnosing a connection, separate name resolution, transport reachability, encryption, and application response. Use authorized tools to inspect requests, status codes, and configuration rather than guessing at the layer where a failure occurred.

View key idea and practice
Key idea

An application protocol defines message formats and interactions for a service. Examples include HTTP for web transfers, DNS for name lookup, and SMTP for sending email.

Worked example

If a domain resolves but a secure web request fails, DNS may be working while the server, certificate, route, or TLS configuration still needs checking.

Try it

A user can ping an IP address but not open a domain. Name a likely first check and one follow-up.

Suggested check

Check DNS resolution for the domain. If it resolves, test the application port and inspect the browser/network error to distinguish service availability from certificate or HTTP issues.

Take it further

Study materials

5 real PDFs
Computer Networks

Course introduction

Layers and the OSI model · Addresses, subnetting, and name resolution · Switching, routing, and packet paths

8 pages55 KB
Download  ↓
Computer Networks

Beginner study notes

Layers and the OSI model · Addresses, subnetting, and name resolution · Switching, routing, and packet paths

8 pages55 KB
Download  ↓
Computer Networks

Practical examples

Layers and the OSI model · Addresses, subnetting, and name resolution · Switching, routing, and packet paths

8 pages55 KB
Download  ↓
Computer Networks

Exercises and practice questions

Layers and the OSI model · Addresses, subnetting, and name resolution · Switching, routing, and packet paths

8 pages55 KB
Download  ↓
Computer Networks

Revision summary

Layers and the OSI model · Addresses, subnetting, and name resolution · Switching, routing, and packet paths

8 pages55 KB
Download  ↓