OSPF Screencast Transcript

Print

Welcome. In this screencast, I’m going to show you how to configure OSPF for IP version 4. We have two routers—R1 and R2—similar to ______ we used for the static routing. The IP addresses have been preconfigured, and I’m gonna quickly demonstrate that the interface—show IP interface brief—the interface is up and the line protocol’s up. Again, we don’t just want to see one is up; we need to see, also, the line protocol, which means the router’s actually able to communicate with remote device connected to it.

Now, I configured Telnet on both routers so I don’t have to switch console. So I’m R1. I type the IP, 192.168.254.2, the IP address of R2, and I entered. I’m able to—cisco’s the password—I’m able to Telnet into R2, and now that I’m in it, I also verified that R2’s interfaces, up, line protocol, up, and IPs configured. The next command I type is “sh ip route.” To evoke OSPF, I type—as you can see, the router here in R2 only has two directly connected networks—the two Cs and nothing really—nothing else. The Ls really stand for the IP address on each network on that interface, so it’s really the IP address itself. It’s not really a network that that router knows about. So the two Cs are the only network this router knows about. To evoke OSPF, I type “router ospf.”

So if you do question mark, it requests a process ID. That number is locally significant. What it means here is that if you type a number on one router and a different number on another router, OSPF still works. OSPF has to use the same area ID. What’s happening is, best practice, we usually don’t try to use different process IDs; however, I’m gonna demonstrate in this lab that if I use process ID 2 on Router 2 and process ID 1 on Router 1, OSPF will still work. So it’s the best way to practice and show that it actually does work. It’s not the process ID; it’s the area ID that must match.

Now I enter. The next thing OSPF wants to know is the network. As you could see, I did the show IP route first so I can see my network. The first network I have here is 192.168.2.0, so 192.168.2.0. If I do question mark, OSPF said, “It needs a wild card bit.” This is the inverse mask, or the opposite of the mask. So the mask was 255.255.255.0; now it’s gonna be—every time I see 255, I put a 0. Every time I see 255, or when I saw the 0, I put 255.

And then OSPF said, “What is the area that you connected to?” In this case, it’s our first area, so it’s gonna be area 0. I misspelled “area.” It’s gonna be area 0. Area 0 is our first area, and then I need to type the command again for the next network, which is 254. 192.168.254.0. Again, the mask is the same to make it simple. Area 0. And by the way, we could use a Tab key. I could have put “a” and Tab for the word area instead of typing the whole thing. So again, we finished configuring OSPF on this side.

Now, if I do “sh ip ospf neigh,” I don’t have a neighbor. Why don’t I have a neighbor? Well, my remote router has not configured OSPF yet, so it’s not gonna work. Now I need to exit and go back to Router 1 and configure Router 1 itself. Before I configure Router 1, I type “sh IP rout” so I can see the commands—I mean, the networks in front of me. Then I type “router ospf.” Remember, this time, the process ID, I’m gonna make it 1 on purpose, and network, 192.168.1.0 is my LAN network, 0.0.0.255. Now, I’m gonna put the word a and I’m gonna press the Tab key on the my key—see, now, my keyboard, it actually completes the word area for me. It’s area 0. I actually can use the arrows—you see the four arrows next to your keyboard, I use the up arrow to repeat the command for me. Then I use the arrows to go all the way back instead of typing everything from scratch. I change this to 254. Enter. I finish this also.

Voila. OSPF said, “Ah ha, I discover your neighbor and we exchanged database information,” and we have what we call full convergence, and that’s where the FULL comes in here. So if I do “sh ip ospf neigh,” okay, it says that I have a neighbor called 254.2. We fully—the neighbor is what we call a “designated router,” DR, okay, designated router. So that’s what I discovered right now, and if I type “sh ip ospf protocols”—I’m sorry, no, “sh ip protoco,” sorry, show IP protocols, it says I’m running a routing protocol called OSPF. My process ID is 1. And it says the area is area 0, and then if I go space bar, I go all the way at the bottom. The word gateway means “Who is my neighbor router that I’m talking to,” and so it shows you a lot of information and it says what network here. You see the networks? 192.168.1 and the 254, I’m advertising those two networks. And then it says, by default, the administrative distance for OSPF is 110.

So if I do show IP route on this router here, “sh IP rout,” that’s R1, it shows me an O. Okay, it will show me an O on show IP route, which is R1. My console just vanished. Show IP route, and I get my O here. Now, what can I do with this? I can actually tell it to—Router 2, which is 192.168.254.2, that’s Router 2’s ___ interface, cisco, I got it, and then I type “sh ip rout.” I also notice an O, so at this point, I can quickly check the database in OSPF, show IP OSPF database. Notice I have two types of what they call LSAs for—we have one and two, so because I’m using the LAN part, you see the LSAs here for the network and router LSA. So the router LSA’s really the router ID itself advertising itself, which is why those link ID and advertising routers are the same, and over here, I have the LSA and R2 is really referring to the LSA type 2 because we have a point—a Ethernet connection between the two, and we have to have DRs and BDRs. So IP OSPF neighbor.

Notice that my remote network—my remote router is my—it’s a backup-designated router. I am the designated router. So here, this router’s saying that, “He’s the designated router for the link on this side between the two of them.” So that’s what this show IP OSPF database is telling them. We have two types of LSAs: type 1 and type 2. Type 1 is the one over here, the first one, and then type 2 is the bottom one, here, okay? So if I do a quick ping to test, 192, I’m gonna ping 168.1.1. I’m on R2; I’m pinging R1, and I’m using my source, question mark, and my source, I would like to use E0/1. Here we go. So I can ping from R2—from E0/1 all the way to E0/1 on R1, and that actually concludes our OSPF configuration.

Once you verify your show IP interface brief—which is Level 0, first, that the interface is up, line protocol up—once you’re able to ping point-to-point, your next step is to configure OSPF, which is show run. I’m checking only section is router, show run—oh, I typed “run” wrong—section. The section we want is the router section. Again, this is the piece that shows you the configuration. Router OSPF network, network. The two-network statement says which network you’re advertising, and they’re both in area 0, and they all have inverse mask, and now we can type “show ip protocol” to see what’s happening. It give us a lot of information about the routing protocol, the networks that are being exchanged, which routing protocol is being used, and who’s your neighbor router exchanging information with you, the last time an update was sent, the distance information is also included here, and there’s a lot more information in this, including how many paths you can use in OSPF in general, if they’re all the same. Look in ____ carefully when I type “show IP route.” One of the things you need to pay attention to is this funny bracket. The 110 is saying that’s the administrative distance, and then the 20 is really the metric. To get to this network, the metric is 20, okay? And that’s very important, and the reason for that is the fact that we’re using an Ethernet on both sides, okay? Ethernet-to-Ethernet and 10 plus 10 give you the 20 portion. That’s where it comes from: Ethernet-Ethernet, which is 10 for each link, and it gives you total of 20, all right?

That was all for this basic OSPF. Remember, your process IDs don’t have to match, and it’s the area ID and OSPF that must match. In this case, because we have Ethernet in between, the routers elect a designated router and backup designated router; therefore, we have link state LSA type 1 and LSA type 2. I hope you have fun configuring OSPF and other fun routing protocols. It was great having you. Bye bye. Keep practicing.

[End of Audio]