Hi Claudio,
It works at 90% thanks.

The last 10% are still not working. On PE1 I have 2 Rdomains (20,30) and PE2 1
rdomain (20). On PE1 I want the rdomain 20 routes to be imported in rdomain 30
(locally), but that doesn't seem to work locally, here are the details.

Rimi

rdomain 20 PE1: 172.16.35.0/24
rdomain 30 PE1: 172.16.33.0/24
rdomain 20 PE2: 172.16.39.0/24

PE1:
rdomain 20 {
                rd 1.1.1.1:20
                import-target rt 2.2.2.2:20
                import-target rt 1.1.1.1:30
                export-target rt 1.1.1.1:20
                depend on mpe20
                network inet connected
}

rdomain 30 {
                rd 1.1.1.1:30
                import-target rt 2.2.2.2:20
                import-target rt 1.1.1.1:20
                export-target rt 1.1.1.1:30
                depend on mpe20
                network inet connected
}

PE2:
rdomain 20 {
                rd 2.2.2.2:20
                import-target rt 1.1.1.1:20
                import-target rt 1.1.1.1:30
                export-target rt 2.2.2.2:20
                depend on mpe20
                network inet connected
}

PE1:
# bgpctl show fib table 20
flags: * = valid, B = BGP, C = Connected, S = Static
       N = BGP Nexthop reachable via this route
       r = reject route, b = blackhole route

flags prio destination          gateway
*C       0 127.0.0.0/8          link#0
*C       4 172.16.35.0/24       link#2
*B      48 172.16.39.0/24       2.2.2.2
*C       0 ::1/128              link#0

# bgpctl show fib table 30
flags: * = valid, B = BGP, C = Connected, S = Static
       N = BGP Nexthop reachable via this route
       r = reject route, b = blackhole route

flags prio destination          gateway
*C       0 127.0.0.0/8          link#0
*C       4 172.16.33.0/24       link#3
*B      48 172.16.39.0/24       2.2.2.2
*C       0 ::1/128              link#0

PE2:
# bgpctl show fib table 20
flags: * = valid, B = BGP, C = Connected, S = Static
       N = BGP Nexthop reachable via this route
       r = reject route, b = blackhole route

flags prio destination          gateway
*C       0 127.0.0.0/8          link#0
*B      48 172.16.33.0/24       1.1.1.1
*B      48 172.16.35.0/24       1.1.1.1
*C       4 172.16.39.0/24       link#3
*C       0 ::1/128              link#0


Le 4 avr. 2012 ` 21:07, Claudio Jeker a icrit :

> On Wed, Apr 04, 2012 at 02:43:04PM +0200, Rimi Philippe wrote:
>> Thanks Claudio.
>> The way I see it is that RD are only local, they identify the VRF (or
>> rdomain) locally on the router, then the RT import / export handles
>> the way the routes are distributed. This permits the hub & spoke
>> approach for example.
>>
>> If you need help on the testing side feel free to send me the code,
>> I'll give it a try.
>>
>
> Give this a try.
>
> --
> :wq Claudio
>
> Index: bgpd.conf.5
> ===================================================================
> RCS file: /cvs/src/usr.sbin/bgpd/bgpd.conf.5,v
> retrieving revision 1.116
> diff -u -p -r1.116 bgpd.conf.5
> --- bgpd.conf.5       17 Sep 2011 16:29:44 -0000      1.116
> +++ bgpd.conf.5       4 Apr 2012 18:46:54 -0000
> @@ -494,13 +494,13 @@ for further information about the argume
> .Pp
> .It Ic rd Ar as-number Ns Li : Ns Ar local
> .It Ic rd Ar IP Ns Li : Ns Ar local
> -The Route Distinguishers uniquely identifies a set of VPN prefixes.
> -Only prefixes matching the
> +The sole purpose of the Route Distinguisher
> .Ic rd
> -will be imported into the routing domain.
> -The purpose of the
> +is to ensure that possible common prefixes are destinct between VPNs.
> +The
> .Ic rd
> -is solely to allow one to create distinct routes to a common address
prefix.
> +is neither used to identify the origin of the prefix nor to control into
> +which VPNs the prefix is distributed to.
> The
> .Ar as-number
> or
> Index: rde.c
> ===================================================================
> RCS file: /cvs/src/usr.sbin/bgpd/rde.c,v
> retrieving revision 1.312
> diff -u -p -r1.312 rde.c
> --- rde.c     27 Mar 2012 18:22:07 -0000      1.312
> +++ rde.c     4 Apr 2012 15:40:41 -0000
> @@ -2414,8 +2414,6 @@ rde_send_kroute(struct prefix *new, stru
>                       break;
>
>               SIMPLEQ_FOREACH(rd, rdomains_l, entry) {
> -                     if (addr.vpn4.rd != rd->rd)
> -                             continue;
>                       if (!rde_rdomain_import(p->aspath, rd))
>                               continue;
>                       /* must send exit_nexthop so that correct MPLS tunnel

Reply via email to