Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Gateway: Replace babeld with bird #1062

Open
2 of 3 tasks
spolack opened this issue Nov 9, 2024 · 1 comment
Open
2 of 3 tasks

Gateway: Replace babeld with bird #1062

spolack opened this issue Nov 9, 2024 · 1 comment

Comments

@spolack
Copy link
Member

spolack commented Nov 9, 2024

Similar to what was done in #995 we should move one with migrating the Gateways. First tests on ohlauer-gw were showing a few limitations.

It is not possible to readvertise the IPv6 Default Route learned from BGP (ipv6) to Babel (ipv6 sadr / source specific). Bird simply rejects all attempts, that the protocols are incompatible. We'll have to write a small daemon to overcome that issue. Furthermore the metrix.sh script should get an overhaul.

Todos:

@spolack
Copy link
Member Author

spolack commented Nov 10, 2024

Magic Ideas at midnight...Instead of writing a script for syncronizing the source specific route with the bgp route, we could simply create a static route in the table which is recursively resolving the nexthop via another IP in another routing table.

protocol static  {                                                                   
    ipv6 sadr { table v6_babel;};
    igp table master6; # Resolve recursivly via master6 non-sadr table, BGP route lives in
    route ::/0 from 2001:bf7::/32 recursive ::0;                           
}  

This brought the next problem, that the route doesnt simply disappear when the nexthop is not reachable, but instead it becomes a unreachable route. This route still takes part in the best path calculation and obviosly is winning. We can filter on the kernel and babel protocol config for RTD_UNREACHBLE, but.. bird routing tables are doing a best path calculation first, then only passing the best route to the respective protocols. If we filter for RTD_UNREACHABLE what happens is that the route disappears from the protocols perspective, but no second best route ever showing up.

... hours later, trying various ideas and changing the config forth and back, i came up with a working , yet simple solution: Create another routing table, where the static protocol is bound to and then use a pipe between the main routing table and the routing table, which filters UNREACHBLE routes.

Working config:

ipv6 sadr table v6_default_via_bgp;

protocol static static_v6_default_via_bgp {          
        ipv6 sadr { table v6_default_via_bgp; };
        igp table master6; # Resolve recursivly via master6 non-sadr table, BGP route lives in
                                                                                                       
        # Add source specific default route which is going to get announced into our mesh
        route ::/0 from 2001:bf7::/32 recursive ::0;
}                                                    
                                                
protocol pipe v6_default_src_to_v6_main {                                                     
        table v6_default_via_bgp;                                                                      
        peer table v6_main;                                                              
        export where dest != RTD_UNREACHABLE;       
        import none;                                 
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant