On Fri, 2018-09-21 at 12:44 +0200, Ondrej Zajicek wrote:
CAUTION: This email originated from outside of the organization. Do not click links or open attachments unless you recognize the sender and know the content is safe.
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.
So the preference value in BIRD is not the same as administrative distance? I believe both Juniper and Cisco treats lower preference value / administrative distance value as a more preferred route. https://www.juniper.net/documentation/en_US/junos/topics/reference/general/r... Is preference value inverted in BIRD?
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@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."