Guest

Cisco IOS Software Releases 12.4 T

OSPFv2 Local RIB

  • Viewing Options

  • PDF (198.4 KB)
  • Feedback
OSPFv2 Local RIB

Table Of Contents

OSPFv2 Local RIB

Contents

Prerequisites for OSPFv2 Local RIB

Restrictions for OSPFv2 Local RIB

Information About OSPFv2 Local RIB

Function of the OSPF Local RIB

How to Configure the OSPFv2 Local RIB Feature

Changing the Default Local RIB Criteria

Changing the Administrative Distance for Discard Routes

Examples

Troubleshooting Tips

Configuration Examples for the OSPFv2 Local RIB Feature

Changing the Default Local RIB Criteria: Example

Changing the Administrative Distance for Discard Routes: Example

Additional References

Related Documents

Standards

MIBs

RFCs

Technical Assistance

Command Reference

debug ip ospf rib

discard-route

local-rib-criteria

show ip ospf rib

Feature Information for the OSPFv2 Local RIB Feature


OSPFv2 Local RIB


First Published: June 28, 2007
Last Updated: June 28, 2007

With the OSPFv2 Local RIB feature, each OSPF protocol instance has its own local Routing Information Base (RIB). The OSPF local RIB serves as the primary state for OSPF SPF route computation. The global RIB is not updated with intermediate results during the SPF. Instead, the global RIB is updated only when routes are added, deleted, or changed, thereby reducing global RIB computation. This reduced update activity may result in fewer dropped packets.

This feature is enabled by default and does not need to be configured. This document describes some optional configuration tasks to modify how the global and local RIBs function, although it is recommended to keep the default settings.

Finding Feature Information in This Module

Your Cisco IOS software release may not support all of the features documented in this module. To reach links to specific feature documentation in this module and to see a list of the releases in which each feature is supported, use the "Feature Information for the OSPFv2 Local RIB Feature" section.

Finding Support Information for Platforms and Cisco IOS and Catalyst OS Software Images

Use Cisco Feature Navigator to find information about platform support and Cisco IOS and Catalyst OS software image support. To access Cisco Feature Navigator, go to http://www.cisco.com/go/cfn. An account on Cisco.com is not required.

Contents

Prerequisites for OSPFv2 Local RIB

Restrictions for OSPFv2 Local RIB

Information About OSPFv2 Local RIB

How to Configure the OSPFv2 Local RIB Feature

Configuration Examples for the OSPFv2 Local RIB Feature

Additional References

Command Reference

Feature Information for the OSPFv2 Local RIB Feature

Prerequisites for OSPFv2 Local RIB

Before this feature is configured, the OSPF routing protocol must be configured.

Restrictions for OSPFv2 Local RIB

This feature is available only for IP Version 4 networks.

Information About OSPFv2 Local RIB

Before you configure this feature, you should understand the following concept:

Function of the OSPF Local RIB

Function of the OSPF Local RIB

A router that is running OSPFv2 maintains a local RIB in which it stores all routes to destinations that it has learned from its neighbors. At the end of each SPF, OSPF attempts to install the best (that is, the least-cost) routes to a destination present in the local RIB into the global IPv4 routing table. The global RIB will be updated only when routes are added, deleted, or changed. Routes in the local RIB and Forwarding Information Base (FIB) will not compute when intermediate results are computed during SPF, resulting in fewer dropped packets in some circumstances.

How to Configure the OSPFv2 Local RIB Feature

Although it is recommnded to keep the default settings for the commands described in the following sections, it is optional to change the defaults settings. This section describes the following otional tasks:

Changing the Default Local RIB Criteria (optional)

Changing the Administrative Distance for Discard Routes (optional)

Changing the Default Local RIB Criteria

By default, the contents of the global RIB are used to compute inter-area summaries, NSSA translation, and forwarding addresses for type-5 and type-7 LSAs. Each of these functions can be configured to use the contents of the OSPF local RIB instead of the global RIB for their computation. Using the local RIB for the computation may be slightly faster in some circumstances, but because the local RIB has information for only a particular instance of OSPF, using it for the computation may yield incorrect results. Potential problems that may occur include routing loops and black-hole routes. It is recommended that you not change the default values because they are conservative and preserve the current global RIB behavior.

