Route My World!

A CCNA/CCNP Blog

BSCI: OSPF Advanced Configuration

Posted by Aragoen Celtdra on October 3rd, 2008

OSPF Routers and LSA Types

OSPF Router Types

  • Different OSPF router types control the type of traffic that go in and out of OSPF areas.
  • When an area becomes too big, some of the following concerns become important:
    • Freqency of SPF calculations
    • Routing tables getting bigger
    • LSDBs also getting bigger.
  • A solution to an increasing network is to implement a hierarchical area structure for the OSPF network. Some advantages of multiple OPSF areas are:
    • Reduced frequency of SPF calculation
    • Smaller routing tables
    • Reduced LSU overhead
  • Here are the different router types:
    • Internal router - router’s whose interfaces are in the same area. Routers in the same area have the same LSDBs.
    • Backbone router - These routers sit on the perimeter of the backbone area (area 0) so it has at least one interface connected to area 0.
    • Area Border Router (ABR) -
      • Have interfaces attached to multiple areas.
      • It contains a separate LSDB for each area.
      • Route traffic destined for or arriving from other areas.
      • Exit points for the area, meaning that routing information destined for another area can get there through the ABR of that area.
      • Can summarize routing information.
    • Autonomous System Border Router
      • Have at least one interface attached to another autonomous system, such asa RIP network.
      • Perform route redistribution - a process of importing non-OSPF information to the OSPF network and vice versa.
  • A router can be more than one router type.
  • For each area that a router connects, it maintains a separate LSDB. Routers in the same area will have identical LSDBs for that area.
  • An LSDB is synchronized between pairs of adjacent routers. On broadcast (LAN) networks, an LSDB is synchronized between the DROTHER.

OSPF LSA Types

LSA Type

Description

1

Router LSA

2

Network LSA

3

Network Summary

4

ASBR Summary

5

AS External LSA

6

Multicast OSPF LSA

7

NSSA External LSA

8

External Attributes LSA

9

Opaque LSA (link-local scope)

10

Opague LSA (area-local scope)

11

Opaque LSA (AS scope)

Each LSA is a record that holds information for the database. As a whole, all these records make up the entire topology of an OPSF network.

Type 1: Router LSA

  • A Type 1 LSA, or Router LSA is, flooded by each router in an area. A type 1 LSA describes the collective states of the router’s directly connected links (interfaces).
  • Each of the router’s links (interfaces) is categorized into four diffrent link types as follows:

Link Type

Description

Link ID

1

Point-to-point connection to another router Neighbor Router ID

2

Connection to a transit network DR’s interface address

3

Connection to a stub* network IP network/subnet number

4

Virtual link Neighbor router ID
  • *A stub network is a dead-end link that has only one router attached.
  • For each of these links, there is a link data field that provides 32 bits of extra information.
    • For most link types this is the IP address of the associated router interface.
    • For stub network links, this link data field contains the subnet mask.
  • Type 1 LSAs also indicates OSPF cost for each link, and whether the router is an ABR or ASBR.

Type 2: Network LSA

  • Generated by the DR.
  • Generated for every LAN (broadcast) or or NBMA transit network. An example of a transit network is an Ethernet LAN.
  • The Type 2 LSA lists all the attached routers that make up the transit network, including the subnet mask of the link.
  • Type 2 LSAs never cross the area boundary
  • The link-state ID for a Network LSA is the IP address of the DR’s interface that advertised it.

Type 3: Network Summary LSA

  • Sent by the ABR.
  • A type 3 LSA advertises routes from one area into other areas in the OSPF autonomous system.
  • When type 1 LSAs reach the ABR, the information from the type 1 LSAs are sent out by the ABR to other areas in the form of type 3 summary LSAs.
  • By default, OSPF does not automatically summarize groups of contiguous subnets. It also does not summarize a network to its classful boundary.
  • By default, a type 3 LSA is advertised into the backbone area for every subnet defined in the originating area.
  • Manual summarization should be used to alleviate problems caused by significant flooding from too many networks being advertised.
  • Summary LSAs do not, by default, contain summarized routes. Therefore all subnets in an area will be advertised, unless of course the network operator configures manual  summarization.

Type 4: ASBR Summary LSA

  • A type 4 summary LSA is used to announce the presence of an ASBR. Therefore a type 4 summary LSA is only used when an ASBR exists within an area.
  • It identifies the ASBR and provides a route to it.
  • The link-state ID is the ASBR’s router ID.
  • The ASBR sends a type 1 router LSA with a bit (known as the  external bit or e-bit) that identifies itself as and ASBR. When an ABR (that is identified with a border bit or b-bit in the router LSA) receives this type 1 LSA, it builds a type 4 LSA and floods it to the backbone or area 0.

Type 5: External LSA

  • Describe routes to external OSPF autonomous systems.
  • These are generated by the ASBR and are flooded to the entire autonomous system.
  • The link-state ID is the external network number.
  • Again, because summarization does not occur by default, the network operator should consider manual route summarization at the ASBR to prevent problems with over flooding.

OSPF LSDB & Routing Table

OSPF LSDB

The command show ip ospf database allows one to view the contents of the OSPF LSDB.

Router# show ip ospf database

