Home > OSPF Tutorial

OSPF Tutorial

December 3rd, 2010 Go to comments

In this article we will learn about the OSPF Routing Protocol

Open-Shortest-Path-First (OSPF) is the most widely used interior gateway protocol routing protocol on the world because it is a public (non-proprietary) routing protocol while its biggest rival, EIGRP, is a Cisco proprietary protocol so other vendors can’t use it (edit: EIGRP has become a public routing protocol since 2013). OSPF is a complex link-state routing protocol. Link-state routing protocols generate routing updates only when a change occurs in the network topology. When a link changes state, the device that detected the change creates a link-state advertisement (LSA) concerning that link and sends to all neighboring devices using a special multicast address. Each routing device takes a copy of the LSA, updates its link-state database (LSDB), and forwards the LSA to all neighboring devices.


+ OSPF routers use LSA (Link State Advertisement)to describe its link state. LSDB stores all LSAs.

+ A router uses Router LSA to describe its interface IP addresses.

+ After OSPF is started on a router, it creates LSDB that contains one entry: this router’s Router LSA.

There are five types of OSPF Link-State Packets (LSPs).


+ Hello: are used to establish and maintain adjacency with other OSPF routers. They are also used to elect the Designated Router (DR) and Backup Designated Router (BDR) on multiaccess networks (like Ethernet or Frame Relay).

+ Database Description (DBD or DD): contains an abbreviated list of the sending router’s link-state database and is used by receiving routers to check against the local link-state database

+ Link-State Request (LSR): used by receiving routers to request more information about any entry in the DBD

+ Link-State Update (LSU): used to reply to LSRs as well as to announce new information. LSUs contain seven different types of Link-State Advertisements (LSAs)

+ Link-State Acknowledgement (LSAck): sent to confirm receipt of an LSU message


Key points

+ Is a public (non-proprietary) routing protocol.

+ Is the only link-state routing protocol you learn in CCNA

+ This works by using the Dijkstra algorithm

+ Information about its neighbors (local connectivity) is sent to the entire network using multicasting

+ Routing information is shared through Link-state updates (LSAs)

+ HELLO messages are used to maintain adjacent neighbors. By default, OSPF routers send Hello packets every 10 seconds on multiaccess and point-to-point segments and every 30 seconds on non-broadcast multiaccess (NBMA) segments (like Frame Relay, X.25, ATM).

+ Is a classless routing protocol because it does not assume the default subnet masks are used. It sends the subnet mask in the routing update.

+ Supports VLSM and route summarization

+ Uses COST as a metric which CISCO defines as the inverse of the bandwidth

+ Uses AREAs to subdivide large networks, providing a hierarchical structure and limit the multicast LSAs within routers of the same area — Area 0 is called backbone area and all other areas connect directly to it. All OSPF networks must have a backbone area

+ Only support IP but it’s not bad as we are all using IP, right? :)

Area Border Routers (ABR) are any routers that have one interface in one area and another interface in another area

Let’s see an example of OSPF

Suppose OSPF has just been enabled on R1 & R2. Both R1 and R2 are very eager to discover if they have any neighbors nearby but before sending Hello messages they must first choose an OSPF router identifier (router-id) to tell their neighbors who they are. The Router ID (RID) is an IP address used to identify the router and is chosen using the following sequence:

+ The highest IP address assigned to a loopback (logical) interface.

+ If a loopback interface is not defined, the highest IP address of all active router’s physical interfaces will be chosen.

+ The router ID can be manually assigned

In this example, suppose R1 has 2 loopback interfaces & 2 physical interfaces:

+ Loopback 0:

+ Loopback 1:

+ Fa0/0:

+ Fa0/1:

As said above, the loopback interfaces are preferred to physical interfaces (because they are never down) so the highest IP address of the loopback interfaces is chosen as the router-id -> Loopback 1 IP address is chosen as the router-id.


Suppose R1 doesn’t have any loopback interfaces but it has 2 physical interfaces:

+ Fa0/0: but it is shut down

+ Fa0/1: (is active)

Although Fa0/0 has higher IP address but it is shutdown so R1 will choose Fa0/1 as its router-id.


Now both the routers have the router-id so they will send Hello packets on all OSPF-enabled interfaces to determine if there are any neighbors on those links. The information in the OSPF Hello includes the OSPF Router ID of the router sending the Hello packet.

