Primary route confusion

Ondrej Zajicek santiago at crfreenet.org
Fri Sep 21 12:44:04 CEST 2018


On Fri, Sep 21, 2018 at 06:51:17AM +0000, Kenth Eriksson wrote:
> Hi!
> 
> The primary route in BIRD, marked by '*', confuses me. Consider the
> following two default routes as displayed by BIRD (2.0.2) and the Linux
> kernel (4.14.51+).  
> 
> bird> show route 
> Table master4:
> 0.0.0.0/0            unicast [ospf1 19:54:43.687] * E1 (110/350)
> [172.20.4.41]
> 	via 172.20.4.41 on p1-1-1-1-2
>                      unicast [kernel1 19:47:39.563] (40)
> 	via 172.20.0.1 on eth1
> 
> 
> # route -n
> Kernel IP routing table
> Destination     Gateway         Genmask         Flags Metric Ref    Use
> Iface
> 0.0.0.0         172.20.0.1      0.0.0.0         UG    0      0        0
> eth1
> 0.0.0.0         172.20.4.41     0.0.0.0         UG    32     0        0
> p1-1-1-1-2
> 
> BIRD shows that the OSPF route with administrative distance of 110 is
> primary, and not the kernel route with administrative distance of 40.

Hi

BIRD on Linux cannot overwrite alien/kernel routes in kernel routing
table. It uses kernel metric 32 to avoid collisions with them.

> When BIRD pushes the OSPF route to the kernel, it uses the metric 32 by
> default, whereas the default kernel route has metric 0. Both routes are
> installed to the FIB, but the kernel will elect the route via eth1. Why
> is not the default route over eth1 shown as primary in BIRD?

That is because kernel protocol has low preference. Set it to higher
value. Set preference for kernel protocol to higher value than OSPF.
I see you have 40 and 110, which are not default values anyway.

> Can we control if BIRD pushes the OSPF route into the kernel here? The
> kernel already has a more preferred default route.

If kernel route wins in BIRD table, then OSPF route will not be pushed
to kernel.

-- 
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."


More information about the Bird-users mailing list