[c-nsp] How to connect two VRFs on the same router? (without aloop-cable)

Oliver Boehmer (oboehmer) oboehmer at cisco.com
Sat Jul 21 08:29:07 EDT 2007


Gunther Stammwitz <> wrote on Saturday, July 21, 2007 12:24 PM:

> Hello colleagues,
> 
> I've built two vrfs on the same router and have attached interfaces
> to them and everything is fine so far.
> Now I'd like to router from one vrf to the other one.
> The only way how this can be achieved seems to me to use two
> interfaces on the same router and to connect them with a cable. This
> might look rather stupid when there's a cable coming out of the
> router and going into it again. 
> 
> Isn't there a way how this can be achieved in software????

is this a vrf-lite setup (i.e. no MPLS, no vpnv4 iBGP)? If so, the
following should do it

ip vrf v1
 rd 1:1
 route-target both 1:100
ip vrf v2
 rd 1:2
 route-target both 1:100
!
router bgp xxx
 address-family ipv4 vrf v1
  redistribute static 
  redistribute ...
 address-family ipv4 vrf v2
  redistribute static 
  redistribute ... 

You need the routes in BGP, and then you can use the route-target
mechanism to control selective route import..

	oli


More information about the cisco-nsp mailing list