Category: OSPF

LAB IX – RIPv2 -> OSPF Case Study

Building a use case from the CCDP FLG:


  • Each site has two links to their HQ (top) via WAN (Prio) and Internet ( backup ).
  • Internet and WAN connectivity goes over multipoint GRE tunnels to the sites with static NHRP mappings.
  • Cost of Internet links are increased so they’re used as backup links.
  • Backbone area configured over WAN and Internet

Building the LAB:

OSPF Design

Building the Backbone:

Adding the tunnel interface and NHRP mappings on the WAN Hub Router (R1):

And we have some routing on the Hubs:

LAB I ( OSPF over GRE with and without IPsec )


  • R1 functions as the internet.
  • R2 is the first location with Public IP
  • R3 is the second location with Public IP

There must be a GRE tunnel configured between R2 and R3 so that OSPF can be used between them. In the example we will use a tunnel with and without IPsec.

Configuration without IPsec:



interface FastEthernet0/0
 ip address
 duplex auto
 speed auto

interface Tunnel0
 ip address
 tunnel source
 tunnel destination

interface Loopback0
 ip address

router ospf 1
 network area 0
 network area 0

ip route


OSPF Stub Areas

There are four types of stub areas

  • stub
  • totally-stubby
  • not-so-stubby areas (NSSA)
  • totally not-so-stubby areas
  • All stub areas do not allow Type 5 (external) LSAs (ABR always filters them)
  • For the totally stub areas the ABR filters the Type 3 LSAs.


OSPF Default Routing

  • Create a default route into a specific area
  • Create a default route into the entire OSPF domain
  • Default-information originate
    • Creates a default route into OSPF, external Type 2 route, using a Type 5 LSA with metric 20
    • default-information originate (always) metric 30 metric-type 1 route-map NAME

      • Default metric 20
      • Default metric-type 2
        • metric-type 1 cost can be changed
        • metric-type 2 cost can’t be changed
    • The metric-type defines LSA is Type 1 External or Type 2 External (default)
    • Route-map is used for tracking networks. If Route-map condition is met, default route is advertized.


OSPF Route Filtering and Summarization

OSPF Route filtering between areas

  • Filtering prevents the creation of LSAs.
  • LSDB’s have to be the same for all routers ifnot SPF logic will fail
  • OSPF can filter the originiation of LSA between areas
  • Type 3 LSAs are filtered prior to origination ABR
      • With multiple ABRs filtering should be done on both.
      • ospf# area number prefix-list prefix name in|out
        • In: IOS filters routes comming in to that area
        • out: IOS filters routes comming out of that area
    ip prefix-list NAME seq 5 deny le 32
    ip prefix-list NAME seq 10 permit le 32
    R1#(config-router)#area 1 filter-list prefix NAME in
    R1#show ip ospf database summary self-originate


OSPF Metric Calculations & Tuning

    • Analyse the LSDB to find all possible routes to reach the subnet.
    • Per route, add the interface cost for all outgoing interfaces in that route.
    • Pick the route with the lowest cost.
      • Cost is derived from the egress interface bandwith.


OSPF Message Types

Five types of OSPF Messages:

  • Hello
  • Database Description (DD or DBD)
  • Link-State Request
  • Link-State Update
  • Link-State Acknowledgement


OSPF Link-State Database (LSDB)

  • Each router stores it’s LSA in it’s LSDB.
  • Each router within the same area should have the same LSDB information.
  • SPF algortithm for each area it is connected to.
  • The router thinks it’s the root of the tree and draws branches via SPF
  • LSAs in OSPF LSDB are pieces that the SPF process uses.
  • OSPF poisons LSA by setting max-age (3600).

OSPF types of Link State Advertisement (LSA)

  • Type 1: Router LSA
  • Type 2: Network LSA
  • Type 3: Summary LSA
  • Type 4: Summary ASBR LSA
  • Type 5: Autonomous system external LSA
  • Type 6: Multicast OSPF LSA
  • Type 7: Not-so-stubby area LSA
  • Type 8: External attribute LSA for BGP