VRF
also: VRF, Virtual Routing and Forwarding
Virtual Routing and Forwarding (VRF) is a Linux kernel feature that allows multiple independent routing tables and network interfaces to coexist on a single system, enabling network isolation and multi-tenancy.
VRF partitions a Linux system's routing and forwarding logic into separate virtual instances, each with its own routing table, neighbor table, and set of network interfaces. This allows a single physical machine to function as if it has multiple independent network stacks.
Each VRF instance operates independently—traffic in one VRF cannot reach interfaces in another VRF unless explicitly routed. This is useful for containerization, multi-tenant networking, and testing network configurations without physical separation.
Example: You could assign eth0 to vrf-red and eth1 to vrf-blue, and they maintain separate routing tables. Traffic on eth0 follows routes in vrf-red's table, while eth1 follows vrf-blue's routes. Configure with: ip link add vrf-red type vrf table 100 and ip link set eth0 master vrf-red.