Routing fundamentals: routes, metrics, policy routing
You build static routes, backup links and source-based routing with Linux routers and take your first step into dynamic routing.
Level 201 · 21 lessons · 18 practice labs
Lessons
The routing table
- How a router decides: longest prefix match
- The routing table: destination, gateway, interface, metric
- Connected and static routes
- Enabling and testing IP forwarding
- Short task: connect two subnets with a Linux router
Static routing
- Multi-hop static routing
- Default routes and the gateway of last resort
- Asymmetric routing and rp_filter
- A backup link with a floating static route
- Blackhole and unreachable routes
- Short task: move traffic to the backup link when the main one fails
Policy routing
- Multiple routing tables and ip rule
- Routing by source address
- Routing by packet mark
- Separating routing tables with VRF
- Short task: use two internet links by source address
Introduction to dynamic routing
- Distance-vector and link-state protocols
- Introduction to FRRouting: vtysh
- Your first dynamic routing with RIP
- Short task: watch convergence when a link goes down
Wrap-up
- Capstone: build and document routing for a three-branch network
Practice labs
- Which route will this packet take?: For the given routing table, predict which route each destination address will use and verify with ip route get.
- A more specific route steals the traffic: Find the more specific route, added by mistake, that pulls a server group’s traffic to the wrong router, and fix it.
- Two interfaces, two default routes: Diagnose the metric clash between two default routes on one machine, set the right priority permanently and show which exit each destination uses.
- Connect the test subnet to the company: Add a static route for the new test subnet on the router, define the return path on the far side and show a two-way ping.
- Missing routes across three routers: Add the missing static routes for end-to-end reachability across three routers, and show the expected path with traceroute.
- Two routers keep bouncing the packet: Find the loop created by wrong static routes using traceroute and TTL, fix the tables and show every subnet is reachable.
- The branch can’t get out: Add the missing default route on the branch router and show the branch client reaches the server behind headquarters.
- Replies come back through another door: Prove with counters and a capture which packets rp_filter drops because of an asymmetric path, and fix the route or the rp_filter setting with a reason.
- Traffic to a retired network wanders around: Terminate traffic to a retired subnet in the right place with blackhole and unreachable routes, and show clients get an error at once.
- The backup link is always in use: Find that traffic flows over the costly backup link because the route metrics are reversed, and make the main link the preferred path.
- The link died but the route stays: Show that the route stays when the main link’s far end dies while the interface looks up, and write a small script that watches the gateway and fails over.
- The main link keeps flapping: Show from the logs the constant switching caused by an unstable main link, and add a hold-down to the failover script so the link is taken back only once stable.
- Send guests out through a separate link: Use ip rule and a separate table to send the guest subnet’s traffic out of the second internet link, and show it by comparing the exit address of both subnets.
- Send backup traffic over the cheap link: Mark traffic to the backup server with nftables and route it over the second link through a separate table, and show other traffic is unaffected.
- Same addresses, two customers: VRF: Separate two customer networks using the same address range with VRFs on one router, and show each customer reaches only its own server.
- Read the routes in FRRouting: Inspect the router’s routes and interfaces with vtysh, and write down which source each route came from.
- RIP isn’t announcing one subnet: Find the missing network line or passive-interface mistake in the RIP configuration, fix it and show the route appears on the neighbouring router.
- A forgotten static route overrides RIP: Show that traffic doesn’t move to the new path when a link fails because a forgotten static route with a lower administrative distance wins, and fix it.
About this course
You build static routes, backup links and source-based routing with Linux routers and take your first step into dynamic routing.
What you will learn
- The routing table
- Static routing
- Policy routing
- Introduction to dynamic routing
- Wrap-up
Prerequisites
Finishing the level 101 courses of the same path, or knowing those topics, is enough.
Lab environment
Lessons run in your own Kali Linux terminal in the browser, connected to a private lab network. Nothing to install.
Frequently asked questions
- Is this course right for my level?
- The course is at level 201; it assumes you know the topics of the lower-level courses.
- Is there anything to install?
- No. Every lesson runs in your own lab environment that opens in the browser.
- How do lessons work?
- Each lesson has 8 to 10 steps and a short quiz. Early steps show the command to type, later steps give less help; if two attempts fail, the solution opens.
- Can I try it for free?
- Yes. The first three lessons of every course are free.