1.7 Configure and verify VRF-Lite

ENARSI 300-410 v1.1 · 1.0 Layer 3 Technologies

VRF-Lite splits one router into several routing tables. Each VRF has its own interfaces, routes and routing processes, so two customers can even use the same addresses. There is no MPLS: VRFs are carried between routers on separate links or 802.1Q subinterfaces, one per VRF.

What you must know

Two VRFs over one trunk

vrf definition RED
 address-family ipv4
vrf definition BLUE
 address-family ipv4
!
interface GigabitEthernet0/0.100
 encapsulation dot1Q 100
 vrf forwarding RED
 ip address 10.0.12.1 255.255.255.252
interface GigabitEthernet0/0.200
 encapsulation dot1Q 200
 vrf forwarding BLUE
 ip address 10.0.12.1 255.255.255.252     ! the same address, another VRF
!
router ospf 10 vrf RED
 network 10.0.0.0 0.255.255.255 area 0
router eigrp CUSTOMERS
 address-family ipv4 unicast vrf BLUE autonomous-system 200
  network 10.0.0.0

RED traffic stays in RED (1). BLUE has its own table and no route to RED's networks (2), even though the addresses are the same.

Verifying and the classic traps

R1# show vrf
  Name                             Default RD            Protocols   Interfaces
  BLUE                             <not set>             ipv4        Gi0/0.200
                                                                     Gi0/2
  RED                              <not set>             ipv4        Gi0/0.100
                                                                     Gi0/1

R1# ping vrf RED 10.2.2.10
!!!!!

Commands

show vrf [detail]VRFs, their RD, address families and interfaces.
show ip route vrf <name>One VRF's routing table.
show ip protocols vrf <name>Routing processes in that VRF.
ping vrf <name> <ip> / traceroute vrf <name> <ip>Test inside the VRF.

Exam traps

Check yourself

Why does an interface lose its address when you add vrf forwarding?
The address belonged to the global table; IOS removes it so you add it again in the VRF.
Can RED and BLUE both use 10.1.1.0/24 on R1?
Yes, each VRF has its own routing table.
How many OSPF processes do two VRFs with OSPF need?
Two: one router ospf <id> vrf <name> per VRF.
A ping from R1 to a RED host fails, but ping vrf RED works. Why?
Plain ping uses the global table, which has no route to the RED network.

Labs

Try it live: VRF-Lite: two customers with overlapping addresses, OSPF in one VRF and BGP in the other

More topics in 1.0 Layer 3 Technologies