Skip to content
Hands-on course · 17 days

Linux networking hands-on

You build a routed, highly available network from Linux and find every fault in it by measuring instead of guessing.

  • Free · no subscription
  • 17 days · 60–120 min each
  • 150 drills · with expected output
Day 1 · Drill 1: Reading, short and long
# on netz
$ ip -br link
$ ip -br -4 a

Expected

lo               UNKNOWN        00:00:00:00:00:00 <LOOPBACK,UP,LOWER_UP>
eth0             UP             bc:24:11:4d:d9:08 <BROADCAST,MULTICAST,UP,LOWER_UP>
lo               UNKNOWN        127.0.0.1/8
eth0             UP             172.16.0.123/24 metric 100

What you'll be able to do

  • Build a company network from network namespaces with bridges, VLANs, bonds, policy routing and VRFs by hand
  • Narrow down faults with ss, conntrack, tcpdump, tshark, mtr and iperf3 and reproduce them with tc netem
  • Set up, filter and steer OSPF and BGP with FRR and cut convergence to a quarter of a second with BFD
  • Build a highly available vRouter from FRR, keepalived, NAT and dnsmasq and measure every failover

What you need

LabOne VM with Ubuntu 24.04, SSH access and sudo – in the lab 2 vCPU and 3.8 GiB, all routers and hosts run inside it as namespaces

InternetInternet access from the VM for the packages on Day 0, after that everything stays inside the VM

Prior knowledgeThe book is for admins, DevOps and platform engineers who run Linux servers. You should be comfortable with the shell and SSH and know IP addresses, subnets and ports.

Set up your labKubernetes locally · Lab VMs

Training plan

One day = one sitting. Every day ends with a checkpoint and a challenge. About 26 hours in total.

Training days

  1. Day 0 The training groundTurn an empty Ubuntu VM into the ground on which a whole company network made of namespaces grows over the next days: tools, FRR, keepalived, kernel modules 60 min
  2. Day 1 ip and netplanRead and change interfaces, addresses, routes and neighbors with ip, on a playground that never endangers the SSH connection. Then make the same configuration persistent with netplan, safeguarded by netplan try 75 min
  3. Day 2 Namespaces and vethBuild your first own network from network namespaces and veth cables: two machines directly connected, then two networks routed by the host, with internet access via NAT. Put processes into a namespace and look inside from the outside 75 min
  4. Day 3 Bridges, VLANs and BondsAttach several namespaces to a virtual switch and watch it learn MAC addresses. Separate the network with VLANs, tagged and untagged. Bundle two links into a bond and let one of them fail 90 min
  5. Day 4 Routing by Hand: Forwarding, Policy Routing, VRFsBuild a router out of a namespace, with two uplinks. Decide which traffic takes which uplink: by metric, by source, by mark. Routes that drop packets on purpose. And cleanly separate two customers with the same addresses, using VRFs 90 min
  6. Day 5 Connections: ss, nc and conntrackSee who listens on what and which connections are in which state. Build connections by hand with nc, check ports and push files. And watch the router remember every connection until its table is full 80 min
  7. Day 6 DNS and DHCP: dig, resolvectl and dnsmasqUnderstand how the host resolves names and why the first query sometimes takes three seconds. Read DNS answers with dig. Then serve a small network of your own with dnsmasq: addresses via DHCP, fixed assignments, a local domain and forwarding to the outside 90 min
  8. Day 7 Capturing with tcpdump and tsharkCapture packets where they originate, pass through and arrive. Read the TCP handshake line by line, filter captures, save them and analyze them with tshark. And see in real faults what packet loss, a full window and a forged reset look like in a capture 90 min
  9. Day 8 MTU, fragmentation and VXLANKnow and measure the MTU of every segment, watch Path MTU Discovery at work, create an MTU black hole and fix it with MSS clamping. And build a VXLAN overlay that, without a matching MTU, is fifteen times slower than necessary 90 min
  10. Day 9 Measure and Disturb: iperf3, mtr, ethtool, and tc netemMeasure throughput, delay, and loss instead of guessing. Build a bad link with tc netem and see how little loss it takes for TCP to collapse. Recognize the trap in mtr, understand offloads, and fix bufferbloat with one line 90 min
  11. Day 10 FRR, vtysh, and OSPF in the First AreaThree routers built from namespaces, each with its own FRR instance. They learn each other's networks via OSPF, without a single static route. You read adjacencies, routes, and the link-state database, steer the path with costs, and find an adjacency that never finishes 90 min
  12. Day 11 OSPF Failures, Measuring Convergence, and BFDMeasure how long the network takes after a failure until traffic flows again. Experience the difference between a loud and a silent failure, and push the time down from over 30 seconds to a quarter of a second with shorter timers and with BFD 75 min
  13. Day 12 BGP Between Two SitesTwo sites with their own AS numbers exchange their networks via BGP, over two links. You experience why BGP does nothing at all without filters, write prefix-lists and route-maps, decide which link is the primary path and which the backup, and catch a neighbor announcing foreign networks 90 min
  14. Day 13 ECMP and AnycastTwo servers under the same IP address, both announced via OSPF. You see how the kernel spreads traffic across equal-cost paths and why the hash setting decides whether the spreading happens at all. And you learn the difference between a failure that anycast absorbs and one it does not even notice 75 min
  15. Day 14 keepalived and VRRPTwo gateways share a virtual IP address. If the active one fails, the other takes over, and the clients barely notice. You measure the failover on a clean stop and on a hard failure, let keepalived monitor the uplink and create a split brain with two gateways claiming the same address 75 min
  16. Day 15 The vRouterTwo Linux namespaces become a highly available gateway for a company LAN, the way it runs as a virtual router in many offices, data centers and clouds: BGP to the provider with FRR, a virtual address with keepalived, NAT with nftables, DHCP and DNS with dnsmasq. You measure the failover, see what gets lost along the way, and find a fault that only shows up when things go wrong 120 min

More