How to configure OSPF for CCNA students

(Rene Molenaar) #1

This topic is to discuss the following lesson:

(system) #2

Thank you very much Rene for your work. I appreciate much :wink:

(system) #3

Very good lesson! Thanks for all your work!

(system) #4

Very good lesson! Thanks for all your work!

(system) #5

Hi Rene,
When connecting 3 routers(a router triangle) to configure OSPF, will it make a difference if I created point-to-point serial connections as opposed to using the ethernet ports?

(Rene Molenaar) #6

Hi Mo,

There will be two differences:

- The cost will be higher (that’s no problem) because the link is slower.
- OSPF treats point-to-point links differently than multi-access links (Ethernet). One of the things is that it doesn’t elect a DR/BDR on point-to-point links.


(system) #7

Ooooh that is quite interesting. Good to know. Thank you.

(system) #8

Rene, I noticed 2 things when I tried configuring OSPF in my home lab today, using the same topology- except all my ports are FastEthernet. I just changed the speed to 10 to make it ethernet.

1- I added a loopback interface, and used “clear ip ospf process”, but the router still did not use my loopback addr as the RID. I had to completely remove the OSPF config(no router ospf 1) and redo it from scratch(“router ospf 1”,"network … … area 0) before it finally used the loopback as it’s RID. So does that mean I have to add the loopback interface before configuring OSPF(If I wanted the loopback addr to be my RID)??

2- After I enabled authentication on the whole area 0(“router ospf 1”…“area 0 authentication”), there is no option to add an authentication key/password. Can’t I add a key/password to the area 0 authentication?


(system) #9

Rene,Let me know that is it mandatory to use loopback address in all routing protocols?

(Rene Molenaar) #10

Hi Mo,

Strange, it should choose the RID when you clear it…might be IOS-version dependent.

Even if you enable authentication for the entire area, you still have to set the key on the interface. There is no “global” key or something.


(Rene Molenaar) #11

H Sham,

Loopbacks are useful in labs because you can use them as a quick method to advertise some networks.

They are also very useful for some protocols, IBGP (internal BGP) is one of them.


(system) #12

This is THE best website I’ve ever come across.

(Wisam A) #13

Thanks Rene, it’s very helpful.

(Maruti G) #14

Hi Rene,

I’m new to network domain and your explanation in lessons is great:) and helping me to improve my knowledge in networking. What do you mean loopback interface and how many loopback interface can i have on router or switch or host?


(Rene Molenaar) #15

Hi Maruti,

That’s good to hear. A loopback is a “virtual” interface that you can create on routers (or L3 switches). You can put an IP address on it and when you ping it, you’ll get a reply. These loopback interfaces are used by a number of protocols. The reason OSPF prefers it is because a loopback can never go down unless you put a “shutdown” command on it or the router crashes.

If you have a router, try to create a loopback interface and put an IP address on it, that’s a good exercise :slight_smile:


(Maruti G) #16

Thanks Rene!

(Gabriel S) #17


Thanks for this great article!!!

I have a doubt… When you advertised network, the others routers receive a network…
Why do they receive a /32? Shouldn’t they get a when I use “redistribute connected subnets” I get network but this network is like an E2 type.

Have something that I didn’t understand yet?


(Rene Molenaar) #18

Hi Gabriel,

Good question, it’s an OSPF thing…

OSPF uses different “network types” (this is a CCNP ROUTE topic) and by default it will always advertise a loopback interface as a /32 no matter what subnet mask you configured on it. You can change the network type, here’s something to try:

interface loopback0
ip ospf network broadcast

By changing the OSPF network type into anything else, you’ll see that it will now advertise the correct subnet mask.


(Gabriel S) #19


Thanks for your attention :slight_smile:
I tried “ip ospf network broadcast” in interface loopback, but I get the “OSPF: Invalid type for interface”.
But I get to advertise correct when put in point-to-point, for now it’s OK for me :stuck_out_tongue:

Let me enjoy this moment and ask you about this other subject :smiley: I searched here but I didn’t find any article
talk about BVI. Please, when you have a free time and you can write something I’ll enjoy it…


(Rene Molenaar) #20

Hi Gabriel,

That will work, didn’t realize it wouldn’t accept broadcast on the loopback. If you want to learn about all the OSPF network types, you can find them here:

I’ll add an example for BVI, will let you know when it’s finished.