Skip to content
Linux networking · Chapter 1 of 20 Preface

Preface

Today, Linux is the network device most people don’t recognize as one. Every Kubernetes node is a router, every container hangs on a virtual link, and behind many firewalls, load balancers and cloud gateways runs the same kernel with the same tools. If you understand what happens there, you find faults that others just restart.

This course builds networks out of Linux, on a single VM. Instead of buying routers, switches and servers, you create network namespaces: each one is a complete network stack with its own interfaces, routes and firewall rules, connected by virtual cables. Day by day, this grows into a small company network, first by hand with ip, then routed with FRR, then highly available with keepalived. You demonstrate every tool on your own network, and every fault is triggered deliberately and measured: ping loss, failover times, throughput with iperf3.

The book is for admins, DevOps and platform engineers who run Linux servers and want more from the network than ping and “it’s the network.” You should be comfortable with the shell and SSH and know IP addresses, subnets and ports. You don’t need a networking certification.

Scope. Firewalls with nftables and VPNs with WireGuard have their own course; only NAT and conntrack appear here. “Linux admin hands-on” covers networking from a system administration perspective. This course is about the network itself.

Two terms run through the book and are kept strictly apart:

  • Linux routing is what the kernel and FRR do: forward packets, set routes by hand (Day 4), learn routes via OSPF and BGP (Part B).
  • The vRouter is a device you build from it: a highly available gateway pair with BGP to the provider, VRRP for the gateway address, NAT, DHCP and DNS (Day 15).

How the book works

  • One day, one topic. Each day has a goal, a time estimate, a short briefing and 5 to 8 drills. You type every command yourself and compare with “Expected”.
  • Measure instead of guess. You count failover times in lost packets, iperf3 measures throughput, mtr shows loss. Where a measurement showed something other than expected, it appears in the book as Tried it, together with the cause.
  • No helper scripts. Every namespace and every cable is created command by command, configurations are shown as heredocs. Only where the same thing applies to three routers does a short loop combine it.
  • Everything runs on netz. The first line of every code block says # on netz. Which namespace a command acts in is stated in the command itself: ip -n r1 … or ip netns exec r1 ….
  • Speed drills, Checkpoint, Challenge, Practice note close every day. The Challenge is a task without instructions, with a hint and a solution. The Practice note says what of it matters in operations.

At the end:

  • Competition (Day 16): a routed network, five faults, against the clock.
  • Appendix A is the cheat sheet with commands, measured numbers and the traps from the book. Appendix B is the final exam with ten tasks.

The days at a glance

Day Topic Duration
Part A · Tools
0 The training ground: the VM, namespaces instead of VMs, packages approx. 60 min
1 ip and netplan: addresses, links, routes, neighbors approx. 75 min
2 Namespaces and veth: your first own network approx. 75 min
3 Bridges, VLANs and bonds approx. 90 min
4 Routing by hand: forwarding, policy routing, VRFs approx. 90 min
5 Connections: ss, nc and conntrack approx. 80 min
6 DNS and DHCP: dig, resolvectl and dnsmasq approx. 90 min
7 Capturing with tcpdump and tshark approx. 90 min
8 MTU, fragmentation and VXLAN approx. 90 min
9 Measuring and disrupting: iperf3, mtr, ethtool and tc netem approx. 90 min
Part B · Routing with FRR
10 FRR, vtysh and OSPF in the first area approx. 90 min
11 OSPF failures, measuring convergence and BFD approx. 75 min
12 BGP between two sites approx. 90 min
13 ECMP and anycast approx. 75 min
Part C · Highly available gateways
14 keepalived and VRRP approx. 75 min
15 The vRouter approx. 120 min
16 Competition: the broken network approx. 90 min

Time: Days 0 to 15 add up to just under 23 hours (1,355 minutes); the competition and the final exam add one and a half and two hours, for a total of a good 26 hours. With one training day per evening and five evenings per week, you’re through in three and a half weeks.

The training ground

VM Role IP in the book In the lab
netz all routers, switches, clients and servers as namespaces 172.16.0.123 2 vCPU, 3.8 GiB, 58 GB
  • One VM with Ubuntu 24.04, SSH access and sudo. That’s all it takes: even the network from Day 15 with five namespaces, three FRR instances, two keepalived and two dnsmasq runs comfortably on 2 vCPU.
  • Internet access for the packages on Day 0. After that, everything happens inside the VM, and your lab network stays untouched.
  • The virtual kernel (linux-virtual) lacks some modules; VRF, for example, is missing without linux-modules-extra. Day 0 installs them and reminds you to reinstall them after a kernel update.

Proxmox, VMware, a cloud or Multipass, it doesn’t matter. On a Mac with Apple Silicon, Multipass VMs are arm64; all packages come from the Ubuntu and FRR archives for both architectures. The outputs in the book come from amd64.

Versions

Tool Version Source
Kernel 6.8 Ubuntu 24.04
iproute2 (ip, ss, bridge) 6.1.0 Ubuntu
tcpdump / tshark 4.99.4 / 4.2.2 Ubuntu
iperf3 / mtr 3.16 / 0.95 Ubuntu
conntrack 1.4.8 Ubuntu
dnsmasq 2.91 Ubuntu
FRR 10.7.1 deb.frrouting.org
keepalived 2.2.8 Ubuntu

What you can do afterwards

  • Build addresses, routes, bridges, VLANs and bonds on Linux by hand, also in namespaces, and make every setting persistent with netplan.
  • Use policy routing and VRFs and understand rp_filter before it swallows packets.
  • Read connections, sockets and conntrack and recognize a full table.
  • Run DHCP and DNS with dnsmasq, also redundantly.
  • Capture at the right place and use tshark to spot retransmits, windows and forged resets.
  • Find MTU problems and black holes, use MSS clamping and size overlays such as VXLAN correctly.
  • Measure throughput, delay and loss, reproduce them with tc netem, and fix bufferbloat.
  • Build, filter and steer OSPF and BGP with FRR, and push convergence down to milliseconds with BFD.
  • Use ECMP and anycast and know where they end.
  • Build a highly available gateway with keepalived and recognize split brain.
  • Put it all together into a vRouter and know its weaknesses before they show up at night.

What was tested

All commands and outputs come from real runs on the described training ground, in November 2026, shortened where it makes sense. MAC addresses, process IDs, times and measurements will differ on your side; the order of magnitude should match.

Hint: This course is an independent practice course. Linux is a registered trademark of Linus Torvalds. FRRouting is a project of the Linux Foundation, Ubuntu is a trademark of Canonical. The book is not affiliated with these organizations and projects and is neither reviewed nor endorsed by them.

The passwords in the book (lab-vrrp and relatives) apply to the lab only. Plaintext VRRP authentication protects against accidents, not against attacks.

Enjoy the training camp.

Contents

More