The Journey of a Network Engineer

Feb 13 2012   10:33AM GMT

How to configure VRF-lite?

Sulaiman Syed Profile: Sulaiman Syed

VRF-lite is as the name says, light version of VRF. What is VRF? It is Virtual Routing and Forwarding. It is a logical way of segregating network traffic. Mostly used with MPLS-VPN. So, lets what what is VRF-lite

According to Cisco VRF considered to be “lite” without using MPLS. Which means that creating interfaces, and running routing protocols without the use of MPLS will make it VRF-lite.

To configure VRF-lite, follow the steps:

  1. Define the VRF instance by using ip vrf name
  2. Give the appropriate rd values rd nn:nn
  3. If using BGP, then add route-targets {export/import} nn:nn
  4. Add the Interface to the VRF by using the command ip vrf forwarding name
The above is a sample configuration of creating VRF-lite, different routing protocols have different syntax and ways of creating them for respective VRFs.

VRF-lite

For simple router to router connection that is shown in the image. The following code can be used
R1
ip vrf VPN_A
rd 100:1
!
ip vrf VPN_B
rd 100:2
!
interface FastEthernet0/0.67
encapsulation dot1Q 67
ip vrf forwarding VPN_A
ip address 155.1.67.6 255.255.255.0
!
interface FastEthernet0/0.76
encapsulation dot1Q 76
ip vrf forwarding VPN_B
ip address 155.1.76.6 255.255.255.0
!
ip route vrf VPN_A 172.16.7.0 255.255.255.0 155.1.67.7
ip route vrf VPN_B 192.168.7.0 255.255.255.0 155.1.76.7
R2
!
ip vrf VPN_A
rd 100:1
!
ip vrf VPN_B
rd 100:2
!
!
interface Loopback101
ip vrf forwarding VPN_A
ip address 172.16.7.7 255.255.255.0
!
interface Loopback102
ip vrf forwarding VPN_B
ip address 192.168.7.7 255.255.255.0
!
!
interface Vlan67
ip vrf forwarding VPN_A
ip address 155.1.67.7 255.255.255.0
!
interface Vlan76
ip vrf forwarding VPN_B
ip address 155.1.76.7 255.255.255.0
!
ip route vrf VPN_A 0.0.0.0 0.0.0.0 155.1.67.6
ip route vrf VPN_B 0.0.0.0 0.0.0.0 155.1.76.6
The configuration above will create the VRF, add static routing for the loopback interfaces. It is simple and straight forward. The above configuration can be used WITHOUT the rd command. Although it is recommended to use it.

 Comment on this Post

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when other members comment.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to: