Week 16 - Bridges, VLANs, OVS¶
16.1 Conceptual Core¶
- A Linux bridge is an in-kernel L2 switch. Used by virtually every container runtime and VM hypervisor.
- VLAN (802.1Q) tagging segments a single L2 network into many.
- Open vSwitch (OVS) is a programmable virtual switch: flow-table-based (OpenFlow-compatible), with hardware offload to smartNICs. Used by OpenStack Neutron, Kubernetes (older networking), and OVN.
16.2 Mechanical Detail¶
- Linux bridge management with
ip link: - VLAN:
ip link add link eth0 name eth0.10 type vlan id 10. - OVS:
ovs-vsctl add-br br0; ovs-vsctl add-port br0 eth0; ovs-ofctl dump-flows br0. The flow table is the programmable part. - Bridge vs OVS decision matrix: simple L2 connectivity → bridge. Programmable flows, OpenFlow, hardware offload → OVS.
16.3 Lab-"Three Network Topologies"¶
- Two namespaces connected via a Linux bridge: classic container networking.
- Two namespaces on tagged VLANs sharing one bridge.
- The same topology in OVS, with explicit OpenFlow rules.
For each, verify connectivity with ping, capture with tcpdump, document the difference.
16.4 Hardening Drill¶
- Bridge
iptablesintegration:sysctl net.bridge.bridge-nf-call-iptables=1(so bridged traffic traverses iptables). Understand whether you want this-for some setups (e.g., transparent bridges) you don't.
16.5 Performance Tuning Slice¶
- Compare per-packet latency through a bridge vs OVS vs a direct veth pair under load.
Month 4 Capstone Deliverable¶
A linux-networking/ directory:
1. nft-firewall/ - a default-deny stateful firewall with documented allowlist.
2.ipvs-lb/ - IPVS-DR load balancer with two backends and a health-check sidecar.
3. xdp-scrubber/ - the DDoS scrubber + Prometheus exporter.
4.bridge-vs-ovs/ - three topologies + a comparison report.
A NETWORK_RUNBOOK.md documenting interface inventory, MTU, sysctl tunables, and the firewall ruleset.