Section · Linux
Networking
How the network stack works from a frame on the wire to a browser response, and how to inspect it on Linux. Move layer by layer across TCP/IP: live command output or a failure first, then the mechanism. Practice covers server diagnostics, with packet capture in the tcpdump topic.
13 chapters · 5 parts13 of 13 written
Dark — read, light — written, empty — in progress. Marks stay in this browser only.Chapters
Part 1
The wire and LAN (L1–L2)
How data is split into packets and reaches a neighbour on the same network.read1You stopped herePackets, layers and encapsulationEthernet, IP, TCP and data stacked inside each other, frame vs packet, and where the 1500-byte MTU comes from.2You stopped hereLAN: MAC, switches, ARP and VLANHow a host finds a neighbour’s MAC (
ip neigh), why MACs change at every router, and what 802.1Q tags do.Part 2
Addresses, routing and NAT (L3)
How subnets work, how the kernel picks an outgoing interface, and what a router rewrites.read3You stopped hereIPv4, netmasks and CIDR32 bits, why
/24 equals 255.255.255.0, network/broadcast addresses, RFC 1918 and CGNAT ranges.4You stopped hereRouting and longest prefix matchThe routing table (ip route), default gateway, longest prefix match, ip route get, and TTL in traceroute/mtr.5You stopped hereNAT, port forwarding and conntrackSNAT/masquerade vs DNAT, the conntrack table, ISP CGNAT, and why NAT is not a firewall.6You stopped hereICMP and MTU: beyond pingICMP message types, Path MTU Discovery, and why an MTU black hole stalls SSH and TLS after connecting.7You stopped hereIPv6 in practiceShortened :: notation, fe80:: link-local addresses, SLAAC and NDP, and why blocking all ICMPv6 breaks IPv6.Part 3
Ports, TCP and UDP (L4)
How a packet reaches the right process and how TCP delivery checks differ from connectionless UDP.read8You stopped herePorts and socketsThe 5-tuple, ephemeral ports,
0.0.0.0 vs 127.0.0.1, and seeing listeners with ss -tulnp.9You stopped hereTCP: handshake, flags, states and windowsSYN/ACK/FIN/RST, seq and ack numbers, TIME_WAIT vs CLOSE_WAIT, window scaling and retransmissions.10You stopped hereUDP and QUICWhy a connectionless protocol matters (DNS, WireGuard, media) and how QUIC and HTTP/3 build on UDP.Part 4
Names and the web (L7)
What you hit every day: name resolution, encryption and HTTP.read11You stopped hereDNS: from a name to an IP addressQuery path from root to TLD to authoritative server,
A/AAAA/CNAME/TXT/PTR records, NXDOMAIN vs SERVFAIL, and dig +trace.12You stopped hereHTTP and TLS: what happens after TCPThe TLS handshake, SNI (dozens of sites on one IP), certificate checks, HTTP headers, HTTP/2 and HTTP/3.Part 5
The Linux network stack
How a packet moves inside Linux: virtual interfaces, containers, netfilter and packet capture.readPractice: network diagnostics
Step-by-step walkthroughs verified on a live server. Each lists the chapter after which every step is clear.
Reference
Cheat sheets for commands, masks and flags to keep open next to the terminal.