how to set priority of routers in ospf

Ondrej Zajicek santiago at crfreenet.org
Tue Oct 27 23:09:46 CET 2009


On Tue, Oct 27, 2009 at 10:00:07PM +0100, Martin Kraus wrote:
> > In both cases they are Type 2 external routes and are compared according
> > to ospf_metric2.
> 
> Thanks for the explanation. So if I've got two E2 routes with the same type 2
> metric to the same destination several hops away from a given router to which 
> there are two ways, it doesn't mean the shorter way will be used based on type
> 1 metric. 

Really, in the case of a tie, shorter way will be used. I omitted this case
for simplicity.

There is a simple explanation: consider there is just one metric, which
is a triple (K, M2, M1), where K is a kind of a route (0 for I, 1 for
E1, 2 for E2), M2 is ospf_metric2 for E2, zero for others and M1 is
ospf_metric1. Then the route with smaller triple is preferred (the
triples are lexicographically ordered).

> One (hopefuly) final question. How does bird determine what route to designate
> as E1? All I've got from bird are either E2 or Internal routes.

If external route is exported to OSPF, you can set ospf_metric1 or
ospf_metric2 using filters.

If just ospf_metric1 is set, route becomes E1.
If just ospf_metric2 is set, route becomes E2.
If nothing is set, E2 with ospf_metric2 = 10000 is the default.
If both are set (uninteresting corner case), ospf_metric2 is ignored.

-- 
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: 197 bytes
Desc: Digital signature
URL: <http://trubka.network.cz/pipermail/bird-users/attachments/20091027/7fadc220/attachment-0001.asc>


More information about the Bird-users mailing list