How to configure OSPF for CCNA students

This topic is to discuss the following lesson:

1 Like

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

Very good lesson! Thanks for all your work!

Very good lesson! Thanks for all your work!

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?
Thanks
Mo

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.

Rene

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

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?

Thanks.
Mo.

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

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

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.

Rene

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

Thanks Rene, it’s very helpful.

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?

Thanks,
Maruti.

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:

Rene

Thanks Rene!

Rene,

Thanks for this great article!!!

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

Have something that I didn’t understand yet?

Hug

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.

Rene

Rene,

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…

Hug

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:

https://networklessons.com/ospf-lessons/

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

Rene