Great news, folks. We now get to move on to routing. We are now officially done our discussions
on Layer 2 access and distribution layer features and services, so VLANs, trunks, inter-VLAN
routing, first operand NC protocols. Now we really want to start talking about routing
and things like OSPF and BGP for the certification exam. So one of the things we have to do is
we're going to have to go back and do a review of routing just like we had in CCNA. And the
reason why is because if you are not familiar with what we cover in CCNA, Encore will destroy
you in regards to what I'm about to cover with you. You really have to know this stuff
inside and out. And if you don't know this stuff inside and out that I'm about to show
you, it's going to be difficult to cover or it's going to be difficult to get through the exam
properly. And the last thing you want is to get a question that is based on, let's say,
something like administrative distance and you don't fully understand administrative distance
and what happens to you, you don't get any marks on that. And it could be worth 30 marks
out of all of your marks. Why? Because Cisco expects you to really understand your routers,
your routing tables, how your routers learn, how your routers make decisions,
and all of that stuff. And if you don't know the process, it's going to be very difficult
to answer the questions the way Cisco wants you to answer them. So, we'll see here that we have
a routing table. Routing tables are used by our routers to make routing decisions.
Notice here that we have a multitude of different network IDs that are in our routing table.
These network IDs have been put in the routing table based on various methods, based on various
means. The most fundamental way that routes get in the routing table are by having IP addresses
on your router interfaces. When you put an IP address on the router interface and the interface
is up, up, what happens is, is the router takes the network ID that that interface belongs to
and puts it in the routing table. So, what does that mean? It means that this particular network
is directly connected to me, directly connected. That means that I have an IP address on this
interface that belongs to that network. And specifically, it is this interface,
gigabit ethernet 0 slash 0, that would have that IP address in that particular network.
So, how did that get in there? I put an IP address on that interface, the interface is up, up,
it gets in the routing table that way. So, if we go to somebody like router number one right now,
let us type in do show IP interface brief.
And what we are going to see here is that we have this IP address on our interface of gigabit
ethernet 0 slash 0. Let us type in do show run interface gigabit ethernet 0 slash 0,
because I want to make sure I know the subnet mask too. Okay. So, there is our subnet mask.
So, let us go ahead right now and take a look at a routing table, do show IP route.
And you will see that for this network, 10.40.23.1, okay, slash 30,
that would be this network right here for gigabit ethernet 0 slash 0.
So, I added an IP address to gigabit ethernet 0 slash 0, and the interface is up, up right now.
Therefore, the route, the network ID gets injected in the routing table.
So, let us go to interface gigabit ethernet 0 slash 0,
and let us type in no IP address. And you are going to see now, if we look at a routing table,
that that route is no longer in the routing table. Why is that route no longer in the
routing table? Because I do not have an IP address on that interface,
on that interface anymore. So, let us add that IP address back in.
We will copy and paste what I have here.
Right. And you will see, as soon as I put the IP address on the interface and the interface goes
up, up, right now, we have that network in our routing table.
All right. What if we shut down the interface? If we shut down the interface, that means the
interface is no longer available. If the interface is no longer available, then the
router is like, I cannot reach that network through that interface, so I might as well
take it out of the routing table then. So, we take a look at do show IP route. You will see
that it is no longer in there. Why? Because the interface is down. So, two things must match,
or two things must be true. The interface must be up, and there must be an IP address on that
interface for the network ID of that interface to be installed in the routing table. So, that is
how we get our directly connected routes in the routing table. Without directly connected routes,
nothing else can happen, right? Our router is a router, and it routes packets, and it has to be
attached to networks. And to be attached to networks, it has to have IP addresses on its
interfaces for IPv4. So, as a result of that, to build its routing table and get things going and
to start using dynamic routing protocols, you need IP addresses on interfaces, and therefore,
your router interfaces have to belong to networks. That is how it happens, right?
So, the same thing is true with your SVIs. When you create an SVI, you put an IP address on that
virtual interface. The virtual interface is up, up. You get the route in the routing table. So,
we type in do show IP route on distribution router 1, right? How do we get 10.0.0.0 slash 24 in there
for interface VLAN 1? I configured 10.0.0.1, 255.255.255.0 as the IP address on interface
VLAN 1. So, therefore, it gets put in the routing table for me. You will also see here that we have
something called local routes. So, look at the local route here. The local route is the actual
IP address of the interface, but not the subnet mask that we configured. So, if we type in do show
interface or do show IP interface gigabit ethernet 0.0, we will see here that the IP address and
subnet mask of this interface is this. But look what is showing up in our routing table as the
local route. It is actually slash 32. So, a local route is a special route that gets added to your
routing table, and it is the IP address of the interface, but the subnet mask is slash 32. And
the reason why that exists, it is not for loopback, okay? The reason why that exists is for traffic
that is destined to this router. So, for example, like if I ping this router and I ping 10.40.23.1,
when it arrives at the router, the router can immediately determine that it is for the router,
because the router knows that this IP address belongs to itself. So, it is not going to route
it. It is for itself. If I tell it to the router, if I SSH to the router using these IP addresses,
right, it simplifies the routing table lookup, because the routing table lookup is based on the
longest match rule. The longest match rule states this. If you find multiple entries in the routing
table that match, make sure you use the one with the longest subnet mask. So, right now, 10.40.23.1
matches this, but 10.40.23.1 also matches this, and 10.40.23.1 also matches this. So, by adding
the local route, it makes sure that if it is 10.40.23.1, it is guaranteed to match this one
right here, right? Improve the performance of the router for traffic that is destined to the router,
not to be routed, but to be processed by the router and absorbed by that particular router.
So, those are the directly connected routes, the local routes. So, we have our connected routes,
we have our local routes, and the next one we have are, like, static routes. So, what are
static routes? Static routes are any routes that you manually create. So, for example, on my router
right now, R1, I could turn around, and I could type in something like exit. I could type in IP
route, 10.0.0.0, 255.255.255.0. Next top IP address, let me do 10.40.23.2, and if we type in
do show IP route, what are we going to see? We're going to see in our results that I have a static
route in order to get to that particular network. And the one above it, you'll see, is also a static
route, but it's a static default route. So, any time you do IP route, let me type in do show
run pipe to section IP route, any time you have a route that looks like this, that is your static
default route, and that is basically your gateway to last resort. So, if your router does not have
a match, any other match in the routing table, then it's going to go ahead and use that default
route in order to forward traffic. And then lastly, we have a whole bunch of OSPF routes.
For example, in this particular case, you could have OSPF routes, you could have EIGRP routes,
you could have BGP routes, you could have ISIS routes, and the codes up here tell you the type
of routes you have. You might even have some RIP routes, and the codes will tell you how you
actually learnt that from its source. So, in this case, this network was learnt via the OSPF routing
protocol, whereas if there was a D here, it means it was learned via the EIGRP routing protocol,
and so on and so forth. All right. So, with that in mind now, we need to talk about how the table
actually gets populated, how it actually gets built, because we so far know that we can learn
via having an IP address configured on an interface. We know that we can learn via static
routes. We know that we can learn via dynamic routing protocols like what? Like RIP, BGP, EIGRP,
OSPF, ISIS. But the thing is, is that we have to recognize that the router has to make a decision
when it learns networks. It has to figure out first and foremost, you know, what am I actually
going to install in this table? Just because I learnt it doesn't mean I install it. It has to
meet certain criteria before I put it in the routing table. So, even if I type something in
manually, it doesn't mean the router is actually going to use it. Just because I put an IP address
on an interface and it's up, doesn't mean the router is actually going to use it. Why? Because
other conditions have to be met. For example, if I put an IP address on the interface, it has to be
up, up in order for it to get installed. With a static route, I could create a static route,
but it's not going to get installed in the routing table unless the interface that is used
to reach the next top IP address is actually up. That's right. Did you know that? If not,
let me show you. So, we created the static route right now. Why did that get installed
in the routing table? Well, one, I created it. But two, it's because this next top IP address
is actually reachable. Reachable how? Out this directly connected interface. So, I have a way
to get to it. Let's bring down that interface. So, interface gigabit ethernet 0 size 0. If we
shut down that interface, you're going to see that this is going to get removed from the routing
table. This static route is going to get removed from the routing table. Now, there might be a
dynamic route in there from OSPF now, and we'll talk more about that later because I'm running
multiple sources here. But I'm going to show you that the static route is gone. Okay. The static
route is gone. Now, there is one for OSPF, you can see, right? Because I am running OSPF on this
as well. But the static route is gone. Why? Because the interface that is used to get there is gone,
right? And now we're using gigabit 0 size 1, and OSPF has diverted us that way.
Let's type in no shut. And you'll see once the interface comes back up,
because the interface that is being referenced by the static route to reach that destination
network is now up. Now, the static route gets installed in the routing table.
Right. So, all these little things are part of the overall decision-making process. But one of
the most important things is check your administrative distance. Check that administrative
distance. Because if you learn the same network from multiple sources, you are going to have to
figure out what source is the better source to use. And if you're using the wrong source,
then that, well, you can't use the wrong source. It's going to force you to use the, no, actually,
you know what, you could use the wrong source, which means you would have to figure out how to
manipulate that. And I teach you that in the NRC course and certification exam to get you through
that. And then after administrative distance, once you find the best source based on administrative
distance, then you can look at a metric of that source. And then you can determine what goes on
the routing table. So, these steps are really important. You're probably going to be testing
on these on the exam, just like you were for CCNA. So, let's start off with administrative
distance right now. So, what is administrative distance, folks? It's a ranking system.
It's a ranking system. Look at the different sources here.
You see all the sources? Connected, static,
exterior border gateway protocol, EIGRP, OSPF, ISIS, et cetera.
And look at the numbering system beside it. That is administrative distance.
Lower is better, as you can see. Now, what does this mean? It means if I learn the same information
from multiple sources, we are going to use administrative distance to break that tie.
You cannot use information about the same network for more than one source.
And let me diagram this out for you right now. So, for example, let's say that we have EIGRP
running, and we have OSPF running. So, let's say this is EIGRP, and let's say this is OSPF.
This is you. So, now you've learned that 10.0.0.0 size 24 is via, we'll say EIGRP path,
and you've also learned that 10.0.0.0 size 24 is via the OSPF path.
So, you've learned about the exact same information more than once. You've learned
it from two different sources. You've learned it from EIGRP, and you've learned it from OSPF.
All right, folks, you have to chat in your answer. If you learned about 10.0.0.0 size 24
from both EIGRP and OSPF, which one are you going to use? EIGRP or OSPF?
Look at the numbers, right? Lower is better. So, 90 is the winner. 90 is the winner. You're going
to use EIGRP, meaning I'm not even going to consider you. That's right. I'm not even going
to consider you. Big deal. Why is that a big deal? Well, let's do this. 10 megabits, 10 megabits,
10 megabits, 10 gigs, 10 gigs. Which one are you going to use now, folks? EIGRP or OSPF?
EIGRP or OSPF?
It's still EIGRP. It's still EIGRP. Absolutely. You see, the metrics don't matter yet.
The metrics don't matter yet.
So, I learned about the same network from two different sources. The numbers don't matter.
The numbers don't matter. What matters is who is more believable. That's it. That's it.
All right, folks. Let's say my wife and I decide we're going to take a trip.
We're going to go from Phoenix all the way to Vegas.
Folks, please chat in.
Sources of directions.
Keep driving. What are my sources of directions? Come on, folks. Chat in. Good.
Good. What else? Good. Anything else?
There you go. Right? Sources of directions.
Okay. Let's rank them now. Why? Well, I'm going to rank them. Just like who created this list,
this is Cisco's list. This is Cisco's list. That's right.
Administrative distance on other devices could be different. This is Cisco's list.
So, I'm going to create my list.
What does that mean? It means that I have learned about directions from Phoenix to Las Vegas
from all of these sources. Who am I going to listen to, folks?
The lowest number, Google Maps. It doesn't matter. Doesn't matter how much
I am getting yelled at. That's right. I have to ignore it. I have to ignore it.
And I must stick to Google Maps because that is my ranking system.
So, let's say I'm using my phone. All of a sudden, the window starts going down.
My phone is grabbed. My phone is thrown out the window. Okay. Well, am I going to learn from Google
Maps anymore? No, I'm not. So, what am I going to use next? The built-in GPS in the vehicle.
So, again, it doesn't matter. Doesn't matter what anybody else is saying or anything else is going
on. I'm following the GPS. So, the GPS gets taken out of the vehicle, thrown out the window.
What's next? I stop at a gas station to ask for directions.
At that point, the car is probably gone.
And I'm standing there all by myself.
Right. What I'm trying to point out to you, folks, is that this is a ranking system
that is set, but it's not necessarily set in stone. And you'll learn about that in the ANARSI course
when you get to the advanced routing course. And we teach you how to manipulate it because it's
very important that you manipulate it under certain scenarios and certain situations.
If you're not getting the results you want when you learn from multiple sources in complex routing
environments that use many different sources, then you would have to manipulate the system
in that particular case. So, you can basically re-rank things if you need to. So, for example,
let's get rid of this. This could ultimately become four. This could ultimately become three
if we wanted to. Or maybe, you know, this should be three. That should be two. Or maybe, you know,
it's better that this is one and maybe this is two. Whatever. Like, you have the ability
to rank them as you need to for your particular environment.
So, remember, this is only going to – this is only going to become a major concern, though,
if you're running multiple sources. If you're running a single source and you're only learning
from a single source, well, then that source, no matter how many times you learn from it,
administratively, this is tied. Right? And that's when metrics are going to come into play,
and we're going to get to that momentarily. So, for example, let's say instead that we had
another network here, 10.0.2.0.24. And we learned that via OSPF. Well, we learned 10.0.0.0.24 via
EIGRP. Well, if we go 10.0.2.0.24 via OSPF, are those the same? Are those the same? No, they're
not. Right? They're not the same. So, because they're not the same, then what happens is they
both get installed in the routing table from different sources. So, I'd have this in there
from EIGRP. I'd have this one in there from OSPF. Why? Because they're different. Different
networks from different sources. Different networks from different sources. Okay?
So, administrative distance is about if you learn the same piece of information
from more than one source, we've got to figure out which one's the best.
So, for example, let's say we draw this as is, put this zero here. Let's say I type in IP route
10.0.0.0.24 via ABC123. All right? So, now in this case, which one gets installed in the routing
table? Is it the one via EIGRP? Is it the one via OSPF? Or is it the static route?
Well, IP route is static route. We got one versus 90 versus 110. So, it's the static route that
would go in the routing table. And that's what happened over here, folks, in our live environment
a little earlier. So, in our live environment a little earlier, do you remember I had the
static route there? What's the administrative distance of the static route? It is one.
It is one, the administrative distance. Okay, let's go ahead and bring down that interface
just as an example. Right? And remember, when we bring down that interface,
then this gets removed. Why? It gets removed because the next hop IP address is not reachable.
All right? But what I'm trying to show you is if we look in the routing table,
did I type a no shut? All right. So, if we look at the routing table, you'll see that the OSPF
route's in there. So, OSPF has administrative distance of 110. So, let's bring back up that
interface. And when that interface comes back up, right, the static route, there's a static route
for 10.0.0.0-24. So, that static route gets installed in the routing table. Why? Lower
administrative distance. So, another way I can show you this is to simply just
do show run pipe to include IP route. Let's go ahead and remove this right now.
Type in do show IP route. What do you have? You got your OSPF route installed in the routing table.
All right. Let's go ahead and put it back in. Because it's a static route, it has what? A lower
administrative distance. Lower administrative distance means you win. There you go. Static
routes in the table. That's it. That's what's causing that to happen. Administrative distance,
same source. I'm sorry, different sources, same information. Administrative distance is used to
break that. So, again, metric doesn't matter. So, pay attention to that. First things first,
administrative distance. Okay. What's next? Metric. Okay. So, metric is going to be used
within the same source. You can't use metric between different sources. And the reason why
you can't use metric between different sources is because they all have different metrics.
For example, connected routes have no metric. It's a zero. Static routes on Cisco devices have
no metric. It's a zero. And you can't do anything about that. Okay. RIP uses hop count. The number
of routers you have to hop through in order to get to the destination. So, going this way would be
one, two, three. Three hops going this way. This way is one, two. Two hops going this way.
So, it's going to choose this path just because of the number of hops.
With EIGRP, we got bandwidth, lowest bandwidth plus cumulative delay of our path. With OSPF,
we have the cost of the path that we'll talk about more when we get to our OSPF discussion.
BGP is based on attributes. None of these are comparable to each other. None of them are
comparable to each other. They're all different. Right? Just think about an orange and an apple.
They're both fruits. They're both fruits, but they taste totally different. They have totally
different skins. Totally different types of seeds. Right? They're not even comparable. Yes,
they're both fruits, but they're really different. Same thing here. They're all dynamic routing
protocols. Well, not all, but they're all dynamic routing protocols here, but they're all sources
of routing information, but they're all different. They calculate things differently. So, that's why
you can never break the tie using metrics. So, for example, if we said EIGRP versus OSPF,
you can't do that with a metric. That's why administrative distance is first.
Who wins? EIGRP. Yay. Done. But what about the metric? Doesn't matter in that case
because EIGRP is the only option. One path. Okay. But now, let's say they're both EIGRP. Oh,
well, there. Now, that's different. Right? Now that they're both learned via EIGRP,
EIGRP, we look at administrative distance. Administrative distance is 90. Administrative
distance is 90. Administrative distance is tied. Good. Yay. Now, we can look at the metric to break
that tie. And so, let's say this was a one-meg path, one-meg path, one-meg path, and this was
a two-meg path, two-meg path. Okay. With EIGRP, higher bandwidth better. So, we would more than
likely take this path. Same thing would be true with something like OSPF. So, if we learned the
same information from OSPF in both paths, well, then OSPF, we're using cost. So, if the cost of
this is one, one, one, well, that'd be a total cost of three. If it's one, one, total cost of two.
So, lower is better. We go that way. Right? So, cost is based on bandwidth. We'll talk about that
when we get to OSPF if you don't know how that works. Right? So, metric is just something that
is different amongst all of these. And if we go back to our Google Maps example,
right, it's easy to portray that. Why is it easy to portray that?
Because if you think about right now, if we had Google Maps
and we had my wife, let me ask you this. What is Google Maps metric, folks? Chat in. What is
Google Maps metric? Just throw some things out. What might Google Maps be using to determine
the best path based on this diagram? Okay. Distance, right? How far is it?
Distance, right? How far is it away if I go this way versus this way versus this way versus this
way? Right? So, Google Maps knows about many different ways. Google Maps knows about many
different ways. And what it's going to do is it's going to figure out what is the shortest way to go
based on things like, yeah, distance, traffic, speed limits, all of that stuff. Perfect. Perfect.
Okay. What is my wife going to use as her metric?
Okay. My wife is going to use the number of crystal shops that are along the path.
The number of crystal shops that are along the path. So, for us, right, if I'm using my wife as
my source of information, we're probably not going to spend a lot of time in Vegas.
We're probably going to spend a lot of time over here. So, more than likely, the trip is going this
way. We'll eventually get to Vegas. But that's what her metric would be based on as an example.
So, that's a really great scenario, folks, for all of you to realize that, yeah, you know,
Google Maps could be EIGRP. My wife is OSPF. Right? Totally different metrics. Therefore,
uncomparable when it's all said and done. That's why you, right, could pick your metrics based on
administrative distance, manipulate things as you need to in the real world. Or, you know,
if you're just using one metric, well, then, whatever its decision-making factor is is what
you're going to use in that case. So, if I just decide, hey, the only option we have is my wife,
well, then, whatever she chooses, she chooses. That's what we're doing. There is no other option
available at that point in time. So, that would just be a network with one dynamic routing protocol
running in it. But we'd still have static and connected. Right? So, maybe I could override
her with my static routes because my static routes would have a lower administrative distance.
Maybe. Maybe. Probably won't do that, though. All right. So, hopefully, folks, you love that
scenario. You love that story. And, yes, I have permission from my wife to give that
scenario, that story, as is. So, but I hope it gets the point across. This is one of the biggest
challenges I had many, many, many, many years ago. Too many. I've ran out of fingers and toes now
to count how many years ago that is. But, yeah, I struggled with administration distance in my
early, early years and this whole concept. So, hopefully, something like that really helps
clarify it for you. And now it makes a lot more sense. And then, now that you think about it,
we figured out what the best source is. And if there is multiple paths within that same source,
then we break that up based on metric. And then, in the end, we're down to one potential
route or two potential routes or three, whatever it is. And we install whatever is left over in
the routing table that matches our overall criteria. So, now, let's test your understanding
of this. So, you are here, right? This is the network that we're talking about. Which route,
the EIGRP route, the RIP route, or the OSPF route, folks, is going to be used
by you to get here? The EIGRP, RIP, or OSPF?
Is everyone sure? Are you sure? Are you sure it's EIGRP?
Are you sure? If you are sure, tell me why you chose that.
Yes. Administrative distance, that's it. Three different sources, right? Three different
sources. EIGRP, 90. OSPF, 110. RIP, 120. Who's lower? EIGRP, you're the winner.
Metric doesn't matter, remember? Administrative distance first. Administrative distance first,
that's it. We're done. The metric doesn't even matter in this scenario right now.
Important for your exam success.
Okay. So, let's build upon this discussion now. Look at how I've changed it for you.
Now, tell me which path is going to be used. Is it going to be path number one,
path number two, or path number three? Would you like door one, door two, or door three?
Okay. So, first things first. Administrative distance. So, we have 110, we have 120,
we have 110. Okay. So, you are out of the picture automatically because your administrative
distance is too high. We don't care about you anymore. 110 versus 110, tied. Let's break the
tie. How do we break the tie? We break the tie with the metric now. So, lower is better. 50 is
lower than 70. This is the winner. That's the one we're going to install in our routing table. We're
going to go this way. Let's modify it just a little bit more. Now, which one's going to be used?
One, two, or three?
So,
load balance on two and three. They're equal metric paths, and you load balance
on equal metric paths automatically. Let's see if I can get you an example of that.
There you go. There's an example of load balancing right there. I have two equal metric paths to get
to that network. One is out this interface. The other one is out that interface.
All right. So, hops don't matter anyways when it comes to OSPF. Hops don't matter at all.
Number of routers don't matter. It is purely based on bandwidth, which is the metric.
So, in the end, if the metric was calculated based on the bandwidth as 50,
and the metric is calculated based on bandwidth of 50, it doesn't matter the number of routers,
doesn't matter the number of links, doesn't matter the number of hops.
50 is 50, and therefore, we would load balance.
Yes, Andrew, it is really load balanced, okay? So, back in the day, we used to do
packet-by-packet load balancing, right, by default on our routers. But our routers now,
and Cisco routers use flow-based load balancing instead, meaning that if my traffic,
let's say my traffic, this is me, okay? This is me, and this is you. It would ensure,
instead of packet load balancing, because if it's packet load balancing, that means my one
packet of mine would go this way, the other packet would go this way. That could cause problems,
potentially, in the network because packets could arrive out of order, and if we're not using a
protocol that can reassemble that properly, then in the end, it causes problems, all right?
So, instead, we do flow-based load balancing. So, if my traffic arrives here, and the router
chooses to send my traffic this way, then all of my traffic will go that way, and when yours
arrives, if it chooses to go this way, then all of your traffic will go that way for that session,
for that flow of traffic that is all coming from the same source, going to the same destination,
using the same port numbers, using the same quality of service markings, and all that stuff.
So, it's flow-based.
John says, isn't it cost? Yes. So, the name for OSPF is cost, but it's still the metric.
So, we come back here to this page, right? The metric for OSPF is called cost.
So, whether you say metric, whether you say cost, same idea.
So, cost is the cost of the interfaces that are then added together, which equal your metric.
We'll talk about that when we get to our OSPF discussion on that.
All right. So, now that we have a routing table built, right? So, let's make sure we
understand what just happened. Based on administrative distance, based on metric,
based on metric, we built our routing table. We built our routing table. That's all we've done.
Now, we can use it. So, when we use it, let's pretend this is R2, right here in my diagram,
traffic arrives. The router now has to use this table to make a decision. What is it going to do?
Find the network entry that matches the destination IP address. So,
let's say the destination IP in the packets 10.0.10.25.
Then, find the network entry or entries that the destination IP address lives in. So, which of all
of these does this fall into? Which one? Which one? Which one? Which one? Which one? And then,
if there's more than one you find, use the one with the subnet mask closest to 32. That's what
we call the longest match rule. The longest match rule. Match the longest subnet mask entry,
the one closest to 32. So, a packet arrives.
A packet arrives, destined at 10.0.10.25. That is somewhere over here.
So, the router has to figure out, which of these entries am I going to use to forward it?
So, 10 doesn't match, doesn't match, doesn't match, doesn't match, doesn't match. So,
none of these match, just based on that. 10.0, okay, all of these match, including this one up
here. 0, 0, 0, 0, size 0 matches everything. So, we already know this one's a match. We already
know that. Meaning, if none of the other ones match, that's the one we're using.
10.0.10. 10.0.10. So, this is greater than 10, greater than 10, greater than 10, greater than
10. So, none of these are going to match. So, we can take them off. 10.0.10.25.
Greater than 25, so I can take that off. Greater than 25, I can take that off. So, we're left with
all of these. Now, I look at this one here, because I see 32. 32 means this exact IP address.
So, this is a 2. This is a 25. So, not the exact IP address. So, what does that mean? We can take it
off, right? Any slash 24 network you have, any slash 24 network you have, 0 will be the first
address in that range. It's also the network ID. It's a non-usable address. It's the network ID,
and the last one will always be 255, and that will be the directed broadcast address. So,
the question is, this is your range. This is your range for a slash 24. So, if it's 10.0.10,
dot zero slash 24, it's easy to figure out the range. Zero is the first one, because it's a
slash 24. 255 is the last one, and then just put those numbers in. So, question is, does this,
folks, fall within that range? Yes or no? Does that fall within that range?
All right. It absolutely does. Yes, it does, right? We can see the numbers. So, we know that
this is a possible match. We know it's a possible match, but we still have one more to check.
All right. So, I'm going to use some skills I teach in CCNA to figure out this one right here.
Okay. So, slash 28 would equal 8, 8, 8, 24, 25, 26, 27, 28, 29, 30, 31, 32. Okay. This is 128,
128, 64, 33. So, 16. So, I'm counting by 16 in the fourth octet. So, if I'm counting by 16 in
the fourth octet, the first network ID would be 10.0.10.0. And if I'm counting by 16, the next
one would be 10.0.10.16. So, that would be a slash 28. That would be a slash 28. The next one would
be 10.0.10.16 plus 16 is 32. So, that's 28. Okay. I can stop because you see this? This is that
network ID. I already figured it out. So, what do I know now? I know that the range of addresses
are going to be from 10.0.10.16 to 10.0.10.31. There's my range. There's my range now. So,
the question is, does this fall in that range we just figured out? Yes or no?
Yes, it does. Ding, ding, ding. Awesome. Okay. So, we now know that all three of these match.
All three of them match this IP address. So, what does that mean? It means now we got to find the
subnet mask closest to slash 32. The one closest to slash 32. That's the longest match rule.
Right? So, is this one closer to slash 32? Is this one closer to slash 32? Or is this one closer
to slash 32? Right? Absolutely, it's this one right here. Here's our winner in this scenario.
Okay. So, what do I want to point out to you in this case? And I point this out on the CCNA exam
as well. If you ever get a question like, which of the following entry will be used
to forward the packet destined to 10.0.10.25, you need to be able to do this. Right? So, we learn
all these skills in CCNA. They take a long time to learn. So, if you struggle figuring out ranges
of IP addresses, you definitely want to go back and look at session three of CCNA, where I spend
the entire session going over IP addressing and subnetting. You'll definitely want to brush up
on that if you struggle with that. Right? But just imagine now on the exam if they turned around and
said, what dynamic routing protocol or what source of information was used to populate the routing
table for the network that matches that destination IP address? Okay. So, now you're sitting there
going, okay, I've got to figure out which one wins, and then I have to look for the source,
and your answer would be OSPF. Okay? Or what is the subnet mask of the network ID that will be
used for the entry for this destination? Well, okay, slash 28. Like, you see how they are kind
of testing you on your ability to figure things out, and then asking you to figure out what value
of that line is the actual answer. Makes it really hard to guess. It really does. Because they could
turn around and say, what is the administrative distance of the entry that matches the packet
that's tested at 10.0.10.25? Well, it's 110. What is the metric of the packet, or what is the, yeah,
the metric of the entry that matches the packet for 10.0.10.25? It's four. Okay, what is the next
top IP address? How long has it been installed in the routing table based on the image? What
interface is going to be used? Just look at this. You've got 00, 20, 10, 30 all listed. Could you
imagine if they said, what is the interface that will be used for the packet to 10.0.10.25? And
then you look at the answer options, it says gig 00, gig 01, or sorry, gig 00, gig 10, gig 20,
they're all listed there. If you guess, you've got a 25% chance of getting it right. Don't,
don't, figure it out. Figure it out. All right. Yeah, so that's another way you can figure out
the block size as well. So if you know that the subnet mask is 255, 255, 255, 240, then you can
take 256 minus 240, that leaves you with 16. It's just another way to figure it out. Just another
way to figure it out. Yeah. And I teach both those methods in my CCNA course. All right. So
just something to remember. So we reminded you about administrative distance. We reminded you
about metric. We reminded you about longest match rule. And one thing I want to cover here just
before we move on, and that is going to be this one right here. The time to live of our packet.
Do you remember what the time to live of our packet is for folks? The time to live of our packet
is used to time out the actual packet if it doesn't reach its destination.
How is the time to live used in modern day equipment? It is basically just a hop count.
That's what it is. So your PC creates the packet and sets the time to live, let's say to 64.
It's a value that can be from 0 to 255. Packet gets sent out. What does the router do? The router
is going to route the packet, but it modifies the time to live. It modifies the time to live.
It will drop it down to 63. So every time a router touches a packet, it drops down the time to live.
Now it's 62. Now it's 61. Next router, and so on and so forth. So the idea here is your packet
must reach the destination before the time to live expires. So let's say the destination address
is 8888 out on the internet over here somewhere. So, and I set the time to live to 2.
What's going to happen here? Well, this router gets it, decrements it to 1, forwards it on.
This router gets it, decrements it to 0. The router that decrements it to 0 will drop the packet
and then it's going to send an ICMP time exceeded message to your client.
I want you to know that. That's why I'm bringing it up, just in case it shows up
on your exam. So which router decrements it? So which router is going to send the ICMP time
exceeded message? The one that decrements it to 0. The one that decrements it to 0.
So you're going to get it in with a time to live of 1. You decrement it to 0. You're like, well,
it's dead. You drop it and you send it back. Okay, it's not this one here. It's not the
one that has 1 in it. No, no, no, no. It's the one that decrements it to 0.
So the router that makes it 0 drops it and sends the ICMP exceeded message back. Keep that in mind.
All right. Make sure you know what we've covered there for the exam. Good stuff, everybody.