- [Teacher] In this lesson we're
going to be doing multiple OSPF demos.
And we're going to get started in this video
by taking a look it's actually a review of
a basic OSPF version two configuration.
Remembering that OSPF version two
is going to be used to route IP version four traffic
not IP version six.
But here in this topology,
we simply want routers R one, R two and R three
to advertise all of their directly attached networks
and for everybody to know about
all the networks that we have.
Then in our next video,
we'll take a look at how we can start doing some filtering.
But let's just get a basic topology working for now.
Here on router R one,
we're going to go into global configuration mode
and then we'll go into router configuration mode
for OSPF process ID one.
Notice I said process ID not autonomous system.
A process ID unlike an autonomous system
is locally significant.
That means the neighboring router
doesn't have to agree on the process ID.
The neighboring router could have
process ID 25 as an example.
They don't have to match.
These are locally significant.
Now I'm going to give a series of network statements.
And there's a lot of misunderstanding
about a network statement.
If I say, for example,
network 10 dot one dot one dot zero
and give a wildcard mask and give the area in the ID,
a lot of people look at that command and assume
I'm saying I want to advertise this network via OSPF.
That's actually not what we're doing.
The network statement says here is an IP address space.
And if I have an active interface on this router,
whose IP address falls underneath that IP address base,
then I want to advertise that interface's network.
Now typically when we set things up,
we give the network that's on an interface,
but we don't have to in fact,
when we get over to router R three, I'll show you that.
But typically, we give the command
network 10 dot one dot one dot zero,
and we give a wildcard mask
and not a subnet mask which is
Zero dot zero dot zero dot 255 forward slash 24 subnet mask.
Remember to calculate the wildcard mask,
we take all 255s on all four octets.
And we subtract the subnet mask on an octet by octet basis.
So we've got 255, 255, 255, 255.
And from that we're subtracting on an octet by octet basis,
we're subtracting the subnet mask,
which is 255 dot 255 dot 255 dot zero
and that gives us zero dot zero dot zero dot 255.
Just a bit of review from your CCNA studies.
And we want this interface or interfaces
that fall within this address space,
to participate in area zero, our backbone area.
Let's take care of our loopback interface.
We'll say network and we've got a loopback interface
with an IP address of one dot one dot one dot one.
And notice it's got a slash 32 subnet mask.
So it's a single host IP address,
and we'll say zero dot zero dot zero dot zero.
It's also going to be an area zero
and we've got one other interface,
gigabit zero slash two.
Let's make sure it's participating.
We'll make sure with the command a network
172 dot 16 dot one dot zero,
space zero dot zero dot zero dot three,
and we want it to be an area zero.
And we're done with our configuration on R one.
So let's end and go over to router R two,
we give a similar configuration that
one big difference so is R two has interfaces in both areas.
This is an ABR an Area Border Router.
We're going to have interface gigabit zero slash one
participating in area zero,
gigabit zero slash two and the loopback interface
there going to be in area one.
Let's get started once again by going
into Global Configuration Mode.
And I'll say router OSPF.
And I'll just say two to prove that
the process IDs don't have to match,
and I'll say network and for the gigabit
zero slash one interface,
I'll say 172 dot 16 dot one dot zero
with a wildcard mask off has
zero dot zero dot zero dot three,
it's an area zero.
And for the loopback interface, it's in area one,
I'll say network two dot two dot two dot two.
And it's a slash 32 subnet mask, so the wildcard mask
is going to be all zeros, and it's going to be an area one.
Oh, notice, by the way that we have
an adjacency that we formed with R one, excellent.
Let's include interface gigabit zero slash two
by saying network
192 dot 168 dot one dot zero
and a slash 30 subnet mask is 255 dot 255 dot 255 dot 252.
That means our wildcard mask is going to be
zero dot zero dot zero dot three.
And we saw that again on that link between R one and R two.
And it's going to be an area one.
We're done on R two and let's go to R three.
And on R three I want to make that point that
when we say network and we give an IP address space,
we're not necessarily specifying
that the network of an interface.
We're saying if an interface is active
and its IP address falls within the address space
that we're specifying with a network statement,
we want to advertise that interfaces network via OSPF.
So what if I did this,
since in this case with R three,
both interfaces are in the same area,
actually all three interfaces, including the loopback,
they're all in the same area.
What if I gave one network statement
that encompassed all possible IP addresses?
That would mean that all of these interfaces
would participate in OSPF and that's what I want.
So I'm going to say,
in router configuration mode for process ID one I'll say,
we'll say network and I'll include all possible IP addresses
by saying zero dot zero dot zero dot zero
with a wildcard mask of all 255s.
And I'll say they all belong to area one
in the interface with an IP address in that address space,
which is all possible address basis.
All right,
we just saw an interface come up or an adjacency come up.
Let's do some confirmation now.
I think everything is looking good,
but let's confirm that,
let's do a show IP route.
Can I indeed see all of the routes in the network?
Let's see if I can see everyone's loopback interface
dot one dot one dot one dot one,
two dot two dot two dot two,
three dot three dot three dot three.
All that looks good.
It looks like I've learned the
10 dot one dot one dot zero slash 24 network.
Notice the IA code next to the O,
the O means I learned this via OSPF.
The IA means that it's an inter area route.
I learned it from OSPF but it came from
a different OSPF area.
And I'm just surveying here the IP routing table on screen.
It looks like we know about everybody.
We know how to get to anywhere on the network.
Can I ping R one?
Can I ping its loopback interface
dot one dot one dot one dot one?
Yes, I can that was successful.
One of my favorite verification commands
is show IP protocols.
This is going to give me some insight into
my OSPF configuration or whatever my routing protocol is.
It says that we're running OSPF process, ID one.
My router ID is my loopback interface.
Remember we talked about the DR election.
And we said that we could specify a router ID
and the highest router ID would be elected as the DR
If the router priority is tied
and I didn't set the priority, so everybody's going to tie here
and you can see that I'm routing for all possible networks.
We gave that with our network statement.
Here's another command
and I'm going to give this one on R two
because we should have a couple of neighbors on R two.
I'm going to do a show IP OSPF
neighbor command
and you see that I have a neighborship with R one
and a neighborship with R three.
I can also see what routes are known to OSPF
with a show IP OSPF rib command,
the rib is for the route information base.
And some of these are known because
we're directly attached to them
but OSPF knows about them anyway.
And some we've learned via OSPF
and those that have been learned via OSPF
and installed in our IP routing table,
also known as the global rib Route Information Base,
those are indicated with a greater than sign.
And if we have more than one way,
the best path based on cost
is going to be indicated with an asterisk.
So we can see we've learned
one dot one dot one dot one of a router R one.
We learned that via OSPF
and that's been installed in the
IP routing table as an example.
We can dig in and get more information
about a specific OSPF interface
with a show IP OSPF interface command
followed by the interface identifier,
let's say gigabit zero slash one.
This is going to give us information such as timers,
such as the priority,
and here we see that we have a cost of one
going out of this interface because it's a gig interface.
And the reference bandwidth is 100 megabits per second.
And we're saying it's 100 divided by 1000 is point one,
but we've got around up to one.
Yeah, we should probably in the real world,
adjust the reference bandwidth to account for that.
But here's where we can see our timers.
Here's our dead timer.
And here's our Hello timer.
And don't be thrown by this, this might be a bit confusing.
It almost seems to contradict
what we were talking about earlier,
when we were discussing designated routers.
It says that the designated router has an ID
of one dot one dot one dot one.
That's R one.
Our router ID is higher than that,
our router ID is two dot two dot two dot two.
And everybody has a priority of one.
So how come we're the BDR on this link?
Well, it's not because of the election.
It's because R one just was configured first.
I didn't have OSPF configured on R two at all,
but we configured it on R one.
So we immediately elected itself as the DR
and we just haven't overthrown that at this point.
That's the reason that R one is the DR in this case.
And while we're here let's take a look
at this topology a little bit closer.
We know that if an interface is participating in OSPF,
we're advertising that interfaces
network via OSPF that's what we want to do.
But think about the gigabit zero slash one
on R one that goes out to switch SW one.
And think about interfaces gigabit zero slash two
on R three that goes out to SW two.
Those interfaces are connecting out to end stations.
They're not connecting out to other routers.
So the question is,
do we really need to send OSPF
Hello messages out of those interfaces?
I mean, somebody might use that
as a vulnerability security wise.
They might have a router that would form
a neighborship with us
because we're sending out Hello messages.
They could try to poison our IP routing table
if we didn't do any authentication,
which we probably should do.
But besides that, just for performance reasons,
why send out these Hello messages out to end stations,
there's no need to do that.
These will be great candidates to be
OSPF passive interfaces.
And by that I mean we're still going to be
advertising that interfaces network via OSPF.
But we're not going to be sending out
any OSPF Hello messages
and we're not going to respond to any
Hello messages that we might receive from someone.
So let's set just as one example,
let's go to R one and let's make interface
gigabit zero slash one a passive interface.
Let's go into router configuration mode for OSPF
I think was process ID one,
and we'll say passive hyphen interface
and give the interface identifier of gigabit zero slash one.
And if I do a show IP protocols command,
it should tell us that gigabit
zero slash one is now a passive interface.
We're still advertising that route via OSPF.
We're just not sending or receiving
Hello messages on that interface.
And that's a review of a basic
OSPF version two configuration.
Now in our next video,
let's take a look at how we can start
filtering what routes get advertised