Credit to igekman. His summary is brief and accurate for it's brevity. I wanted to expand upon this for others who may not be familiar in the networking side. I understand this
In regards to the three topics, netns, vrf, and the table option in the ip command, a VRF is two years laterintended to provide the ability to virtualize a routing table so that multiple independent tables can coexist for a host.
tableis the actual in memory database storing prefixes and their next-hops.vrfis the named device the kernel binds to a given interface for isolation and thetable.netnsisolates the network stack for processes and sets permissions limiting these to specific network devices, which could be a VRF, interface, bridge, etc.
As a small example, but others may come here lookingcrafting a VRF:
In linux a VRF is crafted by creating a named link with a link-type of vrf and binds this device to a table id (integer). We then set the basic rules on the interfaces to and from that VRF to their defaults, create a forwarding rule for default forwarding (unreachable), bind a packet interface to the answer as wellvrf, ip that interface, and add a default route.
ip link add vrf-red type vrf table 10 ip link set dev vrf-red up ip rule add oif vrf-red table 10 ip rule add iif vrf-red table 10 ip route add table 10 unreachable default metric 4278198272 ip link set dev et1 master vrf-red ip address add 198.51.100.1/24 ip route add 0.0.0.0/0 via 172.16.28.34 vrf vrf-red A bit more detail on the history... VRFs came to linux after network namespaces, and under the covers they leverage the same functionality that network namespaces implement, so they are nearly one in the same. As igekman pointed out its the usecase that really drives one versus the other.
https://docs.kernel.org/networking/vrf.html https://developers.redhat.com/articles/2025/01/08/overview-virtual-routing-and-forwarding-vrf-linux#linux_implementation