Comments (50) Comments
Comment pages
1 3 4 5 374
  1. Anonymous
    June 1st, 2016

    where cn you see the questions to answer?

  2. Anonymous
    June 1st, 2016

    where can you see the questions to answer?

  3. 9tut
    June 1st, 2016

    @Anonymous: You can download the questions at http://juquitiba.sp.gov.br/?exams=ccna-questions-and-answers

  4. Buy Backlinks
    June 5th, 2016

    You need backlinks? Just like this website has, buy http://www.fiverr.com/seorankbuilder
    Buy Backlinks http://www.shieldselfstorage.ca/

  5. Anonymous
    June 6th, 2016

    Quick and important note

  6. Anonymous
    June 11th, 2016

    please send me updated CCNA dumps sunystar36 at gmail dot com

  7. Usman
    June 13th, 2016

    hi there

    plz send me the updated CCNA dumps at usmann.alii at yahoo dot com

    Thanks in advance

  8. tom
    July 3rd, 2016


  9. Anonymous
    July 5th, 2016


    pls send me the updated CCNA dumps at sultansyedibrahim at hotmail dot com


  10. abc
    July 8th, 2016


    if anybody has latest canna dumps, please send me at sharma dot meenakshi221gmail dot com

  11. Om
    July 11th, 2016


  12. Om
    July 11th, 2016

    Please share the link for the ICND1 Q&A

  13. Om
    July 11th, 2016

    {email not allowed}

  14. Anonymous
    July 18th, 2016


  15. Patick
    August 3rd, 2016

    I did my exam today and got 980 thanks to 9tut all sims and multiple are still valid I would highly recommend you to do 9tut test

  16. Anonymous
    August 14th, 2016


    Could you please send me updated dumps for CCNA 200-120. at shekar.professional6 at gmail.com

    Thanks in advance.

  17. Anonymous
    August 30th, 2016

    Online Courses :
    Do whatsapp :

    +966 592832164

  18. KYH
    September 7th, 2016

    Could you please send some goods OSPF tutorials to my email “{email not allowed}”
    and Old Questions of CCNA 200-125.

  19. bossnova
    November 20th, 2016

    Has EIGRP become a public protocol? As far I know, it is still a cisco proprietory.

  20. pradeesh
    December 3rd, 2016

    Currently eigrp not only cisco pro protocol

  21. amir
    December 18th, 2016

    plz any one can share CCNA Security latest DUMS
    {email not allowed}
    thanks in advance

  22. Anonymous
    January 19th, 2017

    this thank you verry much for help

  23. Anonymous
    January 29th, 2017

    very good

  24. J
    February 20th, 2017

    Which information contains in Database Description Packet??
    It would be just Router ID or anything else ??

  25. Lennin
    March 2nd, 2017

    What really is the use of loopback interfaces if we’ve got Fa0/0: and

    Fa0/1: active ?

  26. J
    March 31st, 2017

    @Lennin: Main reason to use loop back address is, it will never go down, so we can use it as Loopback address.
    If OSPF sets a highest interface address as a Router ID, and that interface goes down, it will create a problem with the OSPF neighbor relationship.

  27. a
    April 24th, 2017

    Hello (:

  28. Saimz
    June 1st, 2017

    Hi All,

    please share the relevant latest CCNA dumps or link

    Thanks & Best Regards,

  29. Anonymous
    July 20th, 2017

    Hi, Thank you for this information, I learned a lot :)

  30. Cutiepopz
    July 20th, 2017

    Hi, Thank you for this information, I learned a lot :)

  31. Anonymous
    July 30th, 2017

    Send me CCNA dumps on my email : {email not allowed}

  32. Jay
    September 18th, 2017

    Send me CCNA dumps on {email not allowed}

  33. Muhammad Waseem
    September 30th, 2017

    Really helpful one site and am also desired to appear in CCNA exam, so kindly can anybody send me updated dumps at {email not allowed}


  34. Muhammad Waseem
    September 30th, 2017

    15tl67 at students dot muet dot edu dot pk , Can anybody send me latest dumps at this email, please.


  35. begna
    October 27th, 2017

    i am about to take ccna exam by next week can anybody send me latest dumps please

  36. Shady
    November 11th, 2017

    Please send me Latest Dumps {shujat.bhatti at hotmail dot com } please i am preparing ccna exam

  37. Mahdi
    December 18th, 2017

    I’m trying to take ccna in three time.
    Please can anybody send me latest dumps and give some advice about the best way to revise
    Many Thanks

  38. Maruthi B
    January 9th, 2018

    plz send me the updated CCNA dumps at bmruthi94 at gmail dot com

  39. Anonymous
    February 4th, 2018

    can some one please send me latest dumps please swetharsouza at gmail dot com

  40. Anonymous
    February 4th, 2018

    some one please send me latest dumps at swethadsouza at gmail dot com

  41. Anonymous
    February 6th, 2018

    some one please send me latest dumps at harishwood1981 at gmail dot com

  42. Anonymous
    February 12th, 2018

    if anybody has latest canna dumps, please send me at waleed2982 at gmail dot com

  43. Abdul
    May 6th, 2018

    I plan to appear in ccna RnS exam in next 2 weeks, could you pls give a favor to share any authentic dumps mail mylostresort @ gmail . com

  44. Anonymous
    May 11th, 2018

    Hi Dear
    Kindly send me latest dumps at {email not allowed}

  45. ccna dumps
    June 17th, 2018

    Can someone please help with an updated ccna 200-125 dump?

  46. kush
    June 27th, 2018

    y is nobody sending me ccna dumbs.. my email is lanrekush @ gmail . com
    please help me out

  47. Unknown
    July 30th, 2018

    to ease the exam fee, here is the link that might help us. I’ve withdrawn 300usd here.

  48. Noidea
    August 8th, 2018

    Anyone have ccent dumps 100-105 v3? Please send them to Moneysrus5 at gmail dot com Thank you.

  49. MO Sha
    September 26th, 2018

    Please Please Please Could any one Help With CCDA My exam will be after tomorrow I need your Help guys. If you could send it to mustafaalfaroq at yahoo

Comment pages
1 3 4 5 374
Add a Comment