- [Instructor] I'm going to demonstrate
configuring the following three routers
in a single area environment.
While simply enabling OSPF would be enough,
I'll demonstrate some best practices along the way.
Almost all interfaces shown in the diagram
have been configured and directly connected routers
can ping each other.
Starting with best practice number one,
when configuring OSPF,
I always assign a unique loopback address to each router.
A loopback is a logical interface that is always up,
which makes it good for router IDs.
I'll create router one's loopback
by simply typing config t, interface, loopback zero.
I'll now assign its IP address.
IP address 100.64.0.1,
255.255.255.255.
Notice that I made it a host address
by making the subnet mask all 255s
so it's a unique slash 32 address.
I'll now enable the OSPF routing process
on router one by typing router ospf 10.
The number 10 is simply a process ID.
It could be any number from one to 65,535
and can be different on each router.
Having said that, it's a best practice
to make the number the same on each router,
so I'll stick with 10.
While it's not required, I also go out of my way
to specify the OSPF router ID with router id
100.64.0.1,
which was the IP address I previously configured
on loopback zero.
Next, I'll tell OSPF which interfaces to run on
and what areas those interfaces should be in.
This is done with the network command.
This command uses a wildcard mask format
to choose which subnet should be matched for enabling OSPF.
In essence, I will supply the network command
with the subnet and any interfaces that fall
within that subnet will enable OSPF.
Also of note is that with the network command
when specifying an area it can be done as an integer
of zero to about four billion, or in dotted decimal format
like an IPv4 address.
Looking at the diagram once again,
I see that gig 0/1 is configured
for the 192.168.0.0 slash 24 subnet.
So I'll add the command
network 192.168.0.0
0.0.0.255 area 0.
Since routers one to three have the same subnet on gig 0/1,
I'll add the exact same commands to each.
Home router two, config space t,
router ospf 10,
network 192.168.0.0,
0.0.0.255 in area 0.
And now on router three, config space t,
router ospf 10,
network 192.168.0.0,
0.0.0.255 in area 0.
OSPF verification has a lot of commands,
so I'll only touch on a few of them.
The show ip ospf interface command
shows detailed information on interfaces with OSPF enabled.
If I'm looking for a more succinct version of the command,
I'll issue a show ip ospf interface brief.
A go-to command for me when verifying neighbor relationships
is the show ip ospf neighbor command.
It lists neighbor router IDs along with their state
and role on the segment,
the interface IP they're connected on,
and the physical interface name they were learned from.
Next will be show ip ospf database.
This displays the contents of the link-state database.
This will be all of the LSAs learned from other routers.
Once the LSAs are learned, they are placed
in their routers' routing information base,
or routing table.
These routes can be viewed by issuing a show ip route
and looking for any routes that have an O listed
to the left,
which indicates they were learned via OSPF.
Verification of configuration can easily be done
via show run pipe begin router ospf.
Sometimes, this isn't available,
say for example the lab only allows user mode access
and not enable mode.
In this instance, the show ip protocols command
can give a good portion of the configuration.
Also, the show ip ospf interface command
can help determine status of OSPF on interfaces.
The CCNA will expect every engineer to be able
to perform these basic configuration tasks,
so be sure to practice and then practice some more.