How to insert routes into VRFs on a Multi-VRF CE router?

Unanswered Question
Jul 29th, 2008
User Badges:

I have a 7206 CE router running multi-VRF with its PE. There are 3 VRF's configured between the CE and the PE. Let's call them VPN1, VPN2, and VPN3.

The CE has static routes, OSPF routes, and BGP routes from various sources. I want to selectively insert different combimations of those routes into the 3 VRF's. What's a good way to do it?

I'm thinking under the "address-family" config, just use "redistribute static route-map ..." and "redistribute OSPF route-map ..." to get static routes and OSPF routes into a VRF with the use of route-maps. For BGP routes, under "address-family" config, use "neighbor ... route-map" to select BGP routes into the VRF with the use of a route-map.

I;ve never used the "neighbor" statement with a route-map in address-family config.

Thanks for your help.


  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 0 (0 ratings)
lee.reade Wed, 07/30/2008 - 00:07
User Badges:
  • Silver, 250 points or more


You cannot use route-maps under the address family to achieve this, as this will try to redist the routes from the vrf route table, which the routes you desire are not located, they are in the global table.

You can either create static routes in the vrf and point to a next hop in the global table, then redist into the address-family or you can use the import map feature to selectively import routes into your vrf.

However, remember that your routes need to work both ways, that is once your global routes are in your vrf table, for end to end reachability, the global table will need the routes back to the vrf sources.

Check out;



gwhuang5398 Wed, 07/30/2008 - 11:01
User Badges:


Thanks a lot for the help. How can I let the global table know which source network is in which VRF? So the return traffic can be routed to the right VRF.




This Discussion