OSPF generate default route - again

Piotr Marciniak zboj at mnc.pl
Wed Oct 10 16:07:01 CEST 2018


Hello,

I’ve spent some time trying to find any option to make our border BGP router to announce itself as defaul router by OSPF to our network switches. No luck.

This discussion was rised fe. 5 years ago but with no answer (https://bird-users.network.narkive.com/AD6KOk8b/ospf-generate-default-route). All docs end examples I found touch only redistribute aspect of the problem. I think it is not optimal for such implementations.

OK – let draw simple example.

Step 1.

Let’s have just 2 border backbone BGP routers with a few peers and full tables. Let’s name them just simple BGP1 and BGP2.
Of course they talk one to another by iBGP as well. In fact – they know everything about Internet, so they do not need any 0/0 routes – external or static.
If any peer fails – they will just recalculate tables and everything will work fine.

Step 2. 

Let’s imagine the internal network build on some switches and small routers.
As they are just local and have limited resources – they do not need and can’t work on iBGP with BGP1/2.
OSPF if pretty enough for them. Let’s imagine they have names like OSPF10-20. Does not matter how they are connected. But for further discussion let’s imagine OSPF10 has direct connection with both BGP1/2.

Step 3. 

In my example OSPF10 establishes sessions with BGP1/2. All OSPF local networks will be shared – but there would be no information about all Internet.
So internal OSPF routers - as they do not have full knowledge about internet - in short – need to get default route from BGP1/2.

Step 4.

In configs published on Internet it is easy to get examples of export filters for redistributing default gw, like:

                if net = 0.0.0.0/0 then {ospf_metric2 = 100; accept;} else reject;
    or
                if source = RTS_STATIC then accept; else reject;

Unfortunatelly published system requires that 0/0 will be set somwhere out of OSPF Bird config.
In fact – 0/0 can be set by protocol static section or received from other source and redistributed to OSPF. All discussions I found end at this point.

Step 5.

In some discussions people try to ask how in Bird set equivalent to commonly known Cisco “redistribute default originate always”? But mostly answers say – “why you do not want to set it by “protocol static” or so?”.

Let me put answer simple, but a bit in different way then in discusssions I found  – BGP router needs no such directive at all. So any staticaly added “route 0/0 via” in protocol static should not be done at all. Why?

For any static route you need fixed destination. We may play with some options but if this static destination gets unreachable – our OSPF default gw (and in effect all communication with Internet) is down. You can see it on your birdc if you add any fake destination or... destination disconnects – like port dow.

bird> sh route export ospf1
0.0.0.0/0          unreachable [static_ospf 2018-09-18] * (200)

Step 6. 

Redistributionto local OSPF routers of “external” default gw on border BGP router – should not be an option. Problem is simple – again we need a source of such 0/0. But we get none from our Internet BGP peeers.

Step 7.

Theoretically we may imagine that in my example OSPF10 will act as ‘default originate always’ router and forwards packets by static route to BGP1... What a waste. How to secure redundancy supported by BGP2?

Step 8.

For now – I may only set protocol static for any reachable IP on both BGP1/2, use above redistribution OSPF examples and pray – destination interfaces will not get down. Not good, don’t you think?

Conclussion.

BGP router is sometimes in fact a border router for “local” protocols like OSPF. Bird should have an option to announce itself by OSPF and only OSPF – as it is default gw for other OSPF routers.
This announcement should be based on simple rule that Bird may know from other protocols (like BGP but not only), what to do with package received as default gw. But Bird not always may share this knowledge. Again – Bird can know all Internet prefixes from BGP sessions but can’t export it to simple switches in local network.

This is why Bird should have an option to act as default gw regardless it has default gw set or received in other protocols.

So please – let me know. How can I make “default originate always” in OSPF without redistributing 0/0 established in other sources.

Best wishes,

---
Zboj (Piotr Marciniak)
zboj /at\ mnc dot pl





-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://trubka.network.cz/pipermail/bird-users/attachments/20181010/36676b39/attachment.html>


More information about the Bird-users mailing list