VRF's are primarily used within an MPLS network. Put simply each vrf is a virtual router running on a physical router. So as an example you could have 2 vrf's on a single router
If you do a "sh ip route" on the router then you will see routes that are in the global routing table. You will not see routes that belong to VRFA or VRFB.
If you type
"sh ip route vrf VRFA" then you will see routes belonging to VRFA but not VRFB nor the global routing table.
"sh ip route vrf VRFB" will show only routes belonging to VRFB.
So how does the router know which routing table to use ?
Well you assign router interfaces into VRF's.
So lets say the router has 4 interfaces
ip vrf forwarding VRFA
ip vrf forwarding VRFB
and you leave int fa0/0 and fa0/1 as they are.
Any packets received on fa1/0 will use the VRFA routing table to forward packets.
Any packets received on fa1/1 will use the VRFB routing table to forward packets.
Any packets on fa0/0 or fa0/1 will use the global routing tables.
One of the main uses of VRF's is to allow the creation of VPN's within an MPLS network. VRF's allow a service provider to have multiple customers connecting to the same router each with a totally separate VRF on that router which keeps all customer traffic logically separate.
Hope this has helped
Thanks for the above input!
Can you let me know on which Router we use VRF and configure VRF. for ex on PE/P router or CE/C Router.
VRFs can be configured on both the PE's as well as the CE's
When the VRF's are configured on the CE's it is callled VRF-lite or MVRF. The only difference between the two is that VRF lite does not require MP-BGP
Firstly, apologies for getting your name wrong.
Secondly, that is quite a big question. At it's most basic the config would look like
ip vrf VRFA
route-target export 100:20
route-target import 100:20
ip vrf forwarding VRFA
However there is a lot more to it than this. You need some way to exchange routes between VRF's on different routers - MP-BGP is often used.
It would be a good idea to have a seach on Cisco web site for a good intro to MPLS which you need to then understand VPN's etc on MPLS.
Have a look at the this for a basic MPLS VPN example. This does not tlak about VRF lite but is a good one to start