2.12.3. VRF (Virtual Routing and Forwarding)
VRF creates multiple isolated routing tables on a single router, effectively creating multiple virtual routers. Each VRF has its own:
- Routing table
- Interfaces (assigned to VRF)
- Routing protocol instances
Use case: Service providers hosting multiple customers on shared infrastructure (each customer gets a VRF). Because each VRF's routes live in a separate table, customers can even reuse the same overlapping prefixes (say, both using 192.168.1.0/24) on one router without conflict—no NAT or renumbering needed.
Router(config)# ip vrf CustomerA
Router(config)# interface GigabitEthernet0/1
Router(config-if)# ip vrf forwarding CustomerA
Router(config-if)# ip address 10.1.1.1 255.255.255.0