MPLS VPN PE-CE OSPF Default Route

This topic is to discuss the following lesson:

Two questions inspired by this lessons that maybe strictly speaking deserve its own lesson in BGP course:

  1. Rules for redistribution of default route into BGP - if it is from OSPF we need to explicitly inform BGP we want internal and external routes. From static routes it works straightforward. And maybe also from EIGRP (?). But thats not enough - we also need to confirm we want default that was distributed to be advertised by BGP. One way is to run default-information originate (and BGP does not have ‘always’ keyword, thats it will not advertise unless route is injected already into rib). But seems the same thing can be accomplished by running ‘network 0.0.0.0’ command. I tried it in the lab and could not find any difference, including that ‘network’ command does not do any good unless some other protocol had default already installed into rib. Only combination of redistribute default from OSPF (or static) and either ‘network 0.0.0.0’ or ‘default-information originate’ produces advertisement of 0.0.0.0 by BGP. Like say having ‘network 0.0.0.0’ and default-information originate in BGP without also redistribute of 0.0.0.0 from somewhere did not do any good. This is a strange logic to me but the main question is - is there indeed any difference between using ‘network 0.0.0.0’ and ‘default-information’ commands? (I don’t refer to ‘neighbor … default-originate’ - that one works fine without anything else but clearly not always convenient when you have many neighbors.
  2. Once default is in BGP and advertised to neighbor will it also be advertised to next neighbor? (assuming there are no explicit filters for it). It looks in my case it did not - the neighbor received default over BGP but did not advertise it to the nest neighbor (all three are iBGP neighbors - thats 1 and 2 neigbors and 2 and 3 are neighbors but not 1 and 3) . Does each neighbor need default-information command for default route to propagate? Would that behavior be different in case of eBGP?

Hello Vadim

Concerning point 1, indeed the network 0.0.0.0 and the default-information originate commands deliver similar results in that they will inject the default route into the BGP RIB, and it will be advertised to all BGP neighbors. The difference is in the origin of the default route. In each case, the default route comes from a different source.

With default-information originate, the default route is artificially generated and injected into the BGP RIB. A redistribution statement must also be configured to complete this configuration or the default route will not be advertised.

With the network 0.0.0.0 command, the default route will be injected into BGP only if the default route is currently present in the routing table. In case it is learned via redistribution, it must also be learned from the specific IGP from which redistribution into BGP is taking place.

The usage guidelines found within this Cisco Command Reference of the default-information originate command further describes the difference between these two commands:

Take a look at this post I shared with you four years ago about a similar discussion:

Concerning point 2, the reason you don’t see that default route readvertised to another iBGP peer is because of the iBGP split horizon rule which states “IBGP does not advertise prefixes from one IBGP neighbor to another IBGP neighbor.” It has nothing to do with the default route configuration but simply the way iBGP functions. More about that can be found here:

https://networklessons.com/bgp/internal-bgp-border-gateway-protocol-explained

I hope this has been helpful!

Laz

Thanks, Laz, seems finally I got it (till the next 4 years later when I forget it all). After doing in lab all possible scenarios I can seems discard all the contradictory Internet explanations that people provide while still confused with this matter :-). It actually sticks with laconic CISCO command reference and can be stated as:
‘network 0.0.0.0’ forces BGP to advertise EXISTING in RIB (no matter how it got into RIB) default to all neighbors in address-family and treat it as originated by BGP locally (where network command is entered) route;
‘default-information originate’ forces BGP to advertise EXISTING in RIB AND redistributed into BGP default to all neighbors in the address family and treat it as redistributed route;
‘neighbor default-originate’ forces BGP to suck out of thumb the default route and advertise it to particular neighbor unconditionally and treat it as locally generated route;
In addition, it is not recommended to use combination of these commands together. Considering subtle but important differences in functions and similarity in naming, no wonder this trio causes so much confusion. Particularly if to add OSPF similar but working a little differently commands.

As to the second question - sure, it was generated after several hours of headache in the lab addressing the first question. I realized the culprit a little later.
Thank you

Hello Vadim

Yep, it looks like you’ve explained it very clearly here. Especially true is what you’ve said here…

Labbing things up and experiencing how they work is one of the most useful ways of learning, and that’s great that you’ve done this.

I hope this has been helpful!

Laz

this is the best explanation for the command
redistribute ospf 2 match internal external & default-information originate
no matter which material i used to understand it i couldn’t till i saw this lesson
amazing

Hello Aysar

Great to hear that you find the content so useful! Thanks for your kind words!

Laz

i have a question .
let’s say BackBone_1 running OSPF, BackBone_2 IS-IS
both are connected by (backbone1)PE2 ↔ PE4(backbone2)
what should be an example of configuration on PE2/4 to connect both backbones ?
is there multiple ways of doing so ?

Hello Mehdi

So what you’re suggesting is that you use OSPF to share routes between CE1 an PE1 and use IS-IS to share routes between CE2 and PE2, correct?

This can indeed be done. Remember, that when you are creating an MPLS backbone like the one in the lesson, you can create completely separate routing domains at each customer location. So you can advertise using OSPF from CE1 to PE1 and advertise using IS-IS from CE2 to PE2. The backbone itself uses MPLS in combination with MP-BGP.

In this particular lesson, it is the default route that is injected into the MPLS backbone to be conveyed to the other customer site. In other cases you would also advertise the local routes. Although Rene doesn’t have a lesson on how to create the link between the CE and PE using IS-IS, it is just a matter of redistributing the routes from one routing protocol to the other.

So for the scenario you are suggesting, you can redistribute OSPF into MP-BGP of the MPLS backbone, and then redistribute routes from the MPLS backbone into the IS-IS customer location. And you can do the reverse for the opposite direction. Does that make sense?

I hope this has been helpful!

Laz

So we initiated the below command on PE1 is not necessary on the PE2 for vice versa learning
redistribute ospf 2 match internal external

Hello Deep

That’s correct. Since the default route is advertised on CE1 to PE1, the command is issued only on PE1 so that the default route will be redistributed into BGP at PE1. You don’t need the command at PE2.

If PE2 received a default route from CE2, only then would you need to use this command at PE2 to redistribute the default route into BGP.

I hope this has been helpful!

Laz