cd ~/tutorials/network

Network Tutorial

Learn computer networking from zero: how devices, cables and Wi-Fi move bits, the OSI and TCP/IP models, Ethernet, VLANs, IPv4, subnetting, IPv6, ARP, DHCP, routing, NAT, TCP, UDP, QUIC, TLS, DNS, HTTP, mail and file protocols, QoS, network security, wireless and modern networking, plus a troubleshooting playbook you can run on any machine.

24 lessons · 161 min

Start the course →

This course takes you from “what is a network?” to reading a packet capture and fixing a broken connection with confidence. It follows the classic path through the layers, from the cable up to the application, but every idea is tied to something you can see on your own machine: a command, its real output and what that output tells you.

Every lesson has commands for Linux (and Windows where it differs), worked examples with real numbers, three short exercises to check what you learned and answers to the questions people ask most. The examples use the address ranges reserved for documentation (192.0.2.0/24, 198.51.100.0/24, 203.0.113.0/24 and 2001:db8::/32), so nothing you copy will hit a real network by accident.

Before you start: you need a terminal. If commands like cd, ls and sudo are new to you, take the first lessons of the Linux Tutorial first. Most commands come from the iproute2, dnsutils (or bind-utils), tcpdump, traceroute and curl packages, which every distribution ships.

Keep the Network Cheatsheet open in another tab while you work through the lessons: it collects every command used here, grouped by task. When you are done, the Kubernetes Tutorial shows how the same ideas (IP addresses, DNS, load balancing, firewalls) work inside a cluster.

