VRF Lite

VRF-lite is just VRFs, without L3VPN. VRFs are extremely useful any time you need to have multiple routing tables (and protocols) on a single device. This also allows for overlapping IPs on the same devices. 

When talking about VRF-lite, the following terms are often used. 

* CE routers – customer edge routers, these devices provide customer access to the service provider. 
* PE routers – provider edge routers, the provider router (usually on-site) 

Each interface with an IPv4 or IPv6 address is assigned a VRF. Most are in “default”. The out-of-band management port on most Cisco devices is assigned to Mgmt-intf by default. 

Routing protocols are supported in VRF-lite as well. VRF configuration, with routing processes is below. Note how some of the VRF-aware routing protocols use address families. I’ll use the following topology to lab this out. 

UntitledImage

First, the VRFs need to be created on both devices:

vrf definition BLUE
!
address-family ipv4
exit-address-family
!
address-family ipv6
exit-address-family
vrf definition EGGPLANT
!
address-family ipv4
exit-address-family
!
address-family ipv6
exit-address-family
vrf definition ORANGE
!
address-family ipv4
exit-address-family
!
address-family ipv6
exit-address-family
vrf definition SAGE
!
address-family ipv4
exit-address-family
!
address-family ipv6
exit-address-family

ip routing 
ipv6 unicast-routing 

Next, all the interfaces need configuring. 

R1 

interface Loopback0 
vrf forwarding SAGE
ip address 1.1.1.1 255.255.255.255
ipv6 address 2001:DB8:1:1::1/128
ipv6 enable
!
interface Loopback10
vrf forwarding ORANGE
ip address 10.10.10.1 255.255.255.255
ipv6 address 2001:DB8:10:10::10/128
ipv6 enable
!
interface Loopback20
vrf forwarding EGGPLANT
ip address 10.20.20.1 255.255.255.255
ipv6 address 2001:DB8:20:20::20/128
ipv6 enable
!
interface Loopback30
vrf forwarding BLUE
ip address 10.30.30.1 255.255.255.255
ipv6 address 2001:DB8:30:30::30/128
ipv6 enable
!
interface GigabitEthernet1
vrf forwarding SAGE
ip address 10.0.0.1 255.255.255.0
negotiation auto
ipv6 address 2001:DB8::1/64
ipv6 enable
!
interface GigabitEthernet1.10
encapsulation dot1Q 10
vrf forwarding ORANGE
ip address 10.10.0.1 255.255.255.0
ipv6 address 1001:DB8:10::10/64
ipv6 enable
!
interface GigabitEthernet1.20
encapsulation dot1Q 20
vrf forwarding EGGPLANT
ip address 10.20.0.1 255.255.255.0
ipv6 address 201:DB8:20::1/64
ipv6 enable
!
interface GigabitEthernet1.30
encapsulation dot1Q 30
ip address 10.30.0.1 255.255.255.0
ipv6 address 2001:DB8:30::1/64
ipv6 enable
!

R2

interface Loopback0
vrf forwarding SAGE
ip address 2.2.2.2 255.255.255.255
ipv6 address 2001:DB8:1:1::2/128
ipv6 enable
!
interface Loopback10
vrf forwarding ORANGE
ip address 10.10.10.2 255.255.255.255
ipv6 address 2001:DB8:10:10::11/128
ipv6 enable
!
interface Loopback20
vrf forwarding EGGPLANT
ip address 10.20.20.22 255.255.255.255
ipv6 address 2001:DB8:20:20::22/128
ipv6 enable
!
interface Loopback30
vrf forwarding BLUE
ip address 10.30.30.33 255.255.255.0
ipv6 address 2001:DB8:30:30::33/128
ipv6 enable
!
interface GigabitEthernet1
vrf forwarding SAGE
ip address 10.0.0.2 255.255.255.0
negotiation auto
ipv6 address 2001:DB8::2/64
ipv6 enable
!
interface GigabitEthernet1.10
encapsulation dot1Q 10
vrf forwarding ORANGE
ip address 10.10.0.2 255.255.255.0
ipv6 address 2001:DB8:10::2/64
ipv6 enable
!
interface GigabitEthernet1.20
encapsulation dot1Q 20
vrf forwarding EGGPLANT
ip address 10.20.0.2 255.255.255.0
ipv6 address 2001:DB8:20::2/64
ipv6 enable
!
interface GigabitEthernet1.30
encapsulation dot1Q 30
vrf forwarding BLUE
ip address 10.30.0.2 255.255.255.0
ipv6 address 2001:DB8:30::2/64
ipv6 enable

