Inject default route via OSPF, but only to specific OSPF peer and contingent on BGP session established

Maria Matejka maria.matejka at nic.cz
Wed Jan 10 08:52:18 CET 2024


Hello!

TL;DR: That's currently not possible. But there are other options.

On 2024-01-10 00:28, Lukas Haase via Bird-users wrote:
> Hi,
>
> I have two "border gateways"; each establishes a BGP session to the outside world. An internal router connects to each of the border gateways and uses OSPF to exchange routes. (Note, other OSPF links may exist as well).
>
> Both border gateways act as default gateways for the internal router. In order to create redundancy, each border gateway should send the default route via OSPF to the internal router. However, the default route should not be sent to any other device (otherwise it would mess up everything, incl tunnels).

First, if sending a default route through OSPF breaks stuff, you should 
probably filter that route out on these devices where it's unwanted. 
Just to be safe if somebody misconfigures something. And with that, you 
can then just send the default route to the whole OSPF.

Another approach would be filtering between areas in OSPF, which is 
quite fragile and not supported by BIRD anyway, but you can 
theoretically run two OSPF instances, one for the "with-default" 
network, and another one for the other network. This is very much a 
crazy setup which I do not recommend to go with unless you are sure that 
no better approach is available.

And finally, what may be even better, if your two uplinks are two 
different AS's … you can link the internal router to iBGP as well, 
balancing the traffic between the uplinks and failing to send all data 
over one uplink if the other fails.

> Additionally, injecting the default route should be contingent on having the BGP session established successfully (only then I can assume the route to the internet is good).

In BIRD v2, there will be a possibility to do prefix aggregation added 
this year, and it looks like the configuration can be bent enough to 
actually generate "just the default route" from it. Not supported for now.

In BIRD v3, there will be more possible methods to generate default 
route, anyway, no one of them is merged even into thread-next yet.

I hope that I have at least pointed you the right way.

Have a nice day!
Maria

-- 
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/20240110/1ea11a4d/attachment.htm>


More information about the Bird-users mailing list