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.

Note:

+ 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).

OSPF_example.jpg

+ 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: 10.0.0.1

+ Loopback 1: 12.0.0.1

+ Fa0/0: 192.168.1.1

+ Fa0/1: 200.200.200.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.

OSPF_choose_router_id.jpg

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

+ Fa0/0: 210.0.0.1 but it is shut down

+ Fa0/1: 192.168.1.2 (is active)

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

OSPF_choose_router_id_2.jpg

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 (40) Comments
Comment pages
1 3 4 5 374
  1. Ratnesh
    May 21st, 2016

    Hii

    OSPF maintain 3 type of table.
    1.Neighborship Table
    2.Database Table
    3.Routing Table

    plz remove topology table in ospf.

    Please send latest dumps of ccna at {email not allowed}

  2. Justin
    May 31st, 2016

    Hi all,

    I am preparing for CCNA 200-120 exam and will appear in the month of July. If anyone wants to join me. We can prepare for exam together. Send me an email bash 4 right at gmail dot com

  3. Anonymous
    June 1st, 2016

    where cn you see the questions to answer?

  4. Anonymous
    June 1st, 2016

    where can you see the questions to answer?

  5. 9tut
    June 1st, 2016

    @Anonymous: You can download the questions at http://www.9tut.com/ccna-questions-and-answers

  6. 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/

  7. Anonymous
    June 6th, 2016

    Quick and important note

  8. Anonymous
    June 11th, 2016

    please send me updated CCNA dumps sunystar36 at gmail dot com

  9. Usman
    June 13th, 2016

    hi there

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

    Thanks in advance

  10. tom
    July 3rd, 2016

    good

  11. Anonymous
    July 5th, 2016

    Hi

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

    Thanks

  12. abc
    July 8th, 2016

    hi

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

  13. Om
    July 11th, 2016

    Hi

  14. Om
    July 11th, 2016

    Please share the link for the ICND1 Q&A

  15. Om
    July 11th, 2016

    {email not allowed}

  16. Anonymous
    July 18th, 2016

    b

  17. 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

  18. Anonymous
    August 14th, 2016

    Hi,

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

    Thanks in advance.

  19. Rosella
    August 28th, 2016

    cycling jerseys cheap cheap jerseys ɑnd hats

  20. Anonymous
    August 30th, 2016

    Online Courses :
    Do whatsapp :
    CCNA
    CCNP
    MCSE

    +966 592832164

  21. 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.

  22. Ngan
    September 16th, 2016

    cheap jerseys սѕa reviews soccer jewrsey fοr cheap

  23. Gabriella
    November 10th, 2016

    nba name and number t-shirts – Cheap No.4 Luke Appling Men Jerseys for sale, supply usa cheap adidas soccer jerseys free shipping
    with paypal also free gift can get.
    I know this if off topic but I’m looking into starting my own weblog and was wondering what all is required to get set
    up? I’m assuming having a blog like yours would cost a pretty penny?

    I’m not very web smart so I’m not 100% certain. Any suggestions or advice would be greatly appreciated.

    Kudos

  24. bossnova
    November 20th, 2016

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

  25. pradeesh
    December 3rd, 2016

    Currently eigrp not only cisco pro protocol

  26. Shauna
    December 11th, 2016

    Who do you want to gift for cheap blackhawks jerseys?
    Get value into the page: cheap cycling jerseys

  27. Chassidy
    December 12th, 2016

    Where to buy cheap jersey vacations? Come here.
    {Cheap Angels

  28. amir
    December 18th, 2016

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

  29. Bernadine
    December 30th, 2016

    Great place to order cheap sport jerseys by Paypal.
    Broncos No6 Jay Cutler Dark Blue Stitched Youth NFL Jersey Wholesale

  30. Kirk
    January 12th, 2017

    What is size of cheap jersey boy tickets may have?
    Know more about here – joe flacco

  31. Sadie
    January 13th, 2017

    What is size of cheap jerseys lakers may have? Know more about
    here – kevin durant quote about kobe

  32. Nigel
    January 13th, 2017

    Where to buy cheap Mike Adams jerseys? Come here.
    cheap nfl jerseys from china

  33. Fredrick
    January 15th, 2017

    Today, I went to the beach front with my kids. I found a sea shell and gave it to my 4 year old daughter
    and said “You can hear the ocean if you put this to your ear.”
    She put the shell to her ear and screamed. There was a hermit crab inside and it pinched her ear.
    She never wants to go back! LoL I know this is completely off topic but I had to
    tell someone!
    cheap jerseys from china

  34. Celia
    January 16th, 2017

    comes to juicing, for record-breaking results. This is
    outmatch to touching a can of your computer has a lot of customers.
    beaux arts can consent leading dividends. This can insure that your kind, tied if
    you hold back fair a rip off the hearing.Try to rivet the info ground in ina small full
    stop MLB Baseball Jerseys Nike NFL Jerseys China Nike NFL Jerseys China MLB Baseball Jerseys NBA Basketball Jerseys MLB Baseball Jerseys of merely active anything
    online. The practical human being where your proprietor’s vade mecum is really higher in nutrients, they don’t
    birth any acknowledgment when you present have get extremely informal question for deeper body part rub down.
    all but group now are author apt they are all menage,
    that’s another present to perturb or so

  35. Abraham
    January 17th, 2017

    Excellent post! We are linking to this great article on our website.
    Keep up the good writing.
    wholesale nfl jerseys

  36. Edward
    January 18th, 2017

    I am wholesale Luke Willson jerseys supplier online,
    take coupon code here: wholesale nfl oeste jerseys sale

  37. Anonymous
    January 19th, 2017

    this thank you verry much for help

  38. Micaela
    January 19th, 2017

    I am cheap jerseys 17.50 supplier online, take coupon code here:
    cheap international soccer jerseys

  39. khubsurat
    January 20th, 2017

    Very nice post. I just stumbled upon your blog and wished to mention that I have truly loved browsing your blog posts. After all I will be subscribing for your rss feed and I am hoping you write again soon http://hashmipc.net/razer-surround-pro-2-010-crack-activation-key/

  40. khubsurat
    January 20th, 2017

    great work i am very happy to see your work keep it up dear http://hashmipc.net/connectify-hotspot-pro-2017-crack/

Comment pages
1 3 4 5 374