SUMMARY STEPS

1. enable

2. configure terminal

3. router ospf process-id [vrf vpn-name]

4. local-rib-criteria [forwarding-address] [inter-area-summary] [nssa-translation]

5. end

6. show ip ospf process-id rib [redistribution] [network-prefix] [network-mask] [detail]

DETAILED STEPS

 
Command or Action
Purpose

Step 1 

enable

Example:

Router> enable

Enables privileged EXEC mode.

Enter your password if prompted.

Step 2 

configure terminal

Example:

Router# configure terminal

Enters global configuration mode.

Step 3 

router ospf process-id [vrf vpn-name]

Example:

Router(config)# router ospf 23

Configures an OSPFv2 routing process and enters router configuration mode.

Step 4 

local-rib-criteria [forwarding-address] [inter-area-summary] [nssa-translation]

Example:

Router(config-router)# local-rib-criteria forwarding-address

Specifies that the OSPF local RIB will be used for route validation.

Step 5 

end

Example:

Router(config-router)# end

Returns to privileged EXEC mode.

Step 6 

show ip ospf process-id rib [redistribution] [network-prefix] [network-mask] [detail]

Example:

Router# show ip ospf 23 rib

Displays information for the OSPF local RIB or locally redistributed routes.

Changing the Administrative Distance for Discard Routes

By default, OSPF installs discard routes to null0 for any area range (internal) or summary-address (external) prefixes that it advertises to other routers. Installation of a discard route can prevent routing loops in cases where portions of a summary do not have a more specific route in the RIB. Normally, internal discard routes are installed with an administrative distance of 110, while external discard routes have an administrative distance of 254.

There may be rare circumstances, however, when some other values are needed. For example, if one OSPF process installs a route that exactly matches an area range configured on another OSPF process, the internal discard routes for the second OSPF process could be given a higher (less desirable) administrative distance.

Although it is recommended to keep the default settings, you can follow the steps in this section to change the administrative distance for discard routes.

SUMMARY STEPS

1. enable

2. configure terminal

3. router ospf process-id [vrf vpn-name]

4. discard-route [external [distance]] [internal [distance]]

5. end

6. show ip route [ip-address [mask] [longer-prefixes] | protocol [process-id] | list [access-list-number | access-list-name] | static download]

DETAILED STEPS

 
Command or Action
Purpose

Step 1 

enable

Example:

Router> enable

Enables privileged EXEC mode.

Enter your password if prompted.

Step 2 

configure terminal

Example:

Router# configure terminal

Enters global configuration mode.

Step 3 

router ospf process-id [vrf vpn-name]

Example:

Router(config)# router ospf 23

Configures an OSPFv2 routing process and enters router configuration mode.

Step 4 

discard-route [external [distance]] [internal [distance]]

Example:

Router(config-router)# discard-route external 150

Reinstalls either an external or internal discard route that was previously removed.

Note You can now specify the administrative distance for internal and external discard routes.

Step 5 

end

Example:

Router(config-router)# end

Returns to privileged EXEC mode.

Step 6 

show ip route [ip-address [mask] [longer-prefixes] | protocol [process-id] | list [access-list-number | access-list-name] | static download]

Example:

Router# show ip route ospf 23

Displays the current state of the routing table.

Note Entering the show ip route command will verify the changed administrative distance values for external and internal discard routes.

Examples

The sample output displayed for the show ip route command confirms that the administrative distance for the IP route 192.168.0.0 255.255.255.0 is 110.

Router# show ip route 192.168.0.0 255.255.255.0


Routing entry for 192.168.0.0/24

 Known via "ospf 1", distance 110, metric 0, type intra area

  Routing Descriptor Blocks:

  * directly connected, via Null0

Route metric is 0, traffic share count is 1

Troubleshooting Tips

You can research the output from the debug ip ospf rib command to learn about the function of the local RIB and the interaction between the route redistribution process and the global RIB. For example, you can learn why the routes that OSPF placed in the global RIB are not the same ones that you anticipated.

