bird 2.0.2 does not propagate krt_metric set in static routes when exporting to kernel (and couple other small issues in static protocol)

Radu Anghel radu.anghel at xindi.ro
Sun Apr 15 06:42:01 CEST 2018


Hi,

You need to set metric 0; in your kernel protocol in order to have
custom krt_metric per route.

"Metric 0 has a special meaning of undefined metric, in which either OS
default is used, or per-route metric can be set using krt_metric
attribute. Default: 32."

Radu

On 15.04.2018 00:57, Alexander Demenshin wrote:
> Hi,
> 
> Looks like setting of krt_metric in bird 2.0.2 does not work like in
> bird 1.6.
> 
> Construction like:
> 
> protocol static static4 {
>   route 0.0.0.0/0 via 1.1.1.1 {
>     krt_metric = 10000;
>   };
> }
> 
> is accepted, I see the route exported to the kernel, but with default
> bird metric 32.
> 
> Yes, I know that bird can find the best route and install only that one,
> but I prefer
> to keep several static routes installed with different metrics, when
> bird is used
> only to keep them alive.
> 
> Another issue, when setting via scope using "%" notation, like:
> 
>   route 1.2.3.0/24 via 1.1.1.1 % ifname onlink on;
> 
> if "ifname" contains characters like "-" or ".", it will be rejected
> (syntax error),
> while such names are perfectly legal (at least in linux). May be it
> makes sense
> to allow quoted (TEXT instead of SYM) interface name for such cases (I
> tried to
> extend grammar and it works perfectly - fix is trivial so there is no
> patch attached).
> 
> Small annoyance, though not an issue - "route" only accepts CIDR
> notation, though
> it would be nice to omit "/32" for single IPs, as it looks more "natural".
> 
> Finally - looks like bird 2 docs is a bit incorrect - static route options
> must be followed by ';' as a terminator (according to grammar), while
> documentation
> lists them without, which produces "syntax error" without any details.
> 
> BTW, "onlink" is not documented at all, though I was really happy to
> find it :)
> 
> PS: As this is my first experience with bird v2 - many thanks - it is
> much better :)
> 


More information about the Bird-users mailing list