Category: OSPF

LAB IX – RIPv2 -> OSPF Case Study

Building a use case from the CCDP FLG:

Topology:

  • 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 )

Setup:

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

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:

ROUTER 2:

R2:

# WAN ADDRESS
interface FastEthernet0/0
 ip address 1.1.1.2 255.255.255.0
 duplex auto
 speed auto
!

# TUNNEL ADDRESS
interface Tunnel0
 ip address 10.10.10.1 255.255.255.252
 tunnel source 1.1.1.2
 tunnel destination 1.1.2.2
!

# LAN ADDRESS
interface Loopback0
 ip address 192.168.10.1 255.255.255.0
!

# OSPF CONFIG
router ospf 1
 log-adjacency-changes
 network 10.10.10.0 0.0.0.3 area 0
 network 192.168.10.0 0.0.0.255 area 0
!

# DEFAULT ROUTE (TRAFFIC TOWARDS R3)
ip route 0.0.0.0 0.0.0.0 1.1.1.1

(more…)

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.

(more…)

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.

(more…)

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 10.10.10.0/24 le 32
    ip prefix-list NAME seq 10 permit 0.0.0.0/0 le 32
    
    R1#(config-router)#area 1 filter-list prefix NAME in
    R1#show ip ospf database summary self-originate

    (more…)

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.

(more…)

OSPF Message Types

Five types of OSPF Messages:

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

OSPF LSDB and LSA

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

(more…)