Finally, the routing protocols. 

Static (vrf SAGE) 

R1

ip route vrf SAGE 2.2.2.2 255.255.255.255 10.0.0.2
ipv6 route vrf SAGE 2001:DB8:1:1::2/128 2001:DB8::2

R1#sh ip route vrf SAGE

1.0.0.0/32 is subnetted, 1 subnets
C 1.1.1.1 is directly connected, Loopback0
2.0.0.0/32 is subnetted, 1 subnets
S 2.2.2.2 [1/0] via 10.0.0.2
10.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C 10.0.0.0/24 is directly connected, GigabitEthernet1
L 10.0.0.1/32 is directly connected, GigabitEthernet1

R1#sh ipv6 route vrf SAGE

IPv6 Routing Table - SAGE - 5 entries
C 2001:DB8::/64 [0/0]
via GigabitEthernet1, directly connected
L 2001:DB8::1/128 [0/0]
via GigabitEthernet1, receive
LC 2001:DB8:1:1::1/128 [0/0]
via Loopback0, receive
S 2001:DB8:1:1::2/128 [1/0]
via 2001:DB8::2
L FF00::/8 [0/0]
via Null0, receive

R2

R2(config)#ip route vrf SAGE 1.1.1.1 255.255.255.255 10.0.0.1
R2(config)#ipv6 route vrf SAGE 2001:db8:1:1::1/128 2001:db8::1

R2#sh ip route vrf SAGE
1.0.0.0/32 is subnetted, 1 subnets
S 1.1.1.1 [1/0] via 10.0.0.1
2.0.0.0/32 is subnetted, 1 subnets
C 2.2.2.2 is directly connected, Loopback0
10.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C 10.0.0.0/24 is directly connected, GigabitEthernet1
L 10.0.0.2/32 is directly connected, GigabitEthernet1

R2#sh ipv6 route vrf SAGE
C 2001:DB8::/64 [0/0]
via GigabitEthernet1, directly connected
L 2001:DB8::2/128 [0/0]
via GigabitEthernet1, receive
S 2001:DB8:1:1::1/128 [1/0]
via 2001:DB8::1
LC 2001:DB8:1:1::2/128 [0/0]
via Loopback0, receive
L FF00::/8 [0/0]
via Null0, receive

OSPF (vrf ORANGE)

! ospfv2 for v4
router ospf 10 vrf ORANGE
redistribute connected

interface GigabitEthernet1.10
ip ospf 10 area 0
R2#sh ip ospf nei

Neighbor ID Pri State Dead Time Address Interface
10.10.10.1 1 FULL/BDR 00:00:35 10.10.0.1 GigabitEthernet1.10

! ospfv3 for v6 
router ospfv3 10
!
address-family ipv6 unicast vrf ORANGE
redistribute connected
router-id 10.10.10.1
exit-address-family
router ospf 10 vrf ORANGE
redistribute connected

interface GigabitEthernet1.10
ospfv3 10 ipv6 area 0

R2#sh ospfv3 vrf ORANGE nei

OSPFv3 10 address-family ipv6 vrf ORANGE (router-id 10.10.10.2)

Neighbor ID Pri State Dead Time Interface ID Interface
10.10.10.1 1 FULL/BDR 00:00:31 13 GigabitEthernet1.10

EIGRP (vrf EGGPLANT)

router eigrp EGGPLANT
!
address-family ipv4 unicast vrf EGGPLANT autonomous-system 20
!
topology base
exit-af-topology
network 10.20.0.0 0.0.0.255
exit-address-family
!
address-family ipv6 unicast vrf EGGPLANT autonomous-system 20
!
af-interface Loopback20
passive-interface
exit-af-interface
!
topology base
exit-af-topology
eigrp router-id 10.20.20.1
exit-address-family