ls ./lessons

  1. Introduction to Computer NetworksWhat a network is, the parts every network has, how data travels as packets, the PAN, LAN, MAN and WAN scales, how the internet is stitched together, and the first commands to see your own network.beginner6 min readCompleted
  2. Network DevicesWhat each box in a network does and at which layer it works: network cards, repeaters, hubs, bridges, switches, routers, access points, modems, gateways, firewalls and load balancers, and how to see them from the command line.beginner6 min readCompleted
  3. The OSI and TCP/IP ModelsWhy networks are built in layers, the seven OSI layers and the four TCP/IP layers, what each one adds, how encapsulation wraps data into segments, packets and frames, and how to watch the layers in a real capture.beginner5 min readCompleted
  4. The Physical LayerHow bits become signals: topologies (bus, star, ring, mesh, tree, hybrid), simplex, half and full duplex, guided media (twisted pair, coax, fiber) and wireless media, Ethernet speeds and cable categories, and how to check a link with ethtool.beginner6 min readCompleted
  5. The Data Link LayerHow layer 2 delivers frames on one link: MAC addresses, the Ethernet frame, framing, MTU, error detection with parity, checksums and CRC, error correction with Hamming codes, flow control, stop-and-wait, Go-Back-N, Selective Repeat and piggybacking.intermediate7 min readCompleted
  6. Switching, VLANs and Link AggregationCircuit, message and packet switching, how an Ethernet switch forwards frames, broadcast domains, VLANs with 802.1Q tags, access and trunk ports, inter-VLAN routing, Spanning Tree, and bonding links with LACP, with Linux commands for each.intermediate7 min readCompleted
  7. IPv4 AddressingHow a 32-bit IPv4 address is built, the network and host parts, classful addressing (A to E) and why it was replaced by CIDR, public, private and special ranges, the IPv4 header field by field, TTL and fragmentation.beginner6 min readCompleted
  8. SubnettingSubnet masks and prefix lengths, the block-size shortcut for finding network, broadcast and host addresses in your head, splitting a network into equal subnets, VLSM for subnets of different sizes, supernetting and route summarization, /31 and /32, and checking your math with Python.intermediate5 min readCompleted
  9. IPv6Why IPv6 exists and how it differs from IPv4: 128-bit addresses and how to shorten them, global, link-local, unique local and multicast addresses, the /64 rule and site prefixes, the simpler header, SLAAC, DHCPv6, Neighbor Discovery, and running dual stack.intermediate6 min readCompleted
  10. ARP, DHCP, ICMP and IGMPThe helper protocols that make IP work on a real LAN: ARP and the ARP cache, gratuitous ARP and spoofing, RARP's history, DHCP's DORA exchange, leases, reservations and relays, ICMP message types behind ping and traceroute, and IGMP for multicast.intermediate7 min readCompleted
  11. Routing FundamentalsHow a router decides where a packet goes: the routing table, longest prefix match, connected, static and default routes, administrative distance and metrics, static versus dynamic routing, distance vector versus link state, and how to read and change routes on Linux.intermediate7 min readCompleted
  12. Routing ProtocolsThe protocols routers use to learn routes: RIP, OSPF areas and costs, IS-IS, EIGRP, BGP autonomous systems, path attributes and route leaks, plus MPLS label switching and GRE tunnels, with FRRouting examples you can run on Linux.advanced7 min readCompleted
  13. Network Address Translation (NAT)How NAT lets many private devices share public addresses: static NAT, dynamic NAT and PAT (masquerading), the translation table, port forwarding and DNAT, carrier-grade NAT, hairpinning, NAT traversal for peer-to-peer, and configuring it on Linux with nftables.intermediate6 min readCompleted
  14. The Transport Layer and TCPPorts, sockets and multiplexing, then TCP in depth: the segment header, the three-way handshake, sequence numbers and acknowledgments, retransmission, flow control with the receive window, connection teardown and TIME_WAIT, TCP states, and congestion control from slow start to CUBIC and BBR.intermediate8 min readCompleted
  15. UDP, QUIC and Other TransportsUDP's tiny header and why so many protocols choose it, TCP versus UDP side by side, testing UDP services, then QUIC and HTTP/3 (encrypted, multiplexed, 1-RTT and 0-RTT, connection migration), and the niche transports SCTP, DCCP and reliable UDP.intermediate6 min readCompleted
  16. Session and Presentation LayersWhat OSI layers 5 and 6 do and where those jobs live today: sessions, checkpoints and RPC (from Sun RPC to gRPC), PPTP and why it is obsolete, character encoding, Base64 and MIME, serialization formats, compression, and SSL/TLS with certificates and the TLS 1.3 handshake.intermediate7 min readCompleted
  17. DNS, the Domain Name SystemHow names become addresses: the DNS hierarchy, recursive resolvers and authoritative servers, a full lookup step by step, record types (A, AAAA, CNAME, MX, TXT, NS, SOA, PTR, SRV, CAA, HTTPS), TTLs and caching, dig and nslookup, DNSSEC, encrypted DNS and the classic DNS failures.intermediate7 min readCompleted
  18. HTTP, HTTPS and the WebThe application layer and the client-server model, how the World Wide Web works, HTTP requests and responses, methods, status codes and headers, HTTP/1.1 vs HTTP/2 vs HTTP/3, cookies, caching, HTTPS, and how content delivery networks make sites fast, all with curl.beginner7 min readCompleted
  19. Email, File Transfer and Management ProtocolsThe application protocols beyond the web: SMTP, POP3 and IMAP for email with SPF, DKIM and DMARC, FTP, SFTP, TFTP and SMB for files, LDAP for directories, NTP for time, SNMP for monitoring, SSH for remote access, MQTT for IoT, SIP for voice and NNTP for newsgroups, with their ports and test commands.intermediate8 min readCompleted
  20. Congestion Control and Quality of ServiceWhy networks congest, bufferbloat, open-loop and closed-loop congestion control, QoS requirements of voice, video and bulk traffic, classification and DSCP marking, queuing, policing and shaping, the leaky bucket and token bucket algorithms, and shaping and testing with Linux tc.advanced8 min readCompleted
  21. Network SecurityThe CIA triad and common attacks, authentication (passwords, MFA, keys, 802.1X, RADIUS), encryption (symmetric, asymmetric, hashing, PKI), stateful firewalls with nftables and cloud security groups, MAC filtering and why it is weak, IDS versus IPS, VPNs with WireGuard and IPsec, segmentation and zero trust.intermediate7 min readCompleted
  22. Wireless and Mobile NetworksHow wireless LANs work (SSIDs, access points, bands, channels, CSMA/CA, roaming), the Wi-Fi generations from Wi-Fi 4 to Wi-Fi 7, Wi-Fi security, Bluetooth and Bluetooth Low Energy, Zigbee and Thread, mobile networks from 1G to 5G, and satellite internet, with Linux commands to inspect a wireless link.intermediate7 min readCompleted
  23. Modern Networking: SDN, NFV, Cloud and IoTHow networks became software: SDN's split of control and data planes, OpenFlow and controllers, NFV and virtual network functions, overlays with VXLAN, cloud service models and VPC networking, IoT protocols and constraints, 5G network slicing, and network automation with code.advanced7 min readCompleted
  24. Network Troubleshooting PlaybookA repeatable method for fixing network problems: define the problem, work bottom up through the layers with one command per question, read the evidence, capture packets with tcpdump, and solve ten common scenarios from "no internet" to "slow only over VPN", with Linux and Windows commands.intermediate8 min readCompleted

↑ ↓ navigate Enter open Esc close