OSPF Router with ID(192.168.1.11) (Process ID 1)
                 Router Link States(Area 0)
 Link ID           ADV Router        Age         Seq#       Checksum Link count

 192.168.1.8       192.168.1.8       1381      0×8000010D    0xEF60   2

 192.168.1.11      192.168.1.11      1460      0×800002FE    0xEB3D   4

 192.168.1.12      192.168.1.12      2027      0×80000090    0×875D   3

 192.168.1.27      192.168.1.27      1323      0×800001D6    0×12CC   3

                 Net Link States(Area 0)

 Link ID          ADV Router        Age         Seq#       Checksum

 172.16.1.27      192.168.1.27      1323      0×8000005B    0xA8EE

 172.17.1.11      192.168.1.11      1461      0×8000005B    0×7AC

                 Type-10 Opaque Link Area Link States (Area 0)

  Link ID         ADV Router        Age         Seq#       Checksum Opaque ID

 10.0.0.0         192.168.1.11      1461      0×800002C8    0×8483     0

 10.0.0.0         192.168.1.12      2027      0×80000080    0xF858     0

 10.0.0.0         192.168.1.27      1323      0×800001BC    0×919B     0

 10.0.0.1         192.168.1.11      1461      0×8000005E    0×5B43     1

The following explains the purpose of each column:

  • Link ID - Identifies the Router ID number
  • ADV Router - Identifies the advertising router ID. This is the source router of the LSA
  • Age - The age of the Link state. The maximum is 3600 seconds (1 hour).
  • Seq# - The link state sequence number. The sequence number starts at 0×80000001 and increments by one each time it is updated. This helps detect old and duplicate LSAs.
  • Checksum - Ensures the reliable receipt of the LSA
  • Link Count - Shows how many links are attached.
    • Used only on Type 1 Router LSAs.
    • The link count includes all point-to-point, transit, and stub links.
    • Point-to-point serial links count as 2
    • All others count as one.

Route Types in the Routing Table

Different designations describe the route types generated by OSPF:

  • O - Indicates that the route comes from within the router’s area. These routes are advertised by router LSAs and network LSAs
  • O IA - The “IA” stands for inter-area. It indicates that the routes come from networks outside the router’s area (but still within the same autonomous system.) This type of route is advertised by ABRs through summary LSAs.
  • O E1 - External LSA type 1. Route costs are calculated by adding the external cost to the internal cost of each link. This type is useful when multiple ASBRs are advertising external routes to the same AS - it avoids suboptimal routing.
  • O E2 - External LSA type 2. The route coast never change and it is always the cost of the external route.

OSPF LSDB Overload Protection

  • OSPF LSDB overload protection can protect the routers from resource (CPU and memory) drains. An example of such an instance is a misconfiguration of routers that causes a redistribution of a a large number of prefixes, in turn generating excessive amount of LSAs that are generated.
  • This feature is available with Cisco IOS Software Release 12.3(7)T and later, as well as some specific earlier releases.

max-lsa maximum-number [threshold-percentage] [warning-only] [ignore-time minutes] [ignore-count count-number] [reset-time minutes]

The parameters are as follows:

Parameter

Description

maximum-number Maximum number of non-self-generated LSAs that the OSPF process can keep in the OSPF Database
threshold-percentage (Optional) The percentage of the maximum LSA number (in maximum-number parameter) at which point a warning message is logged. The default is 75%
warning-only (Optional) When maximum LSA limit is exceeded, send only a warning. OSPF process does not enter ignore state. Disabled by default.
ignore-time minutes (Optional) The amount of time in minutes that neighbors are ignored after the LSA maximum limit is exceeded. The default is 5 minutes
ignore-count count-number (Optional) The number of times that the OSPF process can consecutively be placed into the ignore state. The default is five times.
reset-time minutes (Optional) Specifies the time, in minutes, after which the ignore count is reset to 0. The default is 10 minutes.

Changing the Cost Metric

The general formula used to calculate OSPF metric is 100Mbps/(bandwidth in Mbps).

For example:

  1. A 64 kbps link has a metric of 1562:
    • 64kbps/1000kbps = 0.064 –> 100Mbps/0.064Mbps = 1562.5
  2. A T1 link gets a metric of 64
    • 100Mbps / 1.544Mbps = 64.7
  • The problem with that formula is that the maximum interface it can do is 100Mbps, which will yield a metric of 1.
  • For interfaces faster than 100mbps, use the auto-cost-reference-bandwidth ref-bw command.
    • The ref-bw is any range between 1 to 4,294,967 in megabits per second. The default is 100.
  • Also, remember to use the bandwidth value interface configuration command to accurately depict the correct interface bandwidth, in kilobits per second
  • The ip ospf cost interface-cost configuration command to override the default cost. The interface-cost is an integer from 1 to 65,535.
    • The lower the number, the better (and more preferred) link.

Resources:

  1. Link State Advertisement Formats
  2. IP Routing Protocols Commands - show ip ospf…
  3. OSPF E2 vs E1 Routes - Chris Bryant
  4. OSPF Link State Database Overload Protection

This entry is not an authoritative guide. These are merely notes and rehash of the primary text materials and resources that I use. For a thorough guide of the BSCI course, consider purchasing Building Scalable Cisco Internetworks (BSCI) (Authorized Self-Study Guide) (3rd Edition) by Diane Teare and Catherine Paquet, as well as following the links on the resources section of this entry.

One Response to “BSCI: OSPF Advanced Configuration”

  1. JoeyNo Gravatar Says:

    Glad to see you back on the horse, good sir! Hopefully I’ll be joining soon enough.

Leave a Reply

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

 

Warning: stristr() [function.stristr]: Empty delimiter in /home/liwanagf/public_html/routemyworld/wp-content/plugins/wassup/wassup.php on line 2093