Strange route selection (defroute and specific)
Hello bird users, on one pop we have a "funky" routing selection by bird: bird> show route all for 185.203.114.92 Table master4: 0.0.0.0/0 unreachable [defroutev4 2025-10-30] * (200) preference: 200 source: static Internal route handling values: 0L 5G 0S id 1 185.203.114.0/23 unicast [incoming_server122 10:21:13.232] * (100) [AS213081i] via 2a0a:e5c0:74:1::2 on iserver122 preference: 100 igp_metric: 0 from: 2a0a:e5c0:74:1::2 source: BGP bgp_origin: IGP bgp_path: 213081 bgp_next_hop: 2a0a:e5c0:74:1::2 bgp_local_pref: 100 Internal route handling values: 0L 10G 2S id 227979 The strange thing is that the default route, that is only created for exporting to others, has a higher preference. The default route is defined as follows: protocol static defroutev4 { ipv4; route 0.0.0.0/0 unreachable; } Why is that the case? And what does it mean if bird has a "*" for both routes? I thought only the active one is selected with a *? Any hints appreciated, Nico -- Sustainable and modern Infrastructures by ungleich.ch
just add the preference for static: protocol static defroutev4 { ipv4; route 0.0.0.0/0 unreachable; preference 5; } -- NETassist On Thu, Nov 20, 2025 at 11:25:45AM +0100, Nico Schottelius via Bird-users wrote:
Hello bird users,
on one pop we have a "funky" routing selection by bird:
bird> show route all for 185.203.114.92 Table master4: 0.0.0.0/0 unreachable [defroutev4 2025-10-30] * (200) preference: 200 source: static Internal route handling values: 0L 5G 0S id 1 185.203.114.0/23 unicast [incoming_server122 10:21:13.232] * (100) [AS213081i] via 2a0a:e5c0:74:1::2 on iserver122 preference: 100 igp_metric: 0 from: 2a0a:e5c0:74:1::2 source: BGP bgp_origin: IGP bgp_path: 213081 bgp_next_hop: 2a0a:e5c0:74:1::2 bgp_local_pref: 100 Internal route handling values: 0L 10G 2S id 227979
The strange thing is that the default route, that is only created for exporting to others, has a higher preference.
The default route is defined as follows:
protocol static defroutev4 { ipv4;
route 0.0.0.0/0 unreachable; }
Why is that the case? And what does it mean if bird has a "*" for both routes? I thought only the active one is selected with a *?
Any hints appreciated,
Nico
-- Sustainable and modern Infrastructures by ungleich.ch
I believe static does not support preference: /etc/bird/bird.conf:1047:5 syntax error, unexpected PREFERENCE from: protocol static defroutev4 { ipv4; preference 5; route 0.0.0.0/0 unreachable; } Yakimus // Netassist NOC <yakimus@netassist.ua> writes:
just add the preference for static:
protocol static defroutev4 { ipv4; route 0.0.0.0/0 unreachable; preference 5; }
-- Sustainable and modern Infrastructures by ungleich.ch
My mistake. Here what I have in my config: protocol static static_v4 { ipv4 { preference 1100; }; # default route for clients route 0.0.0.0/0 drop; } -- NETassist On Thu, Nov 20, 2025 at 12:12:07PM +0100, Nico Schottelius wrote:
I believe static does not support preference:
/etc/bird/bird.conf:1047:5 syntax error, unexpected PREFERENCE
from:
protocol static defroutev4 { ipv4; preference 5;
route 0.0.0.0/0 unreachable; }
Yakimus // Netassist NOC <yakimus@netassist.ua> writes:
just add the preference for static:
protocol static defroutev4 { ipv4; route 0.0.0.0/0 unreachable; preference 5; }
-- Sustainable and modern Infrastructures by ungleich.ch
Hello Nico,
on one pop we have a "funky" routing selection by bird:
bird> show route all for 185.203.114.92 Table master4: 0.0.0.0/0 unreachable [defroutev4 2025-10-30] * (200) preference: 200 source: static Internal route handling values: 0L 5G 0S id 1 185.203.114.0/23 unicast [incoming_server122 10:21:13.232] * (100) [AS213081i] via 2a0a:e5c0:74:1::2 on iserver122 preference: 100 igp_metric: 0 from: 2a0a:e5c0:74:1::2 source: BGP bgp_origin: IGP bgp_path: 213081 bgp_next_hop: 2a0a:e5c0:74:1::2 bgp_local_pref: 100 Internal route handling values: 0L 10G 2S id 227979
That's a bug in BIRD 3 CLI, apparently. In BIRD 2, we actually display just the longest prefix match, here we display all routes which could match. The actual route selection is not affected in any way by this. Gonna fix that, so that you get the LPM view back again. Sorry and thanks for reporting. Maria -- Maria Matejka (she/her) | BIRD Team Leader | CZ.NIC, z.s.p.o.
participants (3)
-
Maria Matejka -
Nico Schottelius -
Yakimus // Netassist NOC