bgp route selection

Frederik Kriewitz frederik at kriewitz.eu
Tue Apr 8 19:11:36 CEST 2014


Hello Thomas,

On Tue, Apr 8, 2014 at 5:50 PM, Thomas Goldberg <t.goldberg77 at gmail.com> wrote:
> 2014-04-07 18:29 GMT+02:00 Ondrej Zajicek <santiago at crfreenet.org>:
>> Hello
>>
>> That is because only resolvable routes are considered (RFC 4271 9.1.2.1),
>> main reason for that condition is to eliminate routes whose bgp_next_hop
>> cannot be resolved using IGP, it also affects routes whose bgp_next_hop
>> is resolved to a unreachable/blackhole/prohibit route.
>>
>> In your case, it could be fixed by adding higher protocol preference
>> (different attribute than bgp_local_pref, currently 100) to b_rr1.
>
> Unfortunately increasing the preference of the b_rr1 session is not an
> option as from my understanding it would completely eliminate the bgp
> route selection rules (All routes learned via b_rr1 are preferred over
> b_dtag1).
> Is there any other solution for this besides doubling the iBGP
> connections (adding seperate blackhole only sessions with higher
> preference)?

We faced the same problem in the past.
The preference can be set on a per route basis during the import.
If you add the following line to your import filter it should do the
trick for you:
preference = bgp_local_pref;
That way the bgp local preference is used as the bird internal preference too.

Having read only the mentioned section of RFC 4271 someone might argue
that bird should consider blackhole routes as resolvable too:

"A route Rte1, referencing only the intermediate network
address, is considered resolvable if the Routing Table contains
at least one resolvable route Rte2 that matches Rte1's
intermediate network address and is not recursively resolved
(directly or indirectly) through Rte1."
Based on your example:
Rte1 is 64.112.128.0/18 with next_hop = 192.168.2.11
Rte2 is a route which resolves 192.168.2.11 to the blackhole interface
So Rte1 can be resolved using Rte2 and should be considered resolvable.

That's how it's implemented on our alcatel/cisco/juniper routers too,
bird seems to be the exception here.
Overall I'm a little confused about the implementation now too. If the
next hop is not resolvable it shouldn't be concidered at all but bird
apparently still considers blackhole routes as a last resort or with
higher bird preference.

Best Regards,
Frederik Kriewitz



More information about the Bird-users mailing list