Configuration Examples for the OSPFv2 Local RIB Feature

Changing the Default Local RIB Criteria: Example

Changing the Administrative Distance for Discard Routes: Example

Changing the Default Local RIB Criteria: Example

In the following example, the local-rib-criteria command is entered without any keywords to specify that the local RIB will be used as criteria for all of the following options: forwarding address, inter-area summary, and NSSA translation.

router ospf 1
 router-id 10.0.0.6
 local-rib-criteria

Changing the Administrative Distance for Discard Routes: Example

In the following example, the administrative distance for external and internal discard routes is set to 25 and 30, respectively.

router ospf 1
 router-id 10.0.0.6
 log-adjacency-changes
 discard-route external 25 internal 30
 area 4 range 10.2.0.0 255.255.0.0
 summary-address 192.168.130.2 255.255.255.0
 redistribute static subnets
 network 192.168.129.2 0.255.255.255 area 0
 network 192.168.130.12 0.255.255.255 area 0

The output from the show ip route command verifies that the administrative distance for the internal route 10.2.0.0/16 is set to 30.

Router# show ip route 10.2.0.0 255.255.0.0

Routing entry for 10.2.0.0/16

 Known via "ospf 1", distance 30, metric 1, type intra area

  Routing Descriptor Blocks:
  * directly connected, via Null0
    Route metric is 1, traffic share count is 1

The output from the show ip route command verifies that the administrative distance for the external route 192.168.130.2/24 is set to 25.

Router# show ip route 192.168.130.2 255.255.255.0

Routing entry for 192.168.130.2/24
 Known via "ospf 1", distance 25, metric 20, type intra area
  Routing Descriptor Blocks:
  * directly connected, via Null0
      Route metric is 20, traffic share count is 1

Additional References

The following sections provide references related to the OSPFv2 Local RIB feature.

Related Documents

Related Topic
Document Title

OSPF commands

"OSPF Commands" chapter of the Cisco IOS IP Routing Protocols Command Reference, Release 12.4T.

OSPF configuration tasks

"Configuring OSPF" chapter in the Cisco IOS IP Routing Protocols Configuration Guide, Release 12.4T.


Standards

Standard
Title

None


MIBs

MIB
MIBs Link

None

To locate and download MIBs for selected platforms, Cisco IOS releases, and feature sets, use Cisco MIB Locator found at the following URL:

http://www.cisco.com/go/mibs


RFCs

RFC
Title

None


Technical Assistance

Description
Link

The Cisco Support website provides extensive online resources, including documentation and tools for troubleshooting and resolving technical issues with Cisco products and technologies.

To receive security and technical information about your products, you can subscribe to various services, such as the Product Alert Tool (accessed from Field Notices), the Cisco Technical Services Newsletter, and Really Simple Syndication (RSS) Feeds.

Access to most tools on the Cisco Support website requires a Cisco.com user ID and password.

http://www.cisco.com/techsupport


Command Reference

This section documents only commands that are new or modified.

New Commands

debug ip ospf rib

local-rib-criteria

show ip ospf rib

Modified Commands

discard-route

debug ip ospf rib

To display debugging information for Open Shortest Path First (OSPF) Version 2 routes in the global or local Routing Information Base (RIB), use the debug ip ospf rib command in privileged EXEC mode. To disable the debugging of OSPF Version 2 routes, use the no form of this command.

debug ip ospf rib [local | [redistribution | global [access-list-number]]] [detail]

no debug ip ospf rib [local | [redistribution | global [access-list-number]]] [detail]

Syntax Description

local

(Optional) Displays debugging information for OSPF Version 2 routes in the local RIB.

redistribution

(Optional) Displays debugging information about redistributed OSPF Version 2 routes.

global

(Optional) Displays debugging information for OSPF Version 2 routes in the global RIB.

access-list-number

(Optional) Number of an access list. This is a decimal number from 1 to 199 or from 1300 to 2699.

detail

(Optional) Displays more detailed debug information.


Command Modes

