Configuring OSPF (2)
Synchronized Transcript
105 cues indexed • Click dialogue or words to jumpWelcome to Jeremy’s IT Lab. This is a free, complete course for the CCNA. If you like these videos, please subscribe to follow along with the series.
Also, please like and leave a comment, and share the video to help spread this free series of videos. Thanks for your help. Also, remember to sign up via the link in the description to get all of the lab files for this course, so you can try it out yourself in packet tracer.
If you want more labs like these, I highly recommend picking up Boson’s NetSim for the CCNA, click the link in the video description to check it out. It’s a network simulator like packet tracer, but it’s even better, and it includes all of these guided labs to not only help you get hands-on practice configuring and troubleshooting,
but also deepen your understanding of the exam topics. I used it myself when studying for my certifications, so I feel confident about recommending it to all of you.
If you want to get your own copy of NetSim, please follow the link in the video description. In this lab we will configure OSPF in the same network as last time, using the new configurations we learned in the lecture video.
For the purpose of this video I have already completed steps 1 and 2, which involves configuring host names and IP addresses. It’s good to get some repetitive practice with the basics, but to keep the length of this video a little shorter I won’t show these steps in the video.
So, let’s get right into step 3. We are told to enable OSPF directly on each interface of the routers. That means we won’t be using the NETWORK command to enable OSPF on interfaces with an IP address that falls in the specified range.
Instead we will specify exactly which interfaces to enable OSPF on, directly on the interfaces. I’ll start on R1.
ENABLE CONF T. I’ll use the INTERFACE RANGE command to configure the interfaces all at once. Note that there is no need to enable OSPF on G3/0, the other routers don’t need to know about the 203.0.113.0/30 network,
as I explained in the Day 26 lab video. So, INTERFACE RANGE G0/0, F1/0, L0.
Notice how I enter the INTERFACE RANGE command. If configuring a range like G0/0, G0/1, G0/2, G0/3, for example, you can use the command INTERFACE RANGE G0/0 – 3, with a hyphen.
However, in cases like this with three different types of interface, FastEthernet, Gigabit Ethernet, and Loopback, you can use a comma in between each to configure them all at once.
Now let’s enable OSPF. IP OSPF 1, that’s the process-ID, AREA 0. And that’s it. Let’s confirm.
DO SHOW IP PROTOCOLS. So, in the lecture video I showed you that the ‘Routing for Networks’ section is empty and instead the interfaces are displayed under ‘Routing on Interfaces Configured Explicitly’.
However, that doesn’t display in Packet Tracer. As I’ve said before, Packet Tracer is a great, free tool for the CCNA, but it’s not perfect.
This is just a small thing, but I just wanted to point it out. Now let’s configure Loopback0 as a passive interface. To do so, we have to go into OSPF configuration mode.
ROUTER OSPF 1. I showed you the PASSIVE-INTERFACE DEFAULT command in the lecture, but we’re just configuring a single interface so I’ll use the regular method.
PASSIVE-INTERFACE L0. Okay, now I’ll just run through the configurations on the other routers. R2 next.
ENABLE. CONF T. INTERFACE RANGE G0/0, F1/0, L0.
IP OSPF 1 AREA 0. Then configure the passive interface. ROUTER OSPF 1. PASSIVE-INTERFACE L0.
Next up, R3. ENABLE. CONF T. INTERFACE RANGE F1/0, F2/0, L0.
IP OSPF 1 AREA 0. ROUTER OSPF 1. PASSIVE-INTERFACE L0.
Finally, R4. ENABLE. CONF T. INTERFACE RANGE G0/0, F1/0, F2/0, L0.
IP OSPF 1 AREA 0. Here on R4 I’ll try out the PASSIVE-INTERFACE DEFAULT command, and then remove it from F1/0 and F2/0.
ROUTER OSPF 1. PASSIVE-INTERFACE DEFAULT. Notice the message saying the neighbor has changed to the DOWN state.
OSPF can’t make any OSPF neighbors via a passive interface, so the neighbor goes down immediately. Okay, let’s enable OSPF again on F1/0 and F2/0.
NO PASSIVE-INTERFACE F1/0. NO PASSIVE-INTERFACE F2/0. Let’s see if only G0/0 and L0 are passive interfaces.
DO SHOW IP PROTOCOLS. Indeed they are. If the router had any other network interfaces, they would appear here as well, however this router only has G0/0, F1/0, F2/0, and the loopback interface I created.
Now let’s check R4’s OSPF neighbors. DO SHOW IP OSPF NEIGHBOR. Looks good, R4 is neighbors with R2 and R3.
Notice the dead time. If I keep repeating this command over and over again, you should be able to see that the dead time counts down to 30 and then resets, because a Hello message is received every 10 seconds.
Okay, that’s all for step 3, let’s do step 4. Configure the reference bandwidth on each router so a fastethernet interface has a cost of 100.
I hope you can complete this step, this sounds like something that could appear on the exam. Let’s check out the command. AUTO-COST REFERENCE-BANDWIDTH, and let’s use the question mark.
So, remember that this command is entered in megabits per second. So, how can we make it so a fastethernet interface has a cost of 100?
Well, a fastethernet interface has a bandwidth of 100 megabits per second by default. The formula for OSPF cost is reference bandwidth divided by interface bandwidth equals cost.
So, what divided by 100 equals 100? The answer is 10,000. So, enter 10,000 as the reference bandwidth, and let’s check.
DO SHOW IP OSPF INTERFACE. In the lecture I showed you the SHOW IP OSPF INTERFACE BRIEF command, but it’s not available in Packet Tracer.
So, here’s FastEthernet1/0, and notice the cost of 100. If a fastethernet interface has a cost of 100, then what will the cost of G0/0 be?
Scroll up, and here it is, 10. So, a 10-gig interface, or anything faster than that, will have a cost of 1. Okay, let’s configure that on the other routers.
Remember that it’s always a good idea to configure the same reference bandwidth on each router. R3 next. AUTO-COST REFERENCE-BANDWIDTH 10000.
Then R2. AUTO-COST REFERENCE-BANDWIDTH 10000. Finally, R1. AUTO-COST REFERENCE-BANDWIDTH 10000.
Next up we’ll configure a default route on R1 and advertise it to the other OSPF routers. Since I’m in OSPF config mode, let’s configure R1 to advertise it first, even though it doesn’t have a default route yet.
DEFAULT-INFORMATION ORIGINATE. Now let’s configure the route. EXIT. IP ROUTE 0.0.0.0 0.0.0.0, and then the Internet Service Provider Router’s IP address will be the next hop, 203.0.113.2.
Now I’m going to go on R4 to check which default route or routes it added. In the day 26 lab video it added routes via both R2 and R3, even though the route via R2 has a faster gigabit ethernet connection, so it is the better route.
Now that we have changed the OSPF reference bandwidth, fastethernet and gigabit ethernet interfaces have a different cost. So, what default route or routes will be added by R4, and what will their cost be?
Let’s check. DO SHOW IP ROUTE. So, what I’m going to explain now is a more advanced OSPF topic. You don’t need to remember it for the CCNA.
But I want to give a brief explanation in case some of you notice this and think OSPF is behaving strangely. First off, notice that R4 added the route via R2 to the route table.
You might think that’s correct, because we changed the reference bandwidth so that fastethernet and gigabit ethernet interfaces have a different cost. That means the route via R2 is preferred over R3.
However, this is actually another error in Packet Tracer. BOTH routes, via R2 and via R3, should be added. Why is that?
Well, look at the cost of this route via R2. The cost is 1. With the reference bandwidth we just configured, the cost to reach R2 should be 100, plus 10 for R2 to reach R1, so 110 just to get to R1.
Why is the cost of this default route 1? The answer is here, this ‘E2’ beside the route. If you look up at the top here for the meaning of E2, it says ‘OSPF external type 2’.
As I said, this is a CCNP-level topic, so you don’t need to learn it right now. But basically the ‘external type 2’ means that the ‘internal’ OSPF metric to reach R1 is ignored.
So, actually the cost via both R2 and R3 will be the same, 1. To prove that, I’ll shut down R4’s F1/0 interface so the OSPF adjacency with R2 goes down INTERFACE F1/0.
SHUTDOWN. We get a message saying the neighbor has gone from FULL to DOWN. I’ll click this button to skip forward 30 seconds to make sure R4 has updated the routing table.
And let’s check. DO SHOW IP ROUTE. See, now the route via R3, 10.0.34.1, is added, and it also has a cost of 1.
So, for some reason Packet Tracer does not insert both routes at the same time. Perhaps Packet Tracer’s logic is considering the internal OSPF metric to reach R1 even though it shouldn’t, but if you try this in GNS3 or on real equipment you’ll see that both routes are added to the
routing table. Anyway, like I said this is a CCNP topic, don’t worry about learning it yet. I won’t cover this topic in my CCNA course so if you do want to learn more, try a Google search for ‘OSPF external metric’.
Finally, let’s go into simulation mode and take a look at an OSPF Hello message.
Let’s check out this one. Look at the Layer 3 destination, 224.0.0.5. Do you remember that IP address?
That’s the multicast address used to reach all OSPF routers on the link, and it’s the IP address that routers send OSPF hello messages to.
Now, if you click on the ‘PDU Details’ up here, you can see the different fields in the frame. There’s the Ethernet frame, the IP packet, and inside is the OSPF Hello message.
I won’t go into any details, but let’s look at some of the fields of the OSPF Hello message. First notice that the version number is 2.
As I said before, this is the version that is usually used for IPv4. Next to that, Type 1. What’s that? Well, it means this is a ‘Type 1’ OSPF message, a Hello message.
Remember, Hello is type 1, DBD is Type 2, etc. Under you can see the Router ID, and notice the Area ID is written as 0.0.0.0.
Well, OSPF Areas are a 32-bit number, like an IPv4 address, and can be written in dotted decimal like this. So, Area 0 can be written as 0.0.0.0.
Going down a bit, you can see the network mask, the default Hello and Dead timers of 10 and 40 seconds, DR and BDR addresses, and the neighbor’s address.
Okay, just wanted to point out a few fields. Actually, one more field. Look here at the ‘pro’, protocol field of the IP header.
0x59, what does that mean? Didn’t I say that OSPF messages have a protocol number of 89? Well, 0x59 means hexadecimal 5 9, which is actually equal to 89 in decimal, indicating an OSPF message is encapsulated in the IP header.
Okay, so in this lab we configured OSPF in a different way than the last lab, changed the reference bandwidth, advertised a default route, and took a brief look at some fields of the OSPF Hello message.
That’s all for this lab. Now let’s take a look at a lab in Boson NetSim for CCNA. Okay, for today's Boson NetSim lab preview I have selected OSPF 2.
So you can pause the video if you want to read the objective and get an idea of the scenario. But basically there is a new router that has been added to the network, 'Key West', and we have to configure OSPF here, and also troubleshoot OSPF elsewhere in the network.
These are the commands you need to know, you already know all of these commands, so that shouldn't be a problem. And the IP addresses on each device.
Okay, now let's look at the lab tasks. There are three main tasks. Task 1, examine the initial network configuration.
Task 2, examine the remainder of the topology. And task 3, verify network connectivity. So, for today's lab preview let's just do task 1.
So once again, you can pause the video here if you want to read about the scenario, but I'll get right into step A, part 1.
Log on to the Key West router. Okay, so I'll click on the Key West router here, console. Now I'm in the CLI. Notice it says right here, all passwords have been set to cisco.
So first we have to log in to the device, cisco. And then enable, and once again enter the enable password, cisco.
Okay, what command should you issue to display the routing table on Key West? That's easy, SHOW IP ROUTE. Examine the output of this command.
What conclusion can you draw regarding the operation of the OSPF routing protocol on Key West? Okay, so if OSPF is running, it doesn't seem to be configured correctly because it isn't receiving any OSPF routes from neighbors.
Okay, part B, examine the configuration. What command should you issue to display the currently executing configuration on Key West?
So, the currently executing configuration, that is the running config. So the command is SHOW RUNNING-CONFIG.
So let's check for any OSPF configuration, here it is. Router OSPF 1. There is the router ID, and one NETWORK command.
Okay, step 2. Review the information you have gathered so far. Is the OSPF routing protocol running on Key West? How did you determine this? Well, yes it is running.
As you can see here, there is some OSPF configuration, and if I do SHOW IP PROTOCOLS, yes you can see OSPF is indeed running.
Okay, step 3. If OSPF is running on Key West, what would prevent OSPF from detecting the other networks in the topology? Okay, so I did notice something that could be a problem, this NETWORK command.
0.0.0.0, that's /32 so it matches only 200.120.45.0. Only that one single address, which I believe is not on any of Key West's interfaces.
Let's see, SHOW IP INTERFACE BRIEF. And indeed it isn't. So this network command does not activate OSPF on any of the interfaces.
Okay step 4, in order for OSPF to send and receive updates from its neighbors the appropriate router interfaces must be configured for OSPF.
Examine the configuration and determine whether this has been done. What command is missing or configured incorrectly? Okay, so I just answered that. The NETWORK command is configured incorrectly.
Okay, step C, or part C, step 1. Examine the information that you have gathered so far. Briefly explain the main problem and how you plan to correct the configuration error you have found.
Okay, so I just explained that, the incorrect wildcard mask here. So, in order to enable OSPF on these interfaces let's configure the network command with a /24 mask, so NETWORK 200.120.45.0 and then a /24 mask, that's
nice and simple. CONF T. ROUTER OSPF 1. First I will remove the incorrect command, DO SHOW RUN, PIPE (|), and then here's a convenient way to filter the output, SECTION OSPF.
So now I only see the OSPF configurations in the running config. NO NETWORK 200.120.45.0, AREA 0.
Okay, now let's configure a new network command. NETWORK 200.120.45.0 and a /24 wildcard mask is 0.0.0.255 AREA 0.
Okay, so I corrected the configuration error. Then part D is 'verify OSPF behavior'. After you correct the configuration error you have discovered, reexamine the routing table on Key West.
What change do you observe? So, I'll get out of OSPF config mode with END. SHOW IP ROUTE.
Okay, I do not notice any changes. Oh, looks like a neighbor just came up, let's see.
Okay, no routes yet. I'll just check a few more times. Sometimes it can take a little time for the routes to enter the routing table. There they are. Okay, looks like the Key West router has formed an OSPF adjacency with, which router was it?
With the Miami router. Let's see. SHOW IP OSPF NEIGHBOR. Indeed, .246, here it is, .246 Miami.
Okay, so it formed the OSPF neighbor relationship, the OSPF adjacency, and now it is receiving OSPF routes from the Miami router. Okay, so if you want to try the other steps in this lab make sure to get a copy of Boson NetSim for yourself.
I highly recommend it. If you want to get a copy, follow the link in the video description. Before finishing today’s video I want to thank my JCNP-level channel members.
Recently I’ve noticed an increase in the number of channel members, and I’m so thankful to all of you, both JCNA and JCNP-level members. Previously I read out the names of all the JCNP-level members one by one, but the list is getting longer so I’ll just leave the list up here.
Your support helps me keep making and releasing these videos every week, I’m really grateful for your support. This is the list of JCNP-level members at the time of recording by the way, August 15th 2020, if you signed up recently and your name isn’t on here don’t worry, you’ll be in future
videos. Thank you for watching. Please subscribe to the channel, like the video, leave a comment, and share the video with anyone else studying for the CCNA.
If you want to leave a tip, check the links in the description. I'm also a Brave verified publisher and accept BAT, or Basic Attention Token, tips via the Brave browser.
That's all for now.