This next discussion is really, really going to give you the opportunity to understand all the different pieces of the puzzle when it comes to OSPF.
Remember when we say puzzle, we're talking about puzzle pieces that come together in order for our routers to ultimately learn about everything and figure out the best path through the network.
What are all these puzzle pieces? Link state advertisements.
We'll talk about our link state advertisements here and then once we're done, we'll be able to have a better conversation about the metric because we're going to see where the numbers come from and how the numbers are added together to get the results that our router is getting.
When we look at our routing table, we are going to see that for OSPF, we are going to have some O routes.
When you look at the top here, it just says simply OSPF.
O means that that particular network that is listed in the routing table is in the same area as this router.
That's what that means.
For example, if we go to R1 right now and I type in show IP route, when we look at this network right here, this network, which is the SVI that lives where?
On DSW1 and DSW2, that network is in the same area that this router is in and we know R1 is in the same area as DSW1 because we have interfaces in the same area.
That's how O routes are listed in the routing table.
Then you have OIA.
OIA shows up in the routing table like this and up here it just says IA for OSPF inter area.
Inter area means routes in a different area, but still within the OSPF routing domain.
If we scroll down just a bit here, you'll see we have two of these.
Do you remember where these are?
These are both routes that exist on our branch router.
Remember, our branch router is in area one.
These are networks that are in a totally different area than this router is in.
Then our last one that we have on this list up here in our slides are E1s and E2s.
You'll see down here we have an E2.
What is that?
That's the default route.
E1s and E2s are routes to destinations outside the OSPF routing domain.
The default route would be an E1, E2 route if you were doing redistribution.
Meaning, for example, importing routes from EIGRP into OSPF or importing routes from BGP into OSPF
or importing routes from RIP into OSPF or redistributing static routes into OSPF.
Anytime you use the redistribute command and you import routes from a totally different source,
that's how you get E1s and E2s.
The E2 is the default.
If you don't change it, it stays as E2.
If you change it, you can change it to E1.
That would just simply change how the metric is calculated.
The difference between E2 and E1 is how the metric is calculated.
That is it.
We're not going to get into that discussion right now.
For example, you see E2.
We have a value of 1 there.
If I change it to an E1 when it was being imported, it would just be calculated in a different way.
We'll learn.
Do we learn that?
No.
That's an advanced routing one.
That would be for more complex routing environments when you have multiple exit points out of your routing domain
and you wanted to control which exit point would be utilized.
You can manipulate the values that you see here in many different ways.
One of the things I like to point out, though, to people here is that in the end, E1 or E2 is a choice.
E2 is a choice you make.
It's a choice you make based simply on how you want your router to decide the best way to go through the environment.
When you learn about the manipulation factors of E2 in an RC and you learn about the manipulation factors of E1 in an RC,
then what that does is it gives you flexibility to control the decision-making process of your router.
That's all you really get out of that when it's all said and done.
All right.
So, we know now that we have three different types of routes.
Now, there is another option, N1 and N2s.
We are not going to be getting into N1s and N2s in this course.
When do we see N1s and N2s?
We see it when we build a network, build OSPF routing domain with what are called not-so-stubby areas and totally not-so-stubby areas.
When we have those types of areas, OSPF behaves differently for those areas.
And as a result of that, it will create what are called N1 routes and N2 routes for specific scenarios and circumstances.
But N1 and N2 routes will only be visible inside the not-so-stubby area and the totally not-so-stubby area.
They won't be visible outside of those areas.
Outside of those areas, they get converted to type 5s.
They get converted to E1s and E2s.
So, for example, if you had a not-so-stubby area with an N1 in it, everywhere else in the organization would show up as an E1 route.
If you had E2 routes, sorry, N2 routes in the not-so-stubby area, then everywhere else, everyone else would see them as what?
As E2 routes instead.
So, that's more than you need to know for the exam.
You won't even be tested on that stuff.
I just want to let you know that, yes, there's another option, and you'll learn about that in the advanced routing course.
So, LSAs, link state advertisements.
Link state advertisements are, think about it like a Post-it note.
You can think about link state advertisement as a Post-it note.
And if I wanted to send that information to you, I could take that Post-it note, and I can put it in an envelope, the OSPF packet, the link state update, right?
The link state update is the envelope.
That's the packet.
And I can put LSAs inside of it, a note, a Post-it note, anything I want to put to teach you something when it's all said and done.
So, remember, we take these LSAs, and we use them to exchange the information and the details between all of our different routers.
And we're going to exchange LSAs as soon as neighborhoods are formed.
We're going to exchange LSAs whenever a change occurs, and then we'll also exchange LSAs on a regular basis, and that is every 30 minutes by default.
So, that is why when you look at your OSPF database, you see that there is an aging timer for every single one of your LSAs.
Your LSA's maximum age is one hour.
So, what is that, 3,600 seconds, right?
Is that right, 3,600 seconds?
So, that's your maximum age.
So, right now, you can already see some of them are already at 30 minutes, 30 seconds.
Yeah, 30 minutes.
So, you got one hour, all right?
But we will typically update our LSA every 30 minutes, every 30 minutes.
So, some of those ones that you saw at 1,900 seconds are probably going to be updated here pretty soon.
And refresh and start back at a timer of zero.
Trying to see if I can get that to happen right now in the back.
Nope, not yet.
All right, we'll just keep an eye on that.
So, we got some of them at 19 right now.
I'll keep an eye on that, see if they flip over, and then I'll show you.
So, we have Type 1, we have Type 2, we have Type 3, we have Type 4, we have Type 5.
Notice the Type 1 is really what primarily gives you those O routes.
Notice that a Type 3 is what really gives you those OIA routes.
Notice the Type 5 is really what gives you the E routes, E1s and E2s.
And then Type 7, which is not on this list because you don't need to know it for this course or exam, is what gives you those N1 and N2 routes.
So, 1 for O, 3 for OIA, 5 for E, and 7 for the N routes, which you don't need to know about.
What you do need to understand is the scope of these different LSA types.
So, notice here that I have Type 1 and Type 2s that are scoped only to their area.
Meaning, they will never, ever, ever, ever cross an area boundary.
They are stuck in that area.
So, when you think about Type 1s and Type 2s, they will only bounce around in here.
They will only bounce around in here, that's it.
They will only bounce around, 1 and 2, that's the best way to think about it.
Type 3s are going to be generated by this router, generated by this router and jumped in.
Generated by the router and jumped in.
So, the area border router generates Type 3s.
And then once a Type 3 is sent in here, it only floats around in that area.
When I generate a Type 3 and send it, it only floats around in that area.
And what about Type 4s?
Notice that Type 4, again, generated by the ABR, but it's a very special option.
And it will be generated by the ABR and just dumped into that area for that area, that's it.
And then look at the Type 5.
The Type 5 is generated by an ASBR.
And it's going to be dumped into this area for this area and then it gets forwarded without modification into every other area.
So, let's get into these in a little more detail.
That was just a quick overview.
So, let's look at our routing domain right now.
So, we have Type 1s and Type 2s that are going to be floating around in here.
We have Type 1s and Type 2s that are going to be floating around in here.
We have Type 1s and Type 2s that are going to be floating around here.
These Type 1s and Type 2s are Area 1 Type 1s and Type 2s.
Area 1 Type 1s and Type 2s.
These are Area 0 Type 1 and Type 2s.
And they will never cross.
This is your scope.
This is your boundary line.
You will never cross over an area border router.
These two, Type 1 and Type 2, are the most fundamental puzzle pieces for OSPF.
It is the Type 1s and Type 2s that build the topological map, that build the environment that the router is seeing.
So, what will happen here is R1 through Type 1s and Type 2s know this router exists, knows this router exists, knows this router exists,
and knows every single interface and network in Area 0 and can actually, from that link state database,
so if we go to DSW-1 as an example here, that link state database, it can actually build the topological map with Type 1s
and it can build the topological map with the Type 2s combining them together.
So, router link states, Type 1.
Network link states, Type 2.
You combine those together, you get your map of your area.
So, again, when I say map, do I really mean map?
I really mean map.
Each router is on the map with all the lines drawn between them.
Now, do you actually get to tell your router to show you that map?
No, you don't, unfortunately.
But does that mean that you could actually open up every single one of these LSAs, these Type 1s and Type 2s,
and you actually draw a diagram from that information?
Yes, you can.
And the cool thing is, is it doesn't matter which router you go to in the area.
Whether I go to DSW1 or I go to DSW2 or I go to R1 or I go to R2 for Area 0,
when I take that information, remember, they're all synchronized.
It doesn't matter which one I use, I will get the same map for all of those routers in Area 0.
And then if I did the same thing for Area 1, I would get the same map for Area 1.
It doesn't matter which router I use in Area 1, I'd get the same result for all of them.
Why?
Synchronization.
Remember that.
So what exactly is the Type 1 LSA?
So the Type 1 LSA is an LSA that every single router generates.
And we saw that in our environment.
Router 1 generated it.
Router 2 generated it.
Router 3 generated it.
Router 4 generated it.
You might be saying, hey, Raymond, where's Router 5?
Remember, this is Area 0.
Router 5 does not live in Area 0.
That's why it's not in this list.
I'm on DSW1.
This is Area 0, not Area 1.
This is all we know.
So I know about these four routers.
And no, it's not external.
It is just outside.
It is in a different area, not external.
External to the area, yes.
But when we use the term external in OSPF, external means outside of OSPF.
That's not outside of OSPF.
Right?
It's just outside the area.
Yeah.
It's not external, just outside of the area.
So in this case, all the Type 1s are for what purpose?
Every router generates a Type 1 for the area and says, yoo-hoo, over here.
Yeah, look at me.
Look at me.
I am 0.0.0.1.
And I have three links participating in the routing process.
And my links are this.
There's my information.
So when every single router does this,
and they share it with each other in the area through the LSA flooding
process, then you learn directly from that router.
You get a copy of its LSA, Type 1 LSA.
This is me.
These are the networks I'm connected to.
This is the metric of that interface that's connected to that network.
Yeah.
Basically, it's all about me.
Exactly.
It's all about you.
That's the Type 1 LSA.
So it's about you describing who you are to the other routers in the area
and all your interfaces that are participating in the routing process.
So in the end, you all know about each other.
And that's why in yesterday's session when we looked at our design image,
it was this one right here.
And we were talking about the fact that if you are single area,
the Type 1 is very, very detrimental to you.
Because if you're a giant single area, every time a change happens,
you have to go, look at me.
Yeah, look, this network has changed.
And what happens when another router receives your Type 1 LSA?
They have to rebuild that entire topological map.
They have to go through the entire process of saying, okay, this is me.
That's you.
That's so-and-so.
You have all these networks.
They have all these networks.
Build all the lines.
Build all the maps.
Run Dijkstra's shortest path first calculation algorithm against all of that
to ultimately figure out what?
Pretty much the same thing you had before, but one network's missing
or one network's been added.
So, yes, that is a flaw in the design of the Type 1 LSA.
And it has been recognized as that.
So that way there with OSPF v3, OSPF v3,
they actually changed the behavior of the Type 1 LSA.
That's right, they did.
And they added more LSA types for OSPF v3 to solve that problem.
So it's not as detrimental now when a network gets added or removed.
As long as nothing's happened to the router,
we don't have to recalculate everything with OSPF v3 address families
or OSPF v3 for IPv6.
It's a flaw in IPv4 LSAs that they remove the flaw from IPv6 LSAs
and OSPF address families, which is great.
That's why I always convince people, hey, if you can use address families nowadays
because with the address families you don't have this issue anymore.
So you could have larger OSPF routing domains if you're using address families
because you're not going to have to worry about if a network gets added or removed.
There's a new type of LSA called the Type 9 LSA that takes care of that.
That's not here for OSPF v2.
And that way we don't have to recalculate the map
and do Dijkstra's algorithm anymore, which is great.
Because once a map is built, you can add or remove networks.
You don't have to recalculate the map, right?
I mean, you already got the map.
So anyways, as you can see, it's just not efficient,
the existence or the Type 1 LSA for OSPF v2.
So they didn't modify it for other versions of OSPF going forward.
So Type 1 LSA, most fundamental, though, no matter what, right?
In all regards, it's the one that builds the topological map.
Generated by every router.
Flooded to everyone in the area.
Those are the things you want to remember.
They also generate the what? The O routes.
So every single O route.
So when we look at our every O route you see in here,
that does not have any other code.
So this one and this one as an example,
both of those would have been strictly 100% from the Type 1 LSA.
That's where they would have came from.
So go to R1 as an example.
All of these are from the Type 1 LSAs.
We'll leave that for the exam.
Okay, what about the Type 2s, though?
What in the world are the Type 2s all about?
So when you look at Type 2s, those are called the network link states.
So, again, the scope of the Type 2 is only within the area.
But who generates Type 2s?
Well, we said Type 1s were all routers.
Who generates the Type 2s?
Designated routers.
That's it.
So the designated router for a multi-axis network in that area
advertises a Type 2 LSA.
Why does it have to do that?
It does that to describe every single router that is attached
to that multi-axis network, to all the other routers in the area.
And the reason why is because when you have a designated router,
you actually have blind spots in your topology.
You have blind spots.
That's what you have.
Because, for example, let's say we had a router here,
and we had a router here, and then we had a switch here,
and we had a router, router, router, router.
I'm not going to keep putting R's on them.
And a router here, and a router here, and a router here,
and a router here.
So in this environment here, without a doubt, no matter what,
we're going to have to have a designated router.
Let's say it's this router here.
The thing is, with Type 1 LSAs, with just purely Type 1 LSAs,
all of the routers in this environment, all routers in this area,
so this is one big area, okay, area, let's say 51.
All the routers are in area 51.
So with all of these routers in area 51,
they will learn about all the routers,
but because of this environment being broadcast,
or B-R-O-A, broadcast, or what else do we call it,
M-U, multi-access, because it's multi-access,
the Type 1 LSAs alone do not allow the routers to understand
what's actually going on in that environment
and how everyone is connected to everyone else.
There's just not enough information in the Type 1.
So the designated router generates a Type 2,
floods it to everyone in that area,
so in this case, floods it to everyone in that area,
and the end result is that the designated router is essentially
telling all the other routers,
I'm the designated router for this multi-access network,
and this device, this device, this device, this device,
and me are all connected to it.
So based on that information now,
they can finish building their topology.
So if we look at, for example, the database for the network LSAs,
let's take a peek at this network LSA right here.
And you'll see here that it says for this multi-access network,
these two routers are connected to it, and it's a Slash 30 network.
That's it.
It's very simple.
It's just the designated router saying, hey,
I've got a multi-access network here,
these are the routers connected to it, and it's a Slash 30 network.
Now take your Type 1 LSAs you've learned from everyone
and take the information that I've just given you
and figure out your topology.
That's what it's doing.
So in the end, now every router understands what's going on here
based on a combination of the Type 1s and the Type 2 LSAs.
So based on these two LSAs now, Type 1s and Type 2s,
we have all the puzzle pieces we need to build the area topological map
and then use Dijkstra's Shortest Path First algorithm
to figure out the quickest way to get to every position in the area,
just our area.
So Dijkstra's Shortest Path First algorithm and the map
are used to figure out the best way to get to every place in our area.
So this would happen in Area 0.
This would happen in Area 1.
This would happen in Area 51.
And that information is purely, purely, purely contained to just that area.
So now that raises the question,
how does the information in Area 0 get to Area 1?
How does the information in Area 1 get to Area 0?
That is where the Type 3 LSA comes into play.
The Type 3 LSA is generated by who?
The area border router.
In our case, R2, who is connected to Area 0
and connected to some other area, in this case, Area 1.
When the area border router generates a Type 3 LSA,
what is it actually doing?
Now, notice it says Summary LSA.
That is probably the worst wording they could have used to describe it
because what that leads most people to believe
is we're talking about summarization.
That's not what we're talking about, not even close to it.
Summarization is a totally different thing that we will discuss a little later.
But here we have this Summary LSA.
What does it mean?
It means I'm going to take the Type 1 information from this area
and I'm going to condense it down to just give you what you need to know.
I'm going to take the information, the Type 1 information from here
and condense it down and send it into here.
When we say condense it down, let's examine what that actually means.
We know right now, if we go to R2 as an example,
we are part of two different areas.
I told you a while ago, show IP OSPF database,
that I am going to have two different databases on R2.
I'm going to have an Area 0 database and I'm going to have an Area 1 database.
I have a database for each of these.
Now, if we think about Area 1, Type 1 LSAs,
there's a lot of details in each and every single one of these.
If we open up any one of these, there's a lot of details in there.
What we want to do is we simply want to take the network ID and the metric,
sorry, the network ID, that's it,
and teach everybody else about it, just the network ID.
But what I'll also do is include my metric
in order to get to that particular network.
Based on the Type 1 and Type 2 LSAs here,
R2 knows how to get to, let's say, 10.0.0.0.
Who owns that? 0.0.0.3.
Let's just take a look at that one, for example.
We'll go router, 0.0.0.3, that's DSW1.
What network is that? Let's find it here.
It's this one right here.
I have learned it as a Type 1 LSA.
DSW1 says my metric for that interface is 1.
Okay, well, R2, using Type 1 and Type 2,
builds its map, and it ultimately figures out in the end
how far that network actually is away from it.
How far are you actually away from me?
So your cost plus my cost to get to you.
Then what's going to happen here is the Area Border Router
takes this network ID, builds a Type 3 LSA from that,
sends it into Area 1, and says,
hey, if you want to get to 10.0.0.0.24,
send your traffic to me, R2, and I will take care of it for you.
Oh, and by the way, my metric to that network is, let's say, 3.
So use my number of 3 plus whatever you need to calculate
to get to me, and that's going to be your metric.
So when we look at the Type 3 LSA now here on R2,
let's go show IPOSPF database again,
is that going to be an Area 0 Type 3?
No, no, no, no, right?
That's going to be an Area 1 Type 3 now.
So look, if we go to the Area 1 Type 3s, there it is.
It actually shows up as 10.0.0.0.
Look at the other one, 10.0.1.0, 10.0.2.0, 10.
So I'm only advertising the network ID.
It's me.
Me, I'm advertising that.
So if I type in here summary 10.0.0.0, this is what I'm telling Area 1.
I am saying, hey, I know about this network called 10.0.0.0.24,
and I'm telling you about it.
But it's over there somewhere.
You don't have to worry about the details because the details don't matter
because no matter what, you have to come through me.
You have to come through me.
So everybody in Area 1 learns from the Area Border Router about 10.0.0.1
or anything in Area 0.
So you don't know the details.
You don't even know who owns it, right?
You are learning from the Area Border Router.
You don't even know DSW-1 exists.
You'll never know that either if you're in Area 1.
That's how that information from other areas is exchanged.
So another example for you is what?
Well, if we take a peek at, for example, Area 1.
If we look at Area 1 on R2, we have router number 5,
the branch router over here.
The branch router has five links participating in the routing process.
So let's take a look at router, 0.0.0.5.
And you'll see here, let's pick this one right here,
one of those subinterfaces on our branch router.
10.0.254.0 is over here, if you recall.
So this is R2.
Don't forget the Area Border Router.
So this is a Type 1 LSA right now.
Let's take this network ID and this subnet mask,
and let's build a Type 3 for who?
For Area 0.
So show IP OSPF database now.
And so the Type 1 from Area 1,
we now create a Type 3 of just the network ID for Area 0.
And I inject that into Area 0.
So if we look that up, summary, 10.0.254.0,
you'll see that, hey, I'm router number 2.
I know about this network.
That's over here somewhere.
You don't have to worry about the details.
And if you want to reach this network,
just send your traffic to me.
So let's go to somebody like DSW1.
And remember, DSW1 only has an Area 0 database.
So if you just look at DSW1's Area 0 database,
look what it says.
I know about 10.0.254.0 slash 24 from router number 2.
Now, do I know how to get to router number 2?
Yes or no, folks?
Does DSW1 know how to get to router number 2?
Yes or no?
Based on everything we talked about,
you should be able to get that answer.
Does DSW1 know how to get to router number 2?
Everybody type in yes.
Yes.
Okay.
The question is, how do they know?
How do they know?
Type 1, right?
Type 1.
Do I know about router number 2?
Yeah.
Because they're in the same area, right?
Yeah.
So router number 2 tells me about that network,
tells me if I want to get there to go through it,
based on my topological map from type 1s and type 2s,
I know how to get to router number 2.
Therefore, I can get to 10.0.254.0.
Just more pieces of the puzzle coming together.
That's all.
I know some of your minds right now are getting warped.
I know.
Reviewing this a couple of times is good.
It'll come together more and more.
So, okay, that's type 3.
Type 3.
Oh, one of the things to know, too, about type 3s
is let's say, let's just do this right now,
and let's say this is area right now 51, all right?
And so this is my area border router between area 0 and area 51.
So when this router injects the type 3 in here,
it's only for here.
Remember that.
So then how does area 51 learn about the networks that are down here, right?
What network is that?
That would be one, we said it's 10.0.254.0.24 as an example,
the one down there.
How would it know about that?
Because this area border router would get what?
That area border router gets the type 3,
and then it would create a new type 3 for this area.
That's right.
So a type 3 can also create a new type 3 for another area
because the type 3 from this area border router is only good for this area.
So if you have other area border routers, which you will have in your environment,
then that area border router takes the type 3 and says,
oh, I'll generate a new type 3 for my area and say,
hey, I am this area border router.
I know about this network.
If you want to get to it, send the traffic to me,
just like this one did into here.
So now, basically, traffic goes from here to here,
and then this router says, oh, okay, I've got to route you over to here.
Then this router routes it back inside.
It's almost, almost, as you can see here, becoming distance vector-like,
as opposed, yeah, it is.
When you start adding more areas,
it kind of starts being distance vector-like more than link state.
Just a little bit.
Because now you're routing based on what?
Router rumors, router haunts, different things like that.
All right.
So that is your type 3.
Generated by who again?
Area border routers.
Good.
Describing routes outside of your area,
but still within your routing domain.
So if we go to DSW-1, look at the routing table again.
Still within the OSPF routing domain, but in a different area.
Next, I'm going to skip 4.
We're going to come back to 4 after.
Let's talk about 5.
5, first and foremost, is generated by who?
It's going to be generated by autonomous system boundary routers.
Now, what makes you an autonomous system boundary router again?
The command default information originate or any type of redistribution.
So if you go back to R1,
notice it says you are an autonomous system boundary router.
Why?
Because, remember, on R1,
we typed in default information originate earlier in today's session.
If we go to somebody like R2 and we type in show IP protocols,
notice it says you are an area border router
and you are an autonomous system boundary router.
So you could be more than one type.
Why am I both in this case?
Well, I'm an area border router connecting area 0 to area 1.
But don't forget, we also typed in default information originate on this router
as well because it connects us to the Internet,
making me an autonomous system boundary router.
So the ASBR is taking networks that are outside of our routing domain.
So, for example, the default route is to all networks outside your routing domain.
So that would be a type 5 LSA.
Networks outside of your routing domain,
external to your routing domain, are type 5s.
So that could be routes we redistributed.
So let's say up here we were running EIGRP.
So this router right here is running both EIGRP and OSPF.
So let's say we had the network 192.168.255.0.24 up here.
How would I get that into OSPF?
I would do redistribution, which is not on this exam.
So don't worry about this for the exam.
I'm just trying to give you some real-world knowledge here.
I would redistribute that on the router into OSPF.
Okay, when I do that, this network here in OSPF would be, for example,
E2 192.168.255.0.24, E2, OSPF, external route, outside of my routing domain.
I redistributed it in.
It doesn't belong to me.
It belongs to somebody else outside of OSPF.
Okay, same thing with default information originate.
You're taking 0.0.0.0.0 and you are bringing it in.
That's what you're doing.
So that's why you are generating these type 5s in those different types of scenarios.
Routes outside of your routing domain through redistribution
and through default information originate.
So what happens with a type 5 is it gets generated by that Autonomous System
Boundary Router and then shipped in to the routing domain,
shipped in to the routing domain.
So now Area 0 is going to learn all about it,
and Area 1 is going to learn all about it.
So if we look at our database, for example, on DSW1,
we'll see in our database that this is the one we've learned from R2,
0.0.0.0 from R2.
And if we crack that open, it's external, 0.0.0.2, 0.0.0.0.
All right, we'll see that we have the one from R2 listed down here.
All right, so it's 0.0.0.0.
Sorry, 0.0.0.0.
Something math slash 0.
And the metric type is 2.
That means E2.
That's the E2 right there.
So ASBR, redistribution, default routes.
Sorry.
Yeah, redistribution or default information originate for default routes,
produces type 5s, and they're right at the very bottom every time.
Let's go over to branch, take a peek at branch.
And you'll see the same thing over here.
We learned it from R1 and R2 as well.
So with that said, right, we learned it from R2.
Why did we also learn it from R1?
You see that?
We learned it from R1 because what we need to realize here is that when you
inject a type 5 LSA, it goes everywhere in that area,
it eventually reaches an ABR,
and that ABR sends it into any other area unmodified, unmodified,
meaning that this router actually received the type 5 LSA that R1 created.
Now, let me ask you this question.
This is very important.
We're focused on this scenario right here right now.
Type 5 generated by R1 just flooded right into area 1.
So R1 sees 0.0.0.
Sorry, did I say R1?
I meant branch A, which is R5, in our case, 0.0.0.0.0 via R1.
That's what this means.
That's what we're seeing in this example.
It says here 0.0.0.0 via R1.
Does branch A, R router 0.0.0.5,
does this router even know that R1 exists?
Yes or no based on everything I've taught you so far in this discussion?
Does that router even know that R1 exists?
No.
Because which LSA teaches you about a router's existence?
Type 1.
Is R5 ever going to get a type 1 LSA from R1?
Well, I guess it's broken, right?
And it is.
It totally is broken.
There's no way that that router can now use that exit point.
So here I come to save the day.
Type 4 LSA to save the day.
The type 4 LSA, folks, is called the ASBR summary LSA.
That doesn't mean anything.
It's bad naming again.
Type 4 is a Band-Aid LSA.
It's to fix this exact problem I am teaching you about right now.
So remember, this type 5 LSA gets injected, gets flooded right into this area.
So this router here sees 0.0.0.0 via R5.
Via R1, sorry.
Like we see in our topology right here.
Right there.
0.0.0.0 via R1, all right?
The type 4 is generated by who?
Generated by the ABR.
Remember that.
The ABR creates this because of this situation.
As soon as this situation happens, it then generates a type 4 and says R1 via R2 in this example.
That's it.
So now you've got the type 5 that says this.
You've got the type 4 that says this.
You've got the type 1 that tells you how to get to R2.
It's going to take three LSAs to make this work.
So right now we have our type 5 that says 0.0.0.0 via R1.
Look at the type 4.
The type 4 that was generated by the area border router, it says 0.0.0.1 is via R2.
And then I have my R2 LSA that helps me get to R2.
A combination of type 5, type 4, and type 1 to make sure we can get there.
A lot of puzzle pieces, as I said.
A lot of puzzle pieces.
So notice, though, that we don't have a type 4 for the type 5 LSA that's generated right here.
You see that?
We have 0.0.0.0 via 0.0.0.2.
Why do I not need a type 4 for this one?
I don't need a type 4 for this one because I know how to get to R2 because R2 is in my area.
So if the ASBR is not in your area, the area border router will generate a type 4 to tell you where it is.
So that way there you can get to it.
So Conrad is asking, can't branch A see how to get to R1 via type 3 LSA?
Okay, so what is inside the type 3 LSA?
What is inside the type 3 LSA is the network ID and the area border router to get there.
That's it.
There's nothing else.
So, for example, these are all your type 3s that are coming into area 1 from area 0.
By who?
Router 2, router 2, router 2, router 2, router 2, the area border router.
So if we open up any one of these, show IP OSPF database for summary.
Network 10.0.0.0 size 24 is reachable via me, R2, that's it.
So there's nothing in there that will ever, ever, ever tell how to get to R1.
So even let's pick something like one of R1's networks.
So R1 is on this network right here.
It's connected to that network.
So let's go ahead and look at that one instead.
So it would be what?
10.40.23.8.
That's a network that R1 is connected to.
It says 10.40.23.8 is reachable via me, R2.
That's it.
Nothing else.
Has no idea, Conrad.
So, no, not the type 3 LSA.
Type 3 LSA is just about describing networks that live in a different area.
That's it.
So here's the way to think about it.
So if this is area 0 right now, and these are our four routers,
they see everything that's going on between them.
They see everything that's going on.
So they all see this.
Now, what do they see over here?
What do they see over here?
They see that over here, let's try this.
They see that over here, something's over here.
Something's over here.
With 10.0.254.0, size 24.
10.0.255.0, size 24.
They know that 10.0.
Okay, you see the difference?
In area 0, they know all the details of all the links,
of all the interfaces, of all the routers.
But then beyond R2, what do they see?
Just a fluffy cloud with a whole bunch of networks.
And then over here, they also see that R2 can get us out to the thing
called the crazy Internet because it's 0.0.0.0.
There you go.
That's all they see.
They see the details of their area, and then every other area is just a big,
poofy, fluffy cloud with network IDs in it.
And so you want to go over there?
Go through that area of border router.
You want to go over there?
Go through that area of border router.
You want to go over there?
Go through that.
So outside of your area, you don't know the details.
You don't know nothing.
You just know they exist.
That is OSPF design.
That is OSPF configuration.
That is OSPF's link state database.
Yep.
Okay, so now that we understand our LSAs,
let's wrap this up by having a discussion on OSPF's metric.
So OSPF's metric is called cost,
and the cost is based on interface bandwidth.
So every single one of our interfaces are going to have a cost associated
with them.
So if we go out to, for example, like DSW1,
we type in show IP OSPF interface brief,
you'll see that we have a cost, cost, cost, cost, cost, cost,
cost associated with every single one of our interfaces.
So that is true.
When you enable OSPF on an interface,
it figures out the cost of that particular interface.
And so how is the cost figured out on an interface-by-interface basis?
It uses this calculation right here.
Reference bandwidth, which is a number that is set in the operating system,
by default on our version of iOS,
it's going to be, if we type in show IP OSPF, that's it.
Just show IP OSPF.
You scroll down, you'll see here reference bandwidth is 100 megabits per
second.
Reference bandwidth is 100 megabits per second.
So that is the number by default on this platform.
So you've got 100 megabits per second divided by,
divided by interface bandwidth.
So let's say we have a 10 megabit per second interface,
then our cost would be 10.
That would be your cost, right?
So if you have 100 megabit reference bandwidth divided by 100 meg
interface, your cost is 1.
If you have 100 reference bandwidth divided by a 1 gig interface,
your cost is 0.1, which equals 1.
If you had a reference bandwidth of 100 and you had a 10 gig interface,
that's 0.01.
Therefore, your cost is 1.
Okay, we've got a problem here, don't we?
Yeah, we do.
And the problem is,
is that once you get over a fast Ethernet interface with a default
reference bandwidth, this gets all messed up.
Every single one of our high-speed interfaces from 100 megs and up are
all treated the exact same way.
So if we go over to router number 2 right now,
if we visit router number 2,
we can actually see this because I have a fast Ethernet interface there.
So show IP OSPF interface brief.
When we look at this output,
you'll see my gig interfaces and my fast Ethernet interfaces all have a
cost of 1.
So you are definitely going to want to take the time to manipulate the
cost, sorry, manipulate the reference bandwidth.
So that way there you have a more accurate cost calculation in your
environment because you don't want interfaces to be treated the same when
it comes to cost if they're not the same.
Because right now it thinks that the fast Ethernet interface is the same
speed as the gigabit Ethernet interface, which is not.
So to do that,
you're going to want to change your reference bandwidth to a value that
makes sense in your case, so router OSPF 1.
So just to show you, if I type in auto cost reference bandwidth,
we'll get, I'll pick a value like 1,000,
1,000 megabits per second, which equals a 1 gig interface.
So now if we look at the output of new show IP OSPF interface brief,
you'll see here that now the fast Ethernet has a cost of 10 and gig has a
cost of one still, why?
Because 1,000 divided by 1,000 is 1,
1,000 divided by a hundred is 10.
So let's add one more zero to that just for show.
And if we look at the output, you'll see that the cost is now 10,
10 and whatever.
Let's pick the maximum value possible with auto cost reference bandwidth,
just to show you that let's pick that as the highest possible value we could
use.
And now you'll see that the reference bandwidth of the interface is that.
So does it make sense that you should do this on all your routers and put the
exact same number on all your routers?
Yes.
It even tells us that make sure it's consistent across all routers or else
you're not going to have, you might have suboptimal routing.
So one thing note is that many of you nowadays could use this maximum value,
set it, forget it and move on.
But what you need to realize is that if you still have slow speed interfaces,
interfaces that are like 10 megs or less,
and it's really actually just a little bit more than 10 megs,
but let's say 10 megs or less in your environment that you can't use that
number because this maxes out at 65,535.
That's the max cost you can have on your interface.
So if the max cost is 65,535, look a fast seat and interface is 42,000.
That means a 10 meg interface would be 422 megs.
Which is more than 65,000,
which means a 1.544 megabit per second interface would be like in the
millions. Again, you can't have that.
It maxes out.
So if you use that top value and you have interfaces from like,
I would say 75 megs or even 60 megs.
So 60 meg ethernet and slower,
they would all max out at 65,535 and you don't want that either.
So although this may seem like the best option,
not good on the other side of things.
So essentially find a value that works based on your slowest speed interface
and your organization and the maximum speed interface in your organization.
If the slowest speed interface you have is 10 megs, then maybe, you know,
doing something like this would make more sense. Maybe, I don't know.
I'd have to do the math, but yeah.
So now your 10 meg interface would be like 420,
sorry, 42,949 is what your 10 meg interface would be.
But maybe this doesn't work at your high speed interfaces anymore.
So it's about figuring out what works for the high speed, low speed,
getting the number that works in between. Most of us though,
we could probably go with the highest possible value. Everything's fine.
But in the grand scheme of things, right.
Figuring out what's my high speed interface right now.
We got like 10 gigs. Okay.
So 10 gigs would be this value here. Okay.
Well, when are you switching to a hundred gigs? When's that going to happen?
How many years from now? Right. If you add on another zero,
there's for a hundred gig interface that might work for you across the board
for all of your interfaces for the next like 10 years.
So what you pick is up to you. There's no right or wrong answer.
It's just,
let's make sure that our interfaces are not all coming up with the exact same
cost. We want them to be gigabit to have the same cost.
We want 10 gig to have their own unique costs.
We want fast Ethernet to have their own unique costs.
Let's make sure they're not all defaulting to one.
Like we just saw here in our environment. So for today,
I'm just going to change it to 10,000 on all of my routers.
Did I say 10,000? I mean, 1,000.
So that way there we can do our little demo that I want to do now.
Okay.
So now that we have that information and we take now a peek back at our
topology, what is, how is cost going to be calculated?
What cost is cumulative? Cost is cumulative.
That's what it is. So when it comes to cost,
we are going to have costs for every single one of our interfaces.
So this is now 10. This is now 10. This is now 10. This is one.
This is one. This is one. Let's not forget about our SVIs.
This is going to be one, right? This is going to be one.
This is going to be one. This is going to be one.
This is going to be one. Why?
Because I made the reference band 1,000 on all of them.
So let's think about this network down here. 10.0.0.
10.0.254.0 slash 24. Okay.
So in this environment here, we're going to be exchanging type one LSAs.
So what happens here is R2 learns about this network from that router.
And that router says 10.0.254.0 slash 24 has a cost of 10.
That's what it says.
So if we look at that particular do show IP OSTF database for routers,
0.0.0.5 me, right?
What are we going to see? Let's go find that network. It says 10.
So when it advertises that to R2, that's what R2 learns.
So if we go take a look at the exact same output on R2,
R2 sees that the value is going to be 10, right?
So R2 now has that information. What does R2 do now?
Well, R2 taking the type one and type two LSAs builds a topological map.
And it says, okay, so it's my cost of my interface is 10.
And that gets me all the way over to that router that advertised it to me.
So what does that mean? It means I can now add 10 plus 10,
which would give me a cost of 20 in this particular case.
So it's this number, this number plus this number.
It's always the exiting interface that's used for the calculation.
So if we go to R2 right now,
we've got 10 and we calculated using the type one LSAs,
how to get to that router.
So type one, type two LSAs, dykes are short of passive algorithm.
We figure out the calculation and we should have a grand total of 20.
So we look at our routing table, do show IP OSTF database.
We're going to see that the grand total is drum roll, please 20.
There it is 20. All right.
So now let's think about it from the perspective of type three.
So now what is R2 going to, okay. So let me rephrase that.
That is what happens in your area. So even over here, right?
When R2 is trying to understand how to get to these networks or R1 is trying
to understand how to get to all the networks, same idea.
I learn about the exact network from you.
And with the metric of that interface,
and then I have to figure out how to get to you using type ones and type
twos,
and then add up all the costs of the exiting interfaces.
Once I figure that out and that is the total cost to get to that
network. So that's what happens inside your area.
Now, what about between areas? So for example,
R2 now injects what? A type three LSA.
So that's what happens inside your area.
Now what about between areas? So for example,
R2 now injects what? A type three LSA.
What does the type three LSA say? Well, where does it go?
It gets flooded to everybody in the area.
So now DSW one gets it and says 10.0.254.0 slash 24.
And what is the metric?
The metric it learns is going to be this metric right here.
20 equals 20 from R2.
And we can look at that right now.
If we go over to somebody like DSW one as an example,
do show I P O S P F database summary LSA.
And then we type in zero dot zero dot no, no, no, no.
We type in 10.0.254.0.
And we'll see the final total 10.0.254.0 slash 24 metric equals 20.
That's the type three LSA that DSW one got from who from R2.
So now what does DSW one have to do?
DSW one has to use its topological database that it's already created.
It's already calculated.
And it's topological database says from me to you from me to you is what?
Well, it's my interface cost is one.
And in this case, that gets me directly to you.
So I have one plus the 20.
And now I have the total value in that case.
So if we go over to DSW one, we type in do show I P route.
One plus 20 is 21.
And there it is.
That's how it's calculated.
And when it comes to, for example, the external routes, if it's an E2 route,
whatever the metric is that is injected by the autonomous system boundary router,
it stays that way and never gets modified in the environment.
That's right.
So in this case, R2 put a metric of one when we did the default information originate,
and it never gets modified or changed or cumulative or added.
That's the point of E2.
The metric doesn't change at all.
It stays at whatever the ASBR made it.
E1, on the other hand, changes the metric and makes it cumulative.
So that's the big difference between E1 and E2.
E2, the metric never changes, whereas E1, the metric is cumulative.
So like I said earlier, when I talked about E1 and E2, why?
Why does that happen?
To give you flexibility.
If you want to control the ASBR exit points and what your routers use to make the decisions on who to use
in regards to an exit point, you got a choice.
You can do E2, manipulate the metric at the entry point, make those adjustments,
or you can use E1 and let your internal network cumulative costs figure that out for you.
That's all flexibility that we cover in the advanced routing course NRC 300-410.
That is not relevant for this particular certification exam.
So that, my friends, folks, is OSPF costs when it comes to OSPF plus our LSAs.
So make sure you're aware of how that all happens to make sure you ace the certification exam.