CCNA, CCNA Exam, CCNA help, Cisco Certified Network Associate, CCNA study, CCNA prep

CCNA 3.9: Configure, verify, and troubleshoot single area and multi-area OSPFv2 for IPv4

Overview:

Open Shortest Path First version 2 (OSPFv2), is a non-proprietary link-state routing protocol that is typically used within an autonomous system (otherwise known as an interior gateway protocol).  The v2 simply means you are using IPv4 addresses.

 

Study Notes:

  • OSPF is a Link-state routing protocol
  • Dijkstra's Shortest Path First algorithm is used to determine the best path
  • The metric that OSPF uses is cost
  • Cost is determined by dividing 100 by the bandwidth of the link: 100/bw in Mbps
  • OSPF maintains three tables
    • Neighbor table - routers next to me in this area
    • Topology table - roadmap of all routers in this area
    • Routing table - best routes based on algorithm selection
  • OSPF sends triggered updates to announce network changes
  • OSPF Area
    • An Area contains a group of routers that share the same topology table
    • OSPF must have an area 0
    • All other areas must connect to area 0
  • OSPF Area Border Router (ABR)
    • A router with interfaces in two different Areas, one in area 0 and another interface in a different area
    • All changes are kept within an Area
    • In the multiarea image below, the ABRs are Router3 and Router4
  • OSPF Autonomous System
    • An Autonomous System contains a group of areas that share the same routing protocol (i.e. OSPF)
  • OSPF Autonomous System Boundary Router (ASBR)
    • A router with interfaces in two different Autonomous Systems
    • Autonomous Systems can be different routing protocols (OSPF to EIGRP, OSPF to RIP, etc) or different instances of the same routing protocol (OSPF process 1 to OSPF process 2)
  • OSPF Neighbors
    • Neighbors form with routers in the same area
    • Router IDs are used
    • Link state
      • When a change occurs an LSA is created and sent to all neighbor routers
      • The LSDB is then updated and the change is sent to all of this router's neighbors
      • There are five types of link state packets
        • Hello - establish and maintain adjacencies with other routers.
          • sent every 10 seconds on multi-access and point-to-point segments (broadcast and Serial)
          • sent every 30 seconds on non-broadcast multi-access (NBMA) segments (Frame Relay, X.25, ATM)
        • DBD - database description contains sending router's link-state database. receiving router checks it against its own LSDB
        • LSR - receiving router requests more information about something in the DBD
        • LSU - the reply to an LSRs
        • LSAck - an acknowledgement that the LSR was receive
  • Single Area OSPF
    • Consists of one Area
    • OSPF must always have one Area that is Area 0 - the backbone area
    • Since OSPF must have an area 0 and there's only one area in single area OSPF, that Area must be Area 0
  • Example walking through each OSPF state.  Refer to the image above.  (This is all part of the lab!):
    • OSPF router-ids are configured on all routers.  R1=1.1.1.1, R2=2.2.2.2, R3=3.3.3.3 and R4=4.4.4.4
    • Bandwidth on the Serial 1/0 interfaces connecting R3 to R4 is set to 384Kbps
    • Bandwidth on the Serial 1/1 interfaces connecting R2 to R4 is set to 768Kbps
    • Start the OSPF process
    • DOWN STATE
      • All routers send hellos to 224.0.0.5 every 10 seconds because the links are multi-access broadcast links and point-to-point serial links
    • INIT STATE
      • Reply hellos are sent from connected routers and if the settings match (hello and dead timers, networks, area IDs) then neighbor relationships are formed
    • 2-WAY STATE
        • R1-R2 and R1-R3 go through DR and BDR elections since they are multi-access broadcast links
        • R2 is elected as the DR and R1 is the BDR on the R1-R2 segment since R2 has the higher router-id(2.2.2.2)
        • R3 is elected as the DR and R1 is the BDR on the R1-R3 segment since R3 has the higher router-id (3.3.3.3)
        • We are assuming that all of the routers were started at the same time or the ip ospf process was cleared on all of them at the same time and they are all going through the election process simultaneously
        • If set, the DR/BDR/DROTHER election process goes by:
          • highest priority (0 means it can never be a DR or BDR)
          • highest router-id
          • highest loopback IP address
          • highest interface IP address
        • It's best to set router-ids to minimize confusion when viewing the routing table and other output
      • R2-R4 and R3-R4 interfaces do not participate in DR and BDR election since they are point-to-point serial links
      • Master/Slave relationship is then determined to see which router will send its DBD first
      • We have not configured an ip ospf priority command so the router-id is used for master/slave determinations as well
      • At this point the process only continues if adding new neighbors
    • EXCHANGE STATE | LOADING STATE
      • DBDs are exchanged (DBD), request for updates (LSR), updates sent (LSU), and receipt of updates are acknowledged (LSAck).  The Master sends its DBD first.
    • FULL STATE
      • Neighbors are fully synchronized
  • Now that the routers know about all other OSPF routers in their area (their Topology Table is complete), they can use Djikstra's Shortest Path First algorithm to figure out the best path.
  • Cost is used to figure out the best path to a network.  Remember to include the calculation for the interface that connects to the destination network.
  • Cost is determined by dividing 100 by the bandwidth in Mbps of the link. Any bandwidth higher than 100Mbps will have a cost of 1 since fractions are not allowed as a result of the calculation.
  • Let's figure out the which path R1 will add to its routing table when trying to get to destination network 192.168.5.0/30
    • R1's interface to R3 is a 100Mbps FastEthernet link.  The cost for R1 to get to R3 is 1.  The calculation is 100/100Mbps = 1
    • R3's interface to the destination network 192.168.5.0 is a 384Kbps Serial link.  The cost for R3 to the destination network is then 100/.384Mbps = 260
    • The total OSPF cost going the first route from R1->R3->192.168.5.0 = 1 + 260 = 261
    • Now let's calculate the other path from R1->R2->R4->192.168.5.0
    • R1's interface to R2 is 100Mbps FastEthernet link.  The cost for R1 to get to R2 is 1.  The calculation is 100/100Mbps = 1
    • R2's interface to R4 is a 768Kbps Serial link. The cost for R2 to get to R4 is 100/.768Mbps = 130
    • R4's interface to the destination network 192.168.5.0 is a 384Kbps Serial link.  The cost for R4 to the destination network is then 100/.384Mbps = 260
    • The total OSPF cost going the other route from R1->R2->R4->192.168.5.0 = 1 + 130 + 260 = 391
    • For R1 to get to the 192.168.5.0/30 network it will compare the cost of going the path of R1->R3->192.168.5.0 vs R1->R2->R4->192.168.5.0
    • Comparing 261 to 391, the router determines the cost of 261 is better so OSPF adds that route to the routing table
        show ip route
            O       192.168.5.0 [110/261] via 192.168.3.2, 01:05:15, FastEthernet1/0
    
  • What are the path costs for R4 to get to the 192.168.0.0 network?
    • R4->R2->R1->192.168.0.0 = 130 + 1 + 1 = 132
    • R4->R3->R1->192.168.0.0 = 260 + 1 + 1 = 262
  • Which path is entered into the routing table?
    • R4->R2->R1->192.168.0.0 since it has the lowest cost of the two possible routes

 

  • Multiarea OSPF
    • OSPF multiarea is useful in larger network deployments to reduce processing and overhead
    • Routers within an area share link state databases.  The more routers in an area the longer it takes to converge
    • Also, the more routers in an area the larger the LSDB becomes
    • Multiarea OSPF addresses these issues through the use of a heirarchical design and multiple OSPF areas
    • All Areas must connect to Area 0, the backbone area
    • In the image above there are three Areas, Area 0, Area 12 and Area 34 making this a multi-area instance of OSPF
    • Router3 and Router4 are ABRs
    • We're not running multiple OSPF processes or connecting to other routing protocols so there are no ASBRs
    • OSPF doesn't summarize routes by default, but you probably will want to configure summarization later so it's recommended to create contiguous networks in each area.  The CCNA does not cover OSPF authentication, filtering, manual summarization, redistribution, stub, virtual-link, and LSAs)

 

Labs:

PacketTracer Lab (Single Area): CCNA-3.9-Configure-verify-and-troubleshoot-single-area-OSPFv2-for-IPv4.pkt

 

PacketTracer Lab (Multiarea): CCNA-3.9-Configure-verify-and-troubleshoot-multiarea-OSPFv2-for-IPv4.pkt

Subscribe Now for access to the labs!

 


Leave a Reply

s2Member®