iBGP and Next-Hop cost

Ondrej Zajicek santiago at crfreenet.org
Thu Sep 10 16:01:15 CEST 2015


On Thu, Sep 10, 2015 at 02:21:36PM +0100, Adam Priestley wrote:
> On 10 September 2015 at 12:03, Ondrej Zajicek <santiago at crfreenet.org>
>  wrote:
> 
> >
> > I examined it and for some reason[*] BIRD does not accept OSPF type-2
> > external metric as IGP metric for the purpose of recursive route
> > comparison. There are two solutions, either export that static routes to
> > OSPF as type-1 external routes instead of type-2 external routes, or set
> > the ipg_metric route attribute explicitly in OSPF import filters (e.g.
> > 'igp_metric = ospf_metric1' would use ospf_metric1 always even for type-2
> > external route).
> >
> > [*] Probably because type-2 external routes have both type-2 metric and
> > regular metric, both have 24-bit range and it would be problematic
> > to compress that into 32-bit igp metric range.
> >
> 
> 
> Hi Ondrej,
> 
> Thanks for your assistance. I will try what you've suggested, but I'd just
> like to make sure I understand you.
> 
> You mention static routes, but there are none in my configuration. OSPF is
> learning linknets and router loopbacks only, this particular /32 is only
> ever known to BGP. Are you saying that when OSPF is learning the linknets
> that ultimately provide the routes used for next-hop, I should be applying
> the 'igp_metric = ospf_metric1' filter?


I mean 10.13.82.64/27 on router 10.13.83.2 (or 10.13.81.64/27 on
10.13.83.5). These are E2 routes at discussed router, which means that
they are exported to OSPF at 10.13.83.2 (10.13.83.5). I guessed
static, but they could be from other protocol like direct.

You could set 'ospf_metric1 = XXX' in export filter at their source router
to export them as E1 routes with specified initial E1 metric instead of as
E2 routes (default, with initial 10000 E2 metric)

Or if these routes are direct routes at their source router (10.13.83.2 ...),
you could configure stub/passive OSPF interfaces on appropriate interfaces
and not export these routes (10.13.82.64/27 / 10.13.81.64/27) to OSPF as
external routes. Hence, they would be propagated as OSPF internal routes.

Or third possibility (but probably least appropriate), would be to keep
these routes as E2, but setup 'igp_metric = ospf_metric1' in import filter
from OSPF at the discussed router (one with BGP).

-- 
Elen sila lumenn' omentielvo

Ondrej 'Santiago' Zajicek (email: santiago at crfreenet.org)
OpenPGP encrypted e-mails preferred (KeyID 0x11DEADC3, wwwkeys.pgp.net)
"To err is human -- to blame it on a computer is even more so."
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: Digital signature
URL: <http://trubka.network.cz/pipermail/bird-users/attachments/20150910/648aec7f/attachment.asc>


More information about the Bird-users mailing list