OSPF is a link-state routing protocol and it’s one of the routing protocols you need to understand if you want to do the Cisco CCNA, CCNP or CCIE R&S exam(s). In this lesson I’ll explain the basics of OSPF to you and you will learn how and why it works.
I don’t know about you but I love my navigation system. The good thing about them is you can just drive and there is no need to look for traffic signs, the bad thing is that I’m absolutely lost when it’s not working. I’m bad at reading maps (or maybe I just don’t like it) and if I had to find my way to some street in any big city I’m doomed.
Link-state routing protocols are like your navigation system, they have a complete map of the network. If you have a full map of the network you can just calculate the shortest path to all the different destinations out there. This is cool because if you know about all the different paths it’s impossible to get a loop since you know everything! The downside is that this is more CPU intensive than a distance vector routing protocol. It’s just like your navigation system…if you calculate a route from New York to Los Angeles it’s going to take a bit longer than when you calculate a route from one street to another street in the same city.
Let’s take a good look at link-state to see what it exactly means:
- Link: That’s the interface of our router.
- State: Description of the interface and how it’s connected to neighbor routers.
Link-state routing protocols operate by sending link-state advertisements (LSA) to all other link-state routers.
All the routers need to have these link-state advertisements so they can build their link-state database or LSDB. Basically all the link-state advertisements are a piece of the puzzle which builds the LSDB.
If you have a lot of OSPF routers it might not be very efficient that each OSPF router floods its LSAs to all other OSPF routers. Let me show you an example:
Above we have a network with 8 OSPF routers connected on a switch. Each of those routers is going to become OSPF neighbors with all of the other routers…sending hello packets, flooding LSAs and building the LSDB. This is what will happen:
We will get a full-mesh of OSPF neighbors. Each router will flood LSAs to all other routers so we will have a lot of OSPF traffic. Is there any way to make this a bit more efficient?
Hi Rene,
I have several questions :-
1 - Can we have ABR between sub areas or the ABR must be only between backbone area and sub areas ?
... Continue reading in our forum2 - Can we have the ASBR in sub areas or the ASBR must be only in the backbone area ?
3 - What is the different between saves address space and used address space that you mentioned in the advertisement of loopback interface addresses ? I did not understand that and I have some ambiguity at this point ? can you explain it to me in detail please ?
4 - what is the benefit of sharing information with OSPF hello packets like Rout
Thank you so much for your answer and patience.
I already did what you told me for static routes and I will do the same to redistribute BGP prefix list to OSPF.
If I already have BGP filters (prefix-list) can I use the same prefix-lilst to create a route-map to filter the networks announce by BGP to OSPF?
example
... Continue reading in our forumGreat Web Lesson Rene!
Word of advice buy Rene book on CCNP Route. Study the chapters such as I read all of the OSPF chapters through twice. Then I come to the web pages which I buy a year subscription to at a time as its a little cost savings.
On the web pages especially one like this where Rene has video its great to watch those as added reinforcement.
For example, First video Rene is talking about all the areas and how OSPF works. he shows you a ABR and ASBR. When he is doing this if you have studied the book first you are seeing LSA type 3 summary ne
... Continue reading in our forumHello Rene,
I did a packet capture and was studying Hello packet in ospf.
My setup here is like this R1------------------------------R2
192.1681.1.1 192.168.1.2
I enabled OSPF on R2 first so it started sending Hello packet, then next I configured OSPF on R1 so now R1 also started sending hello packet. Now as soon as R2 got the hello from R1 then it did an ARP saying who is 192.168.1.1 tell 192.168.1.2. So why this ARP happens at first place and I see this ARP happening on R2 only not on R1, my second question.
I am also attaching the packet capture.hello.pcapng (13.0 KB)
Hello Ravi
This is an excellent question, it shows that you are thinking analytically and very deeply about these issues.
When a router sends an OSPF hello packet, it sends it to the 224.0.0.5 multicast address. When R2 receives this packet, one of the pieces of information it receives in the OSPF header is the IP address of the router that sent it.
Now the next step to establishing a neighbour adjacency is for R2 to respond with a unicast packet sending its router ID and its neighbour list. However, in order to do this, it must encapsulate the response, whic
... Continue reading in our forum