BGP (vrf BLUE) 

vrf definition BLUE
rd 65001:1
route-target export 65001:1
route-target import 65001:1
R1#sh run | sec bgp
router bgp 65001
bgp router-id 1.1.1.1
bgp log-neighbor-changes
!
address-family ipv4 vrf BLUE
bgp router-id 10.30.30.1
network 10.30.0.0 mask 255.255.255.0
redistribute connected
neighbor 10.30.0.2 remote-as 65002
neighbor 10.30.0.2 activate
exit-address-family
!
address-family ipv6 vrf BLUE
redistribute connected
bgp router-id 10.30.30.1
neighbor 2001:DB8:30::2 remote-as 65002
neighbor 2001:DB8:30::2 activate
exit-address-family
R1#sh bgp vpnv4 uni all sum    
BGP router identifier 1.1.1.1, local AS number 65001
BGP table version is 4, main routing table version 4
3 network entries using 768 bytes of memory
4 path entries using 544 bytes of memory
6/3 BGP path/bestpath attribute entries using 1824 bytes of memory
1 BGP AS-PATH entries using 24 bytes of memory
1 BGP extended community entries using 24 bytes of memory
0 BGP route-map cache entries using 0 bytes of memory
0 BGP filter-list cache entries using 0 bytes of memory
BGP using 3184 total bytes of memory
BGP activity 6/0 prefixes, 8/0 paths, scan interval 60 secs
3 networks peaked at 02:24:50 Jul 23 2021 UTC (00:02:04.264 ago)

Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd
10.30.0.2 4 65002 8 8 4 0 0 00:02:03 2

R1#sh bgp vpnv4 uni all
BGP table version is 4, local router ID is 1.1.1.1
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
r RIB-failure, S Stale, m multipath, b backup-path, f RT-Filter,
x best-external, a additional-path, c RIB-compressed,
t secondary path, L long-lived-stale,
Origin codes: i - IGP, e - EGP, ? - incomplete
RPKI validation codes: V valid, I invalid, N Not found

Network Next Hop Metric LocPrf Weight Path
Route Distinguisher: 65001:1 (default for vrf BLUE) VRF Router ID 10.30.30.1
* 10.30.0.0/24 10.30.0.2 0 0 65002 i
*> 0.0.0.0 0 32768 i
*> 10.30.30.0/24 10.30.0.2 0 0 65002 ?
*> 10.30.30.1/32 0.0.0.0 0 32768 ?

R1#show bgp vpnv6 uni all sum
BGP router identifier 1.1.1.1, local AS number 65001
BGP table version is 4, main routing table version 4
3 network entries using 840 bytes of memory
4 path entries using 672 bytes of memory
3/2 BGP path/bestpath attribute entries using 912 bytes of memory
1 BGP AS-PATH entries using 24 bytes of memory
1 BGP extended community entries using 24 bytes of memory
0 BGP route-map cache entries using 0 bytes of memory
0 BGP filter-list cache entries using 0 bytes of memory
BGP using 2472 total bytes of memory
BGP activity 6/0 prefixes, 8/0 paths, scan interval 60 secs
3 networks peaked at 02:24:45 Jul 23 2021 UTC (00:03:00.589 ago)

Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd
2001:DB8:30::2 4 65002 8 8 4 0 0 00:03:00 2

R1#show bgp vpnv6 uni all
BGP table version is 4, local router ID is 1.1.1.1
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
r RIB-failure, S Stale, m multipath, b backup-path, f RT-Filter,
x best-external, a additional-path, c RIB-compressed,
t secondary path, L long-lived-stale,
Origin codes: i - IGP, e - EGP, ? - incomplete
RPKI validation codes: V valid, I invalid, N Not found

Network Next Hop Metric LocPrf Weight Path
Route Distinguisher: 65001:1 (default for vrf BLUE) VRF Router ID 10.30.30.1
* 2001:DB8:30::/64 2001:DB8:30::2 0 0 65002 ?
*> :: 0 32768 ?
*> 2001:DB8:30:30::30/128
:: 0 32768 ?
*> 2001:DB8:30:30::33/128
2001:DB8:30::2 0 0 65002 ?

Pretty easy, right?