Re: VRFs: exporting partial routes without MBGP

From: Rich Collins <nilsi2002_at_gmail.com>
Date: Fri, 4 Jun 2010 18:14:03 -0400

Hello,

I think that this is similar to your previous posting and can be
solved the same way. You can use a BGP process on R2 with no peering.

In my example I have R1 on VRF A and R3 on VRF B.

R3 should only see some of the VRF A routes (not the 1.1.1.1 loopback0
from R1 for example).

-Rich

R1#sh ip route rip
     23.0.0.0/24 is subnetted, 1 subnets
R 23.23.23.0 [120/1] via 12.12.12.2, 00:00:09, FastEthernet0/0
R1#

R1#sh ip rip database
1.0.0.0/8 auto-summary
1.1.1.1/32 directly connected, Loopback0
11.0.0.0/8 auto-summary
11.11.11.11/32 directly connected, Loopback1
12.0.0.0/8 auto-summary
12.12.12.0/24 directly connected, FastEthernet0/0
23.0.0.0/8 auto-summary
23.23.23.0/24
    [1] via 12.12.12.2, 00:00:03, FastEthernet0/0
R1#

hostname R2
!
ip vrf A
 rd 1:1
 export map R1export
 route-target export 1:1
 route-target import 1:1
 route-target import 2:2
!
ip vrf B
 rd 2:2
 route-target export 2:2
 route-target import 1:10
!
!
interface Loopback0
 ip address 2.2.2.2 255.255.255.255
 ip pim sparse-mode
!
interface FastEthernet0/0
 ip vrf forwarding A
 ip address 12.12.12.2 255.255.255.0
 duplex half
!
interface FastEthernet1/0
 ip vrf forwarding B
 ip address 23.23.23.2 255.255.255.0
 duplex half
 no clns route-cache
!
router rip
 !
 address-family ipv4 vrf B
  redistribute bgp 1 metric 1
  network 23.0.0.0
  no auto-summary
  version 2
 exit-address-family
 !
 address-family ipv4 vrf A
  redistribute bgp 1 metric 1
  network 12.0.0.0
  no auto-summary
  version 2
 exit-address-family
!
router bgp 1
 no synchronization
 bgp log-neighbor-changes
 no auto-summary
 !
address-family ipv4 vrf B
   redistribute rip
  no auto-summary
  no synchronization
 exit-address-family
 !
 address-family ipv4 vrf A
    redistribute rip
  no auto-summary
  no synchronization
 exit-address-family
!
!
ip prefix-list VRFA seq 5 permit 11.11.11.11/32
ip prefix-list VRFA seq 10 permit 12.12.12.0/24

route-map R1export permit 10
 match ip address prefix-list VRFA
 set extcommunity rt 1:10 additive
!
R3#sh ip route rip
     11.0.0.0/32 is subnetted, 1 subnets
R 11.11.11.11 [120/1] via 23.23.23.2, 00:00:10, FastEthernet0/0
     12.0.0.0/24 is subnetted, 1 subnets
R 12.12.12.0 [120/1] via 23.23.23.2, 00:00:10, FastEthernet0/0
R3#

On Thu, Jun 3, 2010 at 9:59 PM, Radioactive Frog <pbhatkoti_at_gmail.com> wrote:
> R1-------R2
> \-------R3
>
> R1 interconnect with R2 (VRF BLUE) and R3 (VRF GREEN) via MBGP.
>
> On R1 I want I want to import export routes of BLUE and GREEN into "RED"
> vrf. when I use below route-target impot/export it works. I can see all
> routes from BLUE and GREEN into "RED".
>
> ---------R1 conf-----------
> ip vrf RED
> rd 100:1
>
> route-target export 100:1
> route-target import 100:2
> route-target import 100:3
>
> ip vrf BLUE
> rd 100:2
> route-target export 100:2
> route-target import 100:1
>
> ip vrf GREEN
> rd 100:3
> route-target export 100:3
> route-target import 100:1
>
> Everything works. I can see BLUE and GREEN VRF route on R1 into VRF RED.
>
>
> Now I want to to export a partial routing table from GREEN and BLUE vrf to
> RED vrf.
>
> I have tried with 'export map' command but it needs BGP peering. My scenario
> is my all 3 VRFs are in R1.
> So can we do partial routing table export/import on the same router with
> BGP?
>
> thanks
>
>
> Blogs and organic groups at http://www.ccie.net
>
> _______________________________________________________________________
> Subscription information may be found at:
> http://www.groupstudy.com/list/CCIELab.html

Blogs and organic groups at http://www.ccie.net
Received on Fri Jun 04 2010 - 18:14:03 ART

This archive was generated by hypermail 2.2.0 : Sun Aug 01 2010 - 09:11:37 ART