Recursive nexthop via kernel route in proto static not working

Maria Matejka maria.matejka at nic.cz
Tue Jun 27 21:50:14 CEST 2023


Hello Daniel,

this looks fishy. I tried a trivial config like this on my laptop as 
follows and it works. Could you please disclose the full table? There 
are some details in the recursive nexthop resolution algorithm 
(preventing infinite resolution loops) which may apply to your case. 
BTW, is there really no message in the log?

The config:

protocol device {}
protocol kernel {
   ipv6 { import all; export none; };
   learn;
}

protocol static {
   ipv6;
   route fdca:db8::/32 recursive ::;
}

The table:

Table master6:
::/0                 unicast [kernel1 21:42:38.893] * (10)
     via fe80::feed:dee4:fe00:23d3 on wlo1
     Type: inherit univ
     Kernel.source: 9
     Kernel.metric: 600
2a00:1028:dead:beef::/64 unicast [kernel1 21:42:38.893] * (10)
     dev wlo1
     Type: inherit univ
     Kernel.source: 9
     Kernel.metric: 600
fdca:db8::/32        unicast [static1 21:42:38.891] * (200)
     via fe80::feed:dee4:fe00:23d3 on wlo1
     Type: static univ

Have a nice evening or any other part of the day!
Maria

On 6/27/23 18:03, Daniel Gröber wrote:
> Hi Alexander,
>
> On Tue, Jun 27, 2023 at 04:48:46PM +0200, Alexander Zubkov wrote:
>> Not sure, but I would guess it can be related to the local address. It
>> might try to pick the first interface with such network.
>> Could you try your setup with some route that has the nexthop from a
>> unique subnet configured on the interface? At least to check if it will
>> become reachable or not.
> Ok, if I add a route like `2000::/64 dev enp1s0 via
> fe80::fc00:3ff:fec7:cd05` to the kernel and recurse through that it does
> work.
>
>      protocol static static_export_kernel2 {
>          ipv6;
>          igp table master6;
>          route 2001:db8::/64 recursive 2000::1234;
>      }
>
>      $ ip -6 route add 2000::/64 dev enp1s0 via fe80::fc00:3ff:fec7:cd05
>      $ birdc show route protocol static_export_kernel2 all
>      2001:db8::/64        unicast [static_export_kernel2 16:01:20.131] * (200)
>              via fe80::fc00:3ff:fec7:cd05 on enp1s0
>              Type: static univ
>
>> Or it might be that routes imported from the kernel are marked as
>> recursive, so it does not resolve because Bird does not allow double
>> recursion.
> If I remove the 2000::/64 route the recursive route goes back to
> unreachable. So something seems to be preventing recursion through the
> default route specifically, but it evidently doesn't have anything to do
> with the route coming from the kernel.
>
>      $ ip -6 route del 2000::/64 dev enp1s0 via fe80::fc00:3ff:fec7:cd05
>      $ birdc show route protocol static_export_kernel2 all
>      2001:db8::/64        unreachable [static_export_kernel2 16:01:20.131] * (200)
>              Type: static univ
>
> Weird.
>
> Thanks for your suggestions,
> --Daniel
>
-- 
Maria Matejka (she/her) | BIRD Team Leader | CZ.NIC, z.s.p.o.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://trubka.network.cz/pipermail/bird-users/attachments/20230627/160de9ed/attachment.htm>


More information about the Bird-users mailing list