VLANs, bonds and policy routing
Quick answer
VLANs separate link-layer traffic into logical broadcast domains. Bonding combines interfaces for redundancy or load distribution. Policy routing selects routing tables using rules beyond destination address alone.
These mechanisms answer different questions: VLANs determine link-layer membership, bonds combine links, and policy rules choose which routing table to consult. Identify the failing layer before changing another; verify with a labeled fictional topology first.
Prepare the practice environment
Run python3 lab-fixtures/firewalls/setup.py from the extracted root as an ordinary user. Enter the printed fresh private path and check pwd. Use fresh fixtures, Bash with set -e -o pipefail, LC_ALL=C and umask 077. Run each snippet in a separate Bash process, not your interactive shell. Only private files are used; optional examples require an authorized snapshot VM. Do not modify firewall, interfaces or routing. The teaching ruleset must never be loaded. Review the lab guide.
Prerequisites
Review: Namespaces, veth and bridges.
How it works
An IEEE 802.1Q VLAN tag identifies a logical segment; access ports and trunks must agree on tagging configuration. A VLAN is not encryption or a complete security boundary. Bond active-backup uses one active member and can fail over; 802.3ad aggregation requires compatible switch configuration and does not guarantee that a single flow uses all links. Linux routing policy database rules are examined in priority order (lower number first); a lookup may continue when a table has no suitable route. A rule can select a table using source address, marks or other selectors, and the table then performs route selection. Do not confuse route metric with rule priority. The synthetic exercise has only source rules with a matching default route in each selected table. Real rules and route tables are more complex.
Try the examples
The record summarizes different responsibilities; these mechanisms can be used together.
Expected stdout:
vlan=segmentationbond=redundancy-or-distributionpolicy=route-table-selectionThe synthetic rule matches the documentation prefix 192.0.2.0/24 before the default lookup. No routes are changed or packets sent.
Expected stdout:
192.0.2.10 table 100198.51.100.10 table mainip -j rule show | python3 -c 'import json,sys; assert isinstance(json.load(sys.stdin),list); print("rules readable")'Only the JSON shape is checked; the actual routing policy is not exported or assessed.
Expected stdout:
rules readableCommon mistakes
Do not treat VLAN membership as encryption, bonding as automatic bandwidth multiplication, or source policy as a destination route.
Practice
Choose a VLAN for segment separation, an active-backup bond for link failure tolerance and a source-based routing rule for two authorized uplinks. Explain limitations.
Related references
Study: ip, bridge. These are reference names, not deployed links.
Check Your Understanding
Solidify your learning with the interactive assessment directly below this lesson.
Concept Quiz & Questions
VLANs, bonds and policy routing — Knowledge Check
Apply firewall and network concepts to synthetic fixtures and VM-only scenarios.
What does VLAN tagging identify?
Which bond mode uses one active member?
What does 802.3ad generally require?
Which routing rule priority is examined first?