Configuring VRF Lite
Configuring VRF Lite
Configuring VRF-lite
1
Configuring VRF-lite
Guidelines for Configuring VRF-lite
• Provider routers (or core routers) are any routers in the service provider network that do not attach to CE
devices.
With VRF-lite, multiple customers can share one CE. The shared CE maintains separate VRF tables for each
customer and switches or routes packets for each customer based on its own routing table. VRF-lite allows a
CE device to maintain separate VRF tables to extend the privacy and security of a VPN to the branch office.
The following figure displays a configuration where each Cisco Catalyst switch acts as multiple virtual CEs.
Because VRF-lite is a Layer 3 feature, each interface in a VRF must be a Layer 3 interface.
To configure VRF, create a VRF table and specify the Layer 3 interface associated with the VRF.
IPv4 Specific
• The Cisco Catalyst switch supports PIM-SM and PIM-SSM protocols.
IPv6 specific
• VRF-aware OSPFv3, EIGRPv6, and IPv6 static routing are supported.
• VRF-aware IPv6 route applications include: ping, telnet, ssh, tftp, ftp and traceroute. (This list does not
include the management interface, which is handled differently even though you can configure both IPv4
or IPv6 VRF under it.)
Configuring VRF-lite
2
Configuring VRF-lite
How to Configure VRF-lite
Procedure
Step 2 arp vrf vrf-name ip-address mac-address ARPA Creates a static ARP entry in the specified VRF.
Example:
Device(config)# arp vrf vrf-name
ip-address mac-address ARPA
Configuring VRF-lite
3
Configuring VRF-lite
Configuring Per-VRF for TACACS+ Servers
Procedure
Step 8 ip address ip-address mask [secondary] Sets a primary or secondary IP address for an
interface.
Example:
Device(config-if)# ip address ip-address
mask [secondary]
Step 10 aaa group server tacacs+ group-name Groups different TACACS+ server hosts into
distinct lists and distinct methods and enters
Example:
server-group configuration mode.
Device(config)# aaa group server tacacs+
tacacs1
Configuring VRF-lite
4
Configuring VRF-lite
Configuring Multicast VRFs
Step 13 ip tacacs source-interface subinterface-name Uses the IP address of a specified interface for
all outgoing TACACS+ packets.
Example:
Device(config-sg-tacacs+)# ip tacacs
source-interface subinterface-name
Example
The following example lists all the steps to configure per-VRF TACACS+:
Device> enable
Device# configure terminal
Device(config)# ip vrf cisco
Device(config-vrf)# rd 100:1
Device(config-vrf)# exit
Device(config)# interface Loopback0
Device(config-if)# vrf forwarding cisco
Device(config-if)# ip address 10.0.0.2 255.0.0.0
Device(config-if)# exit
Device(config-sg-tacacs+)# vrf forwarding cisco
Device(config-sg-tacacs+)# ip tacacs source-interface Loopback0
Device(config-sg-tacacs)# exit
Procedure
Configuring VRF-lite
5
Configuring VRF-lite
Configuring Multicast VRFs
Step 6 route-target {export | import | both} Creates a list of import, export, or import and
route-target-ext-community export route target communities for the
specified VRF. Enter either an AS system
Example:
number and an arbitrary number (xxx:y) or an
Device(config-vrf)# route-target {export IP address and an arbitrary number
| import | both}
route-target-ext-community (A.B.C.D:y).
The route-target-ext-community value should
be the same as the route-distinguisher value
entered in Step 4.
Step 7 import map route-map (Optional) Associates a route map with the
VRF.
Example:
Device(config-vrf)# import map route-map
Step 9 vrf forwarding vrf-name Associates the VRF with the Layer 3 interface.
Example:
Device(config-if)# vrf forwarding
vrf-name
Step 10 ip address ip-address mask Configures IP address for the Layer 3 interface.
Example:
Device(config-if)# ip address ip-address
mask
Configuring VRF-lite
6
Configuring VRF-lite
Configuring IPv4 VRFs
Step 13 show ip vrf [brief | detail | interfaces] Verifies the configuration. Display information
[vrf-name] about the configured VRFs.
Example:
Device# show ip vrf brief
Example
The following example shows how to configure multicast within a VRF table:
Device(config)# ip routing
Device(config)# ip vrf multiVrfA
Device(config-vrf)# ip multicast-routing vrf multiVrfA
Device(config-vrf)# interface GigabitEthernet3/1/0
Device(config-if)# vrf forwarding multiVrfA
Device(config-if)# ip address 172.21.200.203 255.255.255.0
Device(config-if)# ip pim sparse-mode
Procedure
Configuring VRF-lite
7
Configuring VRF-lite
Configuring IPv4 VRFs
Step 5 route-target {export | import | both} Creates a list of import, export, or import and
route-target-ext-community export route target communities for the
specified VRF. Enter either an AS system
Example:
number and an arbitrary number (xxx:y) or an
Device(config-vrf)# route-target {export IP address and an arbitrary number
| import | both}
route-target-ext-community (A.B.C.D:y).
Step 6 import map route-map (Optional) Associates a route map with the
VRF.
Example:
Device(config-vrf)# import map route-map
Step 8 vrf forwarding vrf-name Associates the VRF with the Layer 3 interface.
Example:
Device(config-if)# vrf forwarding
vrf-name
Step 10 show ip vrf [brief | detail | interfaces] Verifies the configuration. Displays
[vrf-name] information about the configured VRFs.
Example:
Device# show ip vrf [brief | detail |
interfaces] [vrf-name]
Configuring VRF-lite
8
Configuring VRF-lite
Configuring VRF-lite for IPv6
Procedure
Configuring VRF-lite
9
Configuring VRF-lite
Configuring the User Interface for Traceroute
Procedure
Step 5 ipv6 address ip-address subnet-mask Enters the IPv6 address for the interface.
Example:
Device(config-if)# ip address ip-address
mask
Step 6 ipv6 verify unicast source reachable-via rx Enables uRPF on the interface.
allow-default
Example:
Device(config-if)# ipv6 verify unicast
source reachable-via
rx allow-default
Procedure
Configuring VRF-lite
10
Configuring VRF-lite
Configuring the User Interface for Telnet and SSH
Procedure
Step 2 ssh -l username -vrf vrf-name ipv6-host Connects through SSH to an IPv6 host or
address in the specified VRF.
Example:
Device# ssh -l username -vrf vrf-name
ipv6-host
Procedure
Step 2 ntp server vrf vrf-name ipv6-host Configure the NTP server in the specified VRF.
Example:
Device(config)# ntp server vrf vrf-name
ipv6-host
Step 3 ntp peer vrf vrf-name ipv6-host Configure the NTP peer in the specified VRF.
Example:
Device(config)# ntp peer vrf vrf-name
ipv6-host
Procedure
Configuring VRF-lite
11
Configuring VRF-lite
Configuring IPv6 VRFs
Step 5 route-target {export | import | both} Creates a list of import, export, or import and
route-target-ext-community export route target communities for the
specified VRF. Enter either an AS system
Example:
number and an arbitrary number (xxx:y) or an
Device(config-vrf)# route-target {export IP address and an arbitrary number
| import | both}
route-target-ext-community (A.B.C.D:y).
Note
This command is effective only if BGP is
running.
Configuring VRF-lite
12
Configuring VRF-lite
Associating Interfaces to the Defined VRFs
Example
This example shows how to configure VRFs:
Procedure
Step 3 vrf forwarding vrf-name Associates the VRF with the Layer 3 interface.
Example:
Device(config-if)# vrf forwarding
vrf-name
Step 5 ipv6 address ip-address subnet-mask Enters the IPv6 address for the interface.
Example:
Device(config-if)# ipv6 address
ip-address subnet-mask
Step 6 show ipv6 vrf [brief | detail | interfaces] Verifies the configuration. Displays information
[vrf-name] about the configured VRFs.
Example:
Device# show ipv6 vrf [brief | detail |
interfaces] [vrf-name]
Configuring VRF-lite
13
Configuring VRF-lite
Populate VRF with Routes via Routing Protocols
Example
This example shows how to associate an interface to VRFs:
Switch(config-vrf)# interface ethernet0/1
Switch(config-if)# vrf forwarding red
Switch(config-if)# ipv6 enable
Switch(config-if)# ipv6 address 5000::72B/64
Procedure
Step 2 ipv6 route [vrf vrf-name] To configure static routes specific to VRF.
ipv6-prefix/prefix-length {ipv6-address |
interface-type interface-number
[ipv6-address]}
Example:
Device(config)# ipv6 route [vrf vrf-name]
ipv6-prefix/prefix-length {ipv6-address
| interface-type interface-number
[ipv6-address]}
Example
Device(config)# ipv6 route vrf v6a 7000::/64 TenGigabitEthernet32 4000::2
Configuring VRF-lite
14
Configuring VRF-lite
Configuring OSPFv3 Router Process
Procedure
Step 2 router ospfv3 process-id Enables OSPFv3 router configuration mode for
the IPv6 address family.
Example:
Device(config)# router ospfv3 process-id
Step 3 area area-ID [default-cot | nssa | stub] Configures the OSPFv3 area.
Example:
Device(config-router)# area area-ID
[default-cot | nssa | stub]
Step 5 address-family ipv6 unicast vrf vrf-name Enters IPv6 address family configuration mode
for OSPFv3 in VRF vrf-name
Example:
Device(config-router)# address-family
ipv6 unicast vrf vrf-name
Step 6 redistribute source-protocol [process-id] Redistributes IPv6 routes from one routing
options domain into another routing domain.
Example:
Device(config-router)# redistribute
source-protocol [process-id] options
Example
This example shows how configure the OSPFv3 router process:
Device(config-router)# router ospfv3 1
Device(config-router)# router-id 1.1.1.1
Device(config-router)# address-family ipv6 unicast
Device(config-router-af)# exit-address-family
Configuring VRF-lite
15
Configuring VRF-lite
Enabling OSPFv3 on an Interface
Procedure
Step 3 ospfv3 process-id area area-ID ipv6 [instance Enables OSPFv3 on an interface with IPv6 AF.
instance-id]
Example:
Device(config-if)# ospfv3 process-id area
area-ID ipv6 [instance instance-id]
Example
This example show how to enable OSPFv3 on an interface:
Device(config)# interface GigabitEthernet2/1
Device(config-if)# no switchport
Device(config-if)# ipv6 address 4000::2/64
Device(config-if)# ipv6 enable
Device(config-if)# ipv6 ospf 1 area 0
Device(config-if)# end
Procedure
Step 2 router eigrp virtual-instance-name Configures the EIGRP routing process and
enters router configuration mode.
Example:
Device(config)# router eigrp
virtual-instance-name
Configuring VRF-lite
16
Configuring VRF-lite
Additional Information for VRF-lite
Step 4 topology {base | topology-name tid number Configures an EIGRP process to route IP traffic
under the specified topology instance and enters
Example:
address family topology configuration mode.
Device(config-router-af)# topology {base
| topology-name tid number
Example
This example shows how to configure an EIGRP routing process:
Configuring VRF-lite
17
Configuring VRF-lite
VPN Co-existence Between IPv4 and IPv6
In this example, all addresses (v4 and v6) defined for Ethernet0/0 refer to VRF red whereas for Ethernet0/1,
the IP address refers to VRF blue but the ipv6 address refers to the global IPv6 routing table.
Command Purpose
Device# show ip protocols vrf vrf-name Displays routing protocol information associated with
a VRF.
Device# show ip route vrf vrf-name Displays IP routing table information associated with
[connected] [protocol a VRF.
[as-number]] [list] [mobile] [odr]
[profile] [static]
[summary][supernets-only]
Configuring VRF-lite
18
Configuring VRF-lite
Configuration Examples for VRF-lite
Command Purpose
Device#bidir vrf instance-name a.b.c.d | Displays information about the defined VRF instances.
active | bidriectional| count |
interface | proxy | pruned | sparse |
ssm | static | summary
This example shows how to display multicast route table information within a VRF instance:
Switch# show ip mroute 226.0.0.2
IP Multicast Routing Table
Flags: S - Sparse, B - Bidir Group, s - SSM Group, C - Connected,
L - Local, P - Pruned, R - RP-bit set, F - Register flag,
T - SPT-bit set, J - Join SPT, M - MSDP created entry, E - Extranet,
X - Proxy Join Timer Running, A - Candidate for MSDP Advertisement,
U - URD, I - Received Source Specific Host Report,
Z - Multicast Tunnel, z - MDT-data group sender,
Y - Joined MDT-data group, y - Sending to MDT-data group,
G - Received BGP C-Mroute, g - Sent BGP C-Mroute,
N - Received BGP Shared-Tree Prune, n - BGP C-Mroute suppressed,
Q - Received BGP S-A Route, q - Sent BGP S-A Route,
V - RD & Vector, v - Vector, p - PIM Joins on route,
x - VxLAN group, c - PFP-SA cache created entry
Outgoing interface flags: H - Hardware switched, A - Assert winner, p - PIM Join
Timers: Uptime/Expires
Interface state: Interface, Next-Hop or VCD, State/Mode
Configuring VRF-lite
19
Configuring VRF-lite
Configuration Example for IPv6 VRF-lite
vrf definition v2
rd 200:1
!
address-family ipv6
exit-address-family
!
interface Vlan100
vrf forwarding v1
ipv6 address 1000:1::1/64
ospfv3 100 ipv6 area 0
!
interface Vlan200
vrf forwarding v2
ipv6 address 2000:1::1/64
ospfv3 200 ipv6 area 0
!
Configuring VRF-lite
20
Configuring VRF-lite
Configuration Example for IPv6 VRF-lite
!
address-family ipv6 unicast vrf v1
redistribute connected
area 0 normal
exit-address-family
!
Configuring PE Switch
ipv6 unicast-routing
vrf definition v1
rd 100:1
!
address-family ipv6
exit-address-family
!
vrf definition v2
rd 200:1
!
address-family ipv6
exit-address-family
!
interface Vlan600
vrf forwarding v1
no ipv6 address
ipv6 address 1000:1::2/64
ospfv3 100 ipv6 area 0
!
interface Vlan700
vrf forwarding v2
no ipv6 address
ipv6 address 2000:1::2/64
ospfv3 200 ipv6 area 0
!
interface Vlan800
vrf forwarding v1
ipv6 address 3000:1::7/64
ospfv3 100 ipv6 area 0
!
interface Vlan900
vrf forwarding v2
ipv6 address 4000:1::7/64
ospfv3 200 ipv6 area 0
!
Configuring VRF-lite
21
Configuring VRF-lite
Configuration Example for IPv6 VRF-lite
vrf definition v1
rd 100:1
!
address-family ipv6
exit-address-family
!
vrf definition v2
rd 200:1
!
address-family ipv6
exit-address-family
!
interface Vlan100
vrf forwarding v1
interface Vlan200
vrf forwarding v2
ipv6 address 2000:1::3/64
ospfv3 200 ipv6 area 0
!
Configuring VRF-lite
22
Configuring VRF-lite
Additional References for VRF-Lite
router-id 40.40.40.40
!
address-family ipv6 unicast vrf v1
redistribute connected
area 0 normal
exit-address-family
!
area 0 normal
exit-address-family
!
Standard/RFC Title
RFC 6763 DNS-Based Service Discovery
IPv6 Multicast support Cisco IOS XE Everest 16.6.1 IPv6 VRF-Lite allows a
with VRF-Lite service provider to
support two or more
VPNs with overlapping IP
addresses using one
interface.
Configuring VRF-lite
23
Configuring VRF-lite
Feature History and Information for Multicast VRF-lite
Configuring VRF-lite
24