Privileged EXEC (#)

Command History

Release
Modification

12.4(15)T

This command was introduced.


Usage Guidelines

You can use the output from the debug ip ospf rib command to learn about the function of the local RIB and the interaction between the route redistribution process and the global RIB. For example, you can learn why the routes that OSPF placed in the global RIB are not the same ones that you anticipated.

A Cisco Technical Assistance Center representative may ask you to turn on debugging using the debug ip ospf rib command as part of troubleshooting a problem.

To monitor updates from the OSPF database to the OSPF local RIB, use the local keyword, and to monitor updates from the OSPF database to the OSPF global RIB, use the global keyword.

It is highly recommended that you limit the debugging output to information specific to the IP prefix that is associated with a specific access list by entering the access-list-number argument.

Examples

The following is sample output from the debug ip ospf rib command with the access-list-number argument used in order to limit the debugging output to information specific to the IP prefix that is associated with the specific access list 1:

Router# show running-config | include access-list 1

access-list 112 permit 10.1.1.0 0.0.0.255
! access-list 1 is configured

Router# debug ip ospf rib local detail 1

*May 31 21:28:17.331: OSPF-RIB-LOCAL: Delete intra-area connected 
route 192.168.130.2/255.255.255.0, area 1, dist 10, for interface 
Ethernet0/0.1
*May 31 21:28:17.331: OSPF-RIB-LOCAL: Local RIB process OSPF-1 
Router clear
*May 31 21:28:17.331: OSPF-RIB-LOCAL: Add intra-area connected 
route 192.168.130.2/255.255.255.0, area 1, dist 10, for interface 
Ethernet0/0.1
.
.
.

discard-route

To reinstall an external or internal discard route that was previously removed, use the discard-route command in router address family topology or router configuration mode. To remove an external or internal discard route, use the no form of this command.

discard-route [external [distance]] [internal [distance]]

no discard-route [external [distance]] [internal [distance]]

Syntax Description

external

(Optional) Specifies the discard-route entry for redistributed summarized routes on an Autonomous System Boundary Router (ASBR).

internal

(Optional) Specifies the discard-route entry for summarized internal routes on the Area Border Router (ABR).

distance

(Optional) Administrative distance. A value between 1 and 254. The default administrative distance for external and internal discard routes is 254 and 110, respectively.


Defaults

External and internal discard-route entries are installed.

Command Modes

Router address family topology configuration (config-router-af-topology)
Router configuration (config-router)

Command History

Release
Modification

12.1(1)T

This command was introduced.

12.2(33)SRA

This command was integrated into Cisco IOS Release 12.2(33)SRA.

12.2(33)SRB

This command was made available in router address family topology configuration mode.

12.2SX

This command is supported in the Cisco IOS Release 12.2SX train. Support in a specific 12.2SX release of this train depends on your feature set, platform, and platform hardware.

12.4(15)T

The distance argument was added.


Usage Guidelines

External and internal discard-route entries are installed in routing tables by default. During route summarization, routing loops may occur when data is sent to a nonexisting network that appears to be a part of the summary, and the router that is performing the summarization has a less specific route (pointing back to the sending router) for this network in its routing table. To prevent the routing loop, a discard route entry is installed in the routing table of the ABR or ASBR.

If for any reason you do not want to use the external or internal discard route, remove the discard route by entering the no discard-route command with the external or internal keyword.

Release 12.2(33)SRB

If you plan to configure the Multi-Topology Routing (MTR) feature, you need to enter the discard-route command in router address family topology configuration mode in order for this OSPF router configuration command to become topology-aware.

Release 12.4(15)T

Prior to Cisco IOS Release 12.4(15)T, both external and internal discard routes were installed using the default OSPF intra-area administrative distance 110. You can now modify this default distance for discard routes by entering a new administrative distance for the distance argument of the discard-route command.

Examples

The following display shows the discard-route functionality installed by default. When external or internal routes are summarized, a summary route to Null0 will appear in the router output from the show ip route command. See the router output lines that appear in bold font:

Router# show ip route

Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP
       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area 
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
       E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP
       i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
       ia - IS-IS inter area, * - candidate default, U - per-user static route
       o - ODR, P - periodic downloaded static route

Gateway of last resort is not set

      172.16.0.0/24 is variably subnetted, 3 subnets, 2 masks
C        172.16.0.128/25 is directly connected, Loopback1
O        172.16.0.0/24 is a summary, 00:00:14, Null0
C        172.16.0.0/25 is directly connected, Loopback0
      172.31.0.0/24 is variably subnetted, 3 subnets, 2 masks
C        172.31.0.128/25 is directly connected, Loopback3
O        172.31.0.0/24 is a summary, 00:00:02, Null0
C        172.31.0.0/25 is directly connected, Loopback2
C     192.168.0.0/24 is directly connected, Ethernet0/0

Router# show ip route ospf

      172.16.0.0/24 is variably subnetted, 3 subnets, 2 masks
O        172.16.0.0/24 is a summary, 00:00:29, Null0
      172.16.0.0/24 is variably subnetted, 3 subnets, 2 masks
O        172.16.0.0/24 is a summary, 00:00:17, Null0

When the no discard-route command with the internal keyword is entered, notice the following route change, indicated by the router output lines that appear in bold font:

Router# configure terminal
Enter configuration commands, one per line.  End with CNTL/Z.
Router(config)# router ospf 1
Router(config-router)# no discard-route internal 
Router(config-router)# end

Router# show ip route ospf

      172.31.0.0/24 is variably subnetted, 3 subnets, 2 masks
O        172.16.0.0/24 is a summary, 00:04:14, Null0

Next, the no discard-route command with the external keyword is entered to remove the external discard route entry:

Router# configure terminal
Enter configuration commands, one per line.  End with CNTL/Z.
Router(config)# router ospf 1
Router(config-router)# no discard-route external 
Router(config-router)# end

The following router output from the show running-config command confirms that both the external and internal discard routes have been removed from the routing table of the router. See the router output lines that appear in bold font.

Router# show running-config

Building configuration...

Current configuration : 1114 bytes
!
version 12.2
service timestamps debug uptime
service timestamps log uptime
no service password-encryption
!
hostname Router
.
.
.
router ospf 1
 log-adjacency-changes
 no discard-route external
 no discard-route internal
 area 1 range 172.16.0.0 255.255.255.0
 summary-address 172.31.0.0 255.255.255.0
 redistribute rip subnets
 network 192.168.0.0 0.0.0.255 area 0
 network 172.16.0.0 0.0.0.255 area 1
!

Related Commands

Command
Description

show ip route

Displays the current state of the routing table.

show running-config

Displays the contents of the currently running configuration file, the configuration for a specific interface, or map class information.


local-rib-criteria

To specify that the OSPF local Routing Information Base (RIB) will be used for route validation, use the local-rib-criteria command in router configuration mode. To remove local RIB route validation, use the no form of this command.

local-rib-criteria [forwarding-address] [inter-area-summary] [nssa-translation]

no local-rib-criteria [forwarding-address] [inter-area-summary] [nssa-translation]

Syntax Description

forwarding-address

(Optional) Specifies that the local RIB is to be used only for route validation criteria for external or NSSA forwarding addresses.

inter-area-summary

(Optional) Specifies that the local RIB is to be used only for route validation criteria for inter-area summaries.

nssa-translation

(Optional) Specifies that the local RIB is to be used only for route validation criteria for NSSA translation.


Command Default

The global RIB (not the local RIB) is used for route validation.

Command Modes

Router configuration (config-router)

Command History

Release
Modification

12.4(15)T

This command was introduced.


Usage Guidelines

If the local-rib-criteria is command is entered without any optional keywords, the local RIB will be used as criteria for all of the options (forwarding address, inter-area summary, and NSSA translation).

You can enter the local-rib-criteria command with one or more of the optional keywords to configure the OSPF routing process to use the local RIB only for forwarding address, inter-area-summary, or NSSA translation route generation.


Note It is recommended to keep the default behavior (the global RIB is used for route validation). Although entering the local-rib-criteria command alone or with one or more of the optional keywords may result in slightly faster network convergence in some cases, you may potentially cause a problem such as a routing loop or black hole.



Note When the forwarding-address keyword is entered to specify that forwarding-address verification is modified to use the local RIB, packet forwarding will still be dependent on the global RIB. If the global RIB contains a more preferred or more specific route from a different protocol, this preferred route still will still be used for packet forwarding.


Examples

The following example specifies that the local RIB should be used as the criteria for NSSA translation:

router ospf 23
 local-rib-criteria nssa-translation

The following example enables all local RIB criteria options:

router ospf 1

 local-rib-criteria


The following example specifies that the local RIB will be used only for inter-area summary route generation:

router ospf 1

 local-rib-criteria inter-area-summary


show ip ospf rib

To display information for the OSPF local Routing Information Base (RIB) or locally redistributed routes, use the show ip ospf rib command in privileged EXEC mode.

show ip ospf process-id rib [redistribution] [network-prefix] [network-mask] [detail]

Syntax Description

process-id

Internally used identification parameter for an OSPF routing process. It is locally assigned and can be any positive integer. A unique value is assigned for each OSPF routing process.

redistribution

(Optional) Displays IP OSPF redistribution RIB information.

network-prefix

(Optional) Network prefix. Displays paths for a specific route.

network-mask

(Optional) IP address mask. Displays paths for all routes under a major network.

detail

(Optional) Displays more detailed information about the OSPF local RIB.


Command Modes

Privileged EXEC (#)

Command History

Release
Modification

12.4(15)T

This command was introduced.


Usage Guidelines

If the network-prefix and network-mask arguments are both entered, only the route that matches the network prefix and IP address mask is displayed. If only the prefix argument is entered, a longest prefix lookup is performed and the matching route is displayed.

Examples

The following example displays information about locally redistributed routes:

Router# show ip ospf 1 rib redistribution 192.168.240.0

OSPF Redistribution for Process 1
192.168.240/20, metric 0, tag 0, from OSPF Router 130
 Attributes 0x1000220, event 1
  via Ethernet0/0
OSPF Redistribution Process 130

Table 1 describes the significant fields shown in the display.

Table 1 show ip ospf rib redistribution Field Descriptions 

Field
Description

OSPF Redistribution for Process 1

Routing redistribution information for OSPF process 1.

192.168.240/20

Network number and mask.

metric 0

OSPF metric type.

tag 0

OSPF process tag identifier.

from OSPF Router

OSPF router from which routing information was redistributed.

Attributes 0x1000220

OSPF attribute.

event

OSPF redistribution event 1.

Via Ethernet0/0

The interface through which routing information has been redistributed.

OSPF Redistribution Process

Routing redistribution information for OSPF process 13.


Feature Information for the OSPFv2 Local RIB Feature

Table 2 lists the release history for this feature.

Not all commands may be available in your Cisco IOS software release. For release information about a specific command, see the command reference documentation.

Use Cisco Feature Navigator to find information about platform support and software image support. Cisco Feature Navigator enables you to determine which Cisco IOS and Catalyst OS software images support a specific software release, feature set, or platform. To access Cisco Feature Navigator, go to http://www.cisco.com/go/cfn. An account on Cisco.com is not required.


Note Table 2 lists only the Cisco IOS software release that introduced support for a given feature in a given Cisco IOS software release train. Unless noted otherwise, subsequent releases of that Cisco IOS software release train also support that feature.


Table 2 Feature Information for the OSPFv2 Local RIB Feature 

Feature Name
Releases
Feature Information

OSPFv2 Local RIB

12.4(15)T

With the OSPFv2 Local RIB feature, each OSPF protocol instance has its own local Routing Information Base (RIB). The OSPF local RIB serves as the primary state for OSPF SPF route computation. The global RIB is not updated with intermediate results during the SPF. Instead, the global RIB is updated only when routes are added, deleted, or changed, thereby reducing global RIB computation. This reduced update activity may result in fewer dropped packets.

This feature is enabled by default and does not need to be configured. This document describes some optional configuration tasks to modify how the global and local RIBs function, although it is recommended to keep the default settings.