Table Of Contents
Implementing OSPF on Cisco IOS XR Software
Contents
Prerequisites for Implementing OSPF on Cisco IOS XR Software
Restrictions for Implementing OSPF on Cisco IOS XR Software
Information About Implementing OSPF on Cisco IOS XR Software
OSPF Functional Overview
Key Features Supported in the Cisco IOS XR OSPF Implementation
Comparison of Cisco IOS OSPF and Cisco IOS XR OSPF Version 2
Comparison of Cisco IOS XR OSPFv3 and OSPFv2
Comparison of Cisco IOS XR OSPFv3 and Cisco IOS OSPF for IPv6
References for Information on IPv6 Routing and IPv6 Addressing
Importing Addresses into OSPFv3
OSPF Hierarchical CLI and CLI Inheritance
OSPF Routing Components
Autonomous Systems
Areas
Routers
OSPF Instance and Router ID
Supported OSPF Network Types
Route Authentication Methods for OSPF Version 2
Neighbors and Adjacency for OSPF
Designated Router for OSPF
Default Route for OSPF
Link-State Advertisement Types for OSPF Version 2
Link-State Advertisement Types for OSPFv3
Virtual Link and Transit Area for OSPF
Route Redistribution for OSPF
OSPF Shortest Path First Throttling
Nonstop Forwarding for OSPF Version 2
Load Balancing in OSPF Version 2 and OSPFv3
How to Implement OSPF on Cisco IOS XR Software
Enabling OSPF
Prerequisites
Configuring Stub and Not-so-Stubby Area Types
Configuring Neighbors for Nonbroadcast Networks
Prerequisites
Configuring Authentication at Different Hierarchical Levels for OSPF Version 2
Prerequisites
Controlling the Frequency that the Same LSA Is Originated or Accepted for OSPF
Creating a Virtual Link with MD5 Authentication to Area 0 for OSPF
Prerequisites
Examples
Summarizing Subnetwork LSAs on an OSPF ABR
Redistributing Routes from One IGP into OSPF
Prerequisites
Configuring OSPF Shortest Path First Throttling
Prerequisites
Examples
Configuring Nonstop Forwarding for OSPF Version 2
Prerequisites
Restrictions
Configuring OSPF Version 2 for MPLS Traffic Engineering
Prerequisites
Restrictions
Examples
Verifying OSPF Configuration and Operation
Configuration Examples for Implementing OSPF on Cisco IOS XR Software
Comparison of Cisco IOS and Cisco IOS XR for OSPF Version 2: Example
CLI Inheritance and Precedence for OSPF Version 2: Example
MPLS TE for OSPF Version 2: Example
ABR with Summarization for OSPFv3: Example
ABR Stub Area for OSPFv3: Example
ABR Totally Stub Area for OSPFv3: Example
Route Redistribution for OSPFv3: Example
Virtual Link Configured Through Area 1 for OSPFv3: Example
Virtual Link Configured with MD5 Authentication for OSPF Version 2: Example
Where to Go Next
Additional References
Related Documents
Standards
RFCs
Technical Assistance
Implementing OSPF on Cisco IOS XR Software
Open Shortest Path First (OSPF) is an Interior Gateway Protocol (IGP) developed by the OSPF working group of the Internet Engineering Task Force (IETF). Designed expressly for IP networks, OSPF supports IP subnetting and tagging of externally derived routing information. OSPF also allows packet authentication and uses IP multicast when sending and receiving packets.
Implementing OSPF version 3 (OSPFv3) expands on OSPF Version 2, to provide support for IPv6 routing prefixes.
This module describes the concepts and tasks you need to implement both versions of OSPF on your Cisco IOS XR router. The term "OSPF" will imply both versions of the routing protocol, unless otherwise noted.
Note
For a complete description of the OSPF commands listed in this chapter, refer to the "OSPF Commands on Cisco IOS XR Software" and "OSPFv3 Commands on Cisco IOS XR Software" modules in the Cisco IOS XR Routing Command Reference publication. To locate documentation for other commands that might appear in this chapter, search in the individual index documents associated with the appropriate software product, such as the IP Security Software Product.
Feature History for Implementing OSPF on Cisco IOS XR Software
Release
|
Modification
|
Release 2.0
|
This feature was introduced.
|
Contents
•
Prerequisites for Implementing OSPF on Cisco IOS XR Software
•
Restrictions for Implementing OSPF on Cisco IOS XR Software
•
Information About Implementing OSPF on Cisco IOS XR Software
•
How to Implement OSPF on Cisco IOS XR Software
•
Configuration Examples for Implementing OSPF on Cisco IOS XR Software
•
Where to Go Next
•
Additional References
Prerequisites for Implementing OSPF on Cisco IOS XR Software
The following are prerequisites for implementing OSPF on Cisco IOS XR Software:
•
You must be a member of a user group associated with the proper task IDs for routing commands. Task IDs for commands are listed in the Cisco IOS XR Task ID Reference Guide.
•
This document assumes that you are familiar with OSPF on Cisco IOS software. Refer to the publications listed in the "Related Documents" section for additional OSPF configuration and command reference information.
•
Configuration tasks for OSPFv3 assumes that you are familiar with IPv6 addressing and basic configuration. Refer to the Implementing Basic Connectivity for IPv6 module for more information.
•
Before you enable OSPFv3 on an interface, you must perform the following tasks:
–
Complete the OSPF network strategy and planning for your IPv6 network. For example, you must decide whether multiple areas are required.
–
Enable IPv6 on the interface.
•
Configuring authentication (IP Security) is an optional task. If you choose to configure authentication, you must first decide whether to configure plain text or Message Digest 5 (MD5) authentication, and whether the authentication applies to an entire area or specific interfaces.
Note
Authentication (IP Security) for OSPFv3 is not supported in this software release.
Restrictions for Implementing OSPF on Cisco IOS XR Software
To access the OSPF and OSPFv3 command-line interface (CLI) configuration, you must belong to a task group associated with the ospf task ID. Please contact your system administrator for access permission.
Information About Implementing OSPF on Cisco IOS XR Software
To implement OSPF you need to understand the following concepts:
•
OSPF Functional Overview
•
Key Features Supported in the Cisco IOS XR OSPF Implementation
•
Comparison of Cisco IOS OSPF and Cisco IOS XR OSPF Version 2
•
Comparison of Cisco IOS XR OSPFv3 and OSPFv2
•
Comparison of Cisco IOS XR OSPFv3 and Cisco IOS OSPF for IPv6
•
References for Information on IPv6 Routing and IPv6 Addressing
•
Importing Addresses into OSPFv3
•
OSPF Hierarchical CLI and CLI Inheritance
•
OSPF Routing Components
•
OSPF Instance and Router ID
•
Supported OSPF Network Types
•
Route Authentication Methods for OSPF Version 2
•
Neighbors and Adjacency for OSPF
•
Designated Router for OSPF
•
Default Route for OSPF
•
Link-State Advertisement Types for OSPF Version 2
•
Link-State Advertisement Types for OSPFv3
•
Virtual Link and Transit Area for OSPF
•
Route Redistribution for OSPF
•
OSPF Shortest Path First Throttling
•
Nonstop Forwarding for OSPF Version 2
•
Load Balancing in OSPF Version 2 and OSPFv3
OSPF Functional Overview
OSPF is a routing protocol for IP. It is a link-state protocol, as opposed to a distance-vector protocol. A link-state protocol makes its routing decisions based on the states of the links that connect source and destination machines. The state of the link is a description of that interface and its relationship to its neighboring networking devices. The interface information includes the IP address of the interface, the network mask, the type of network it is connected to, the routers connected to that network, and so on. This information is propagated in various type of link-state advertisements (LSAs).
A router's collection of LSA data is stored in a link-state database. The contents of the database, when subjected to the Dijkstra algorithm, extracts data to create an OSPF routing table. The difference between the database and the routing table is that the database contains a complete collection of raw data; the routing table contains a list of shortest paths to known destinations via specific router interface ports.
OSPF is the most popular IGP because it scales to large networks and it uses areas to implement hierarchy in the network. A networking device belongs to one or more areas in a network. All of the networking devices in an area maintain the same complete database information about the link states in their area only. They do not know about all the link states in the network. The agreement of the database information among the routers in the area is called convergence.
At the intradomain level, OSPF can import routes learned via Intermediate System-to-Intermediate System (IS-IS). OSPF routes can also be exported into IS-IS. At the interdomain level, OSPF can import routes learned via Border Gateway Protocol (BGP). OSPF routes can be exported into BGP.
Unlike Routing Information Protocol (RIP), OSPF does not provide periodic routing updates. Upon becoming neighbors, OSPF routers establish an adjacency by exchanging and synchronizing their databases. After that, only changed routing information are propagated. Every networking device in an area advertises the costs and states of its links, sending this information in an LSA. This state information is sent to the router one hop away. This router sends the state information unchanged to the next hop. This flooding process continues until all the devices in the area have the same link-state database.
To determine the best route to a destination, the software sums all of the costs of the links in a route to a destination. After each networking device has received routing information from the other networking devices, each networking device runs the shortest path first (SPF) algorithm to calculate the best path to each destination network in the database.
The networking devices running OSPF detect topological changes in the network, flood link-state updates to neighbors, and quickly converge on a new view of the topology. Each OSPF networking device in the network soon has the same topology view again. OSPF allows multiple equal-cost paths to the same destination.
On broadcast and nonbroadcast multiaccess (NBMA) networks, the designated router (DR) or backup DR performs the LSA flooding. On point-to-point networks, flooding simply goes out an interface directly to a neighbor.
OSPF runs directly on top of IP; it does not use TCP or User Datagram Protocol (UDP). OSPF performs its own error correction by means of checksums in its packet header and in its LSAs. However, you must still configure at least one IP address, which enables IP.
In OSPFv3, the fundamental concepts are the same as OSPF Version 2, except that support is added for the increased address size of IPv6. New LSA types are created to carry IPv6 addresses and prefixes, and the protocol runs on a per-link basis rather than on a per-IP-subnet basis.
OSPF typically requires coordination among many internal routers: Area Border Routers (ABRs), which are routers connected to multiple areas, and Autonomous System Border Routers (ASBRs). At a minimum, OSPF-based routers or access servers can be configured with all default parameter values, no authentication, and interfaces assigned to areas. If you intend to customize your environment, you must ensure coordinated configurations of all routers.
Key Features Supported in the Cisco IOS XR OSPF Implementation
The Cisco IOS XR implementation of OSPF conforms to the OSPF Version 2 and OSPF Version 3 specifications detailed in the Internet RFC 2328 and RFC 2740, respectively.
The following key features are supported in the Cisco IOS XR implementation:
•
Hierarchy—CLI hierarchy is supported.
•
Inheritance—CLI inheritance is supported.
•
Stub areas—Definition of stub areas is supported.
•
NSF—Nonstop forwarding is supported.
•
SPF throttling—Shortest path first throttling feature is supported.
•
Route redistribution—Routes learned via any IP routing protocol can be redistributed into any other IP routing protocol.
•
Authentication—Plain text and MD5 authentication among neighboring routers within an area is supported. (MD5 is not supported for the OSPFv3 protocol.)
•
Routing interface parameters—Configurable parameters supported include interface output cost, retransmission interval, interface transmit delay, router priority, router "dead" and hello intervals, and authentication key.
•
Virtual links—Virtual links are supported.
•
Not-so-stubby area (NSSA)—RFC 1587 is supported.
•
OSPF over demand circuit—RFC 1793 is supported.
Comparison of Cisco IOS OSPF and Cisco IOS XR OSPF Version 2
The key differences between the Cisco IOS OSPF feature and OSPF on Cisco IOS XR software are as follows:
•
Flat, nonhierarchical CLI in Cisco IOS OSPF is replaced with a CLI that is hierarchically structured, providing for ease of configuration and network management tasks.
•
CLI inheritance is supported in Cisco IOS XR OSPF that simplifies configuration management tasks for users.
•
The area command is a submode of router configuration mode and the interface command is a submode of the area submode:
router ospf 1
area 0
interface POS 0/1/0/1
•
Areas must be explicitly configured. The area command is used to enter area configuration mode and to configure OSPF areas and parameters.
•
In Cisco IOS software, interfaces are configured with the network area command for a single OSPF area. In Cisco IOS XR software, the interface command performs this functionality. Interface-specific parameters are now configured explicitly and are considered to be bound to an area.
•
The interface command is configured only by interface type and number.
•
The neighbor command is used to configure neighbors as in Cisco IOS software; however, the neighbor command becomes a configuration command under interface configuration mode.
•
All area commands no longer have an area command prefix. For example, the area authentication command is now the authentication command.
•
All interface configuration commands no longer have an ip ospf command prefix. For example, the ip ospf cost command is now the cost command.
•
Cisco IOS XR software supports SONET (POS) (point-to-point) and GigEthernet. POS can also be configured as nonbroadcast.
•
Point-to-multipoint, broadcast networks (ATM and Frame Relay) are not supported.
•
The timers spf command is similar to the Cisco IOS timers throttle spf command.
Comparison of Cisco IOS XR OSPFv3 and OSPFv2
Much of the OSPFv3 protocol is the same as in OSPFv2. OSPFv3 is described in RFC 2740.
The key differences between the Cisco IOS XR OSPFv3 protocol and the OSPFv2 are as follows:
•
OSPFv3 expands on OSPFv2 to provide support for IPv6 routing prefixes and the larger size of IPv6 addresses.
•
When using an NBMA interface in OSPFv3, users must manually configure the router with the list of neighbors. Neighboring routers are identified by the link local address of the attached interface of the neighbor.
•
Unlike in OSPFv2, multiple instances of OSPFv3 can be run on a link.
•
LSAs in OSPFv3 are expressed as "prefix and prefix length" instead of "address and mask."
•
The router ID is a 32-bit number with no relationship to an IPv6 address.
•
OSPFv3 does not support route maps, but routing policy language (RPL) will be supported in a future release of Cisco IOS XR software.
Comparison of Cisco IOS XR OSPFv3 and Cisco IOS OSPF for IPv6
The key differences between the Cisco IOS XR OSPFv3 feature and Cisco IOS OSPF for IPv6 are as follows:
•
Cisco IOS XR uses hierarchical CLI that groups related network component information at defined levels such as at the router, area, and interface levels. Hierarchical CLI allows for easier maintenance and troubleshooting of OSPFv3 configurations.
•
In Cisco IOS XR software, the term "OSPFv3" is used to indicate OSPF for IPv6 in the CLI and configuration tasks. Cisco IOS software uses the "OSPF for IPv6" term in documents and the ipv6 keyword is prepended to commands.
•
The following OSPFv3 features are not supported in this initial Cisco IOS XR software release:
–
Authentication (IP Security)
–
Simple Network Management Protocol (SNMP) OSPFv3 MIB
–
NSF
–
MPLS traffic engineering (MPLS TE)
–
MPLS Virtual Private Network (VPN)
–
XML configuration
–
RPL
–
Placement of OSPFv3 on arbitrary nodes—all OSPFv3 instances must be on the same node
–
Graceful shutdown
–
Interarea-prefix LSAs for ABRs (Type 3)
–
Incremental SPF
References for Information on IPv6 Routing and IPv6 Addressing
By default, IPv6 routing is disabled in the Cisco IOS XR software. To enable IPv6 routing, you must assign IPv6 addresses to individual interfaces in the router.
To learn more about IPv6 routing and addressing, refer to the following documents and links:
•
Cisco IOS Release 12.3 documentation:
http://www.cisco.com/univercd/cc/td/doc/product/software/ios122/122newft/122t/122t13/ipv6/
•
Implementing Basic Connectivity for IPv6 module for Cisco IOS Release 12.3:
http://www.cisco.com/univercd/cc/td/doc/product/software/ios122/122newft/122t/122t13/ipv6/
•
The website on Cisco.com for information on the Cisco implementation of and training for IPv6:
http://www.cisco.com/warp/public/732/Tech/ipv6
Importing Addresses into OSPFv3
When importing the set of addresses specified on an interface on which OSPFv3 is running into OSPFv3, users cannot select specific addresses to be imported. Either all addresses are imported, or no addresses are imported.
OSPF Hierarchical CLI and CLI Inheritance
Cisco IOS XR software introduces new OSPF configuration fundamentals consisting of hierarchical CLI and CLI inheritance.
Hierarchical CLI is the grouping of related network component information at defined hierarchical levels such as at the router, area, and interface levels. Hierarchical CLI allows for easier maintenance and troubleshooting of OSPF configurations. When configuration commands are displayed together in their hierarchical context, visual inspections are simplified. Hierarchical CLI is intrinsic for CLI inheritance to be supported.
With CLI inheritance support, you need not explicitly configure a parameter for an area or interface. In Cisco IOS XR, the parameters of interfaces in the same area can be exclusively configured with a single command, or parameter values can be inherited from a higher hierarchical level—such as from the area configuration level or the router ospf configuration levels.
For example, the hello interval value for an interface is determined by this precedence "IF" statement:
If the hello interval command is configured at the interface configuration level, then use the interface configured value, else
If the hello interval command is configured at the area configuration level, then use the area configured value, else
If the hello interval command is configured at the router ospf configuration level, then use the router ospf configured value, else
Use the default value of the command.
Tip
Understanding hierarchical CLI and CLI inheritance will save you considerable configuration time. See the "Configuring Authentication at Different Hierarchical Levels for OSPF Version 2" task to understand how to implement these fundamentals. In addition, Cisco IOS versus Cisco IOS XR examples are provided in the "Configuration Examples for Implementing OSPF on Cisco IOS XR Software" section.
OSPF Routing Components
Before implementing OSPF, you must know what the routing components are and what purpose they serve. They consist of the autonomous system, area types, the ABR, and the ASBR.
Figure 1 illustrates the routing components in an OSPF network topology.
Figure 1 OSPF Routing Components
Autonomous Systems
The autonomous system is a collection of networks, under the same administrative control, that share routing information with each other. An autonomous system is also referred to as a routing domain. Figure 1 shows two autonomous systems: A and B. An autonomous system can consist of one or more OSPF areas.
Areas
Areas allow the subdivision of an autonomous system into smaller, more manageable networks or sets of adjacent networks. As shown in Figure 1, autonomous system A consists of three areas: Area 0, Area 1, and Area 2.
OSPF hides the topology of an area from the rest of the autonomous system. An area's network topology is visible only to routers inside that area. When OSPF routing is within an area, it is called intraarea routing. This routing limits the amount of link-state information flooding onto the network, reducing routing traffic. It also reduces the size of the topology information in each router, conserving processing and memory requirements in each router.
Conversely, the routers within an area cannot see detailed network structures outside the area. Because of this restriction of topological information, you can control traffic flow between areas and reduce routing traffic when the entire autonomous system is a single routing domain.
Backbone Area
A backbone area is responsible for distributing routing information between multiple areas of an autonomous system. OSPF routing occurring outside of an area is called interarea routing.
The backbone itself has all the properties of an area. It consists of ABRs, and routers and networks only on the backbone. As shown in Figure 1, Area 0 is an OSPF backbone area. Any OSPF backbone area has a reserved area ID of 0.0.0.
Stub Area
A stub area is an area that does not accept or distribute detailed network information external to the area. A stub area has only one router that interfaces the area to the rest of the autonomous system. The stub ABR router advertises a single default route to external destinations into the area. Routers within a stub area use this route for destinations outside the autonomous system, and for interarea routes. This relationship conserves LSA database space that would otherwise be used to store external LSAs flooded into the area. In Figure 1, Area 2 is a stub area that is reached only through ABR 2. Area 0 cannot be a stub area.
Not-so-Stubby Area
An NSSA is similar to the stub area. NSSA does not flood Type 5 external LSAs from the core into the area, but can import autonomous system external routes in a limited fashion within the area.
NSSA allows importing of Type 7 autonomous system external routes within NSSA area by redistribution. These Type 7 LSAs are translated into Type 5 LSAs by NSSA ABRs, which are flooded throughout the whole routing domain. Summarization and filtering are supported during the translation.
Use NSSA to simplify administration if you are a network administrator that must connect a central site using OSPF to a remote site that is using a different routing protocol.
Prior to NSSA, the connection between the corporate site border router and the remote router could not be run as an OSPF stub area because routes for the remote site could not be redistributed into a stub area, and two routing protocols needed to be maintained. A simple protocol like RIP was usually run and handled the redistribution. With NSSA, you can extend OSPF to cover the remote connection by defining the area between the corporate router and the remote router as an NSSA. Area 0 cannot be an NSSA.
Routers
The OSPF network is composed of ABRs, ASBRs, and interior routers.
Area Border Routers
ABRs are routers with multiple interfaces that connect directly to networks in two or more areas. An ABR runs a separate copy of the OSPF algorithm and maintains separate routing data for each area that is connected to it, including the backbone area. ABRs also send configuration summaries for their attached areas to the backbone area, which then distributes this information to other OSPF areas in the autonomous system. In Figure 1, there are two ABRs. ABR 1 interfaces Area 1 to the backbone area. ABR 2 interfaces the backbone Area 0 to Area 2, a stub area.
Autonomous System Boundary Routers
ASBRs provide connectivity from one autonomous system to another system. ASBRs exchange their autonomous system routing information with boundary routers in other autonomous systems. Every router inside an autonomous system knows how to reach the boundary routers for its autonomous system.
ASBRs can import external routing information from other protocols like BGP and redistribute them as AS-external (ASE) Type 5 LSAs to the OSPF network. If the Cisco IOS XR router is an ASBR, you can configure it to advertise VIP addresses for content as autonomous system external routes. In this way, ASBRs flood information about external networks to routers within the OSPF network.
ASBR routes can be advertised as a Type 1 or Type 2ASE. The difference between Type 1 and Type 2 is how the cost is calculated. For a Type 2 ASE, only the external cost (metric) is considered when multiple paths to the same destination are compared. For a Type 1 ASE, the combination of the external cost and the cost to reach the ASBR is used. Type 2 external cost is the default and is always more costly than an OSPF route and is used only if no OSPF route exists.
Interior Routers
The interior routers (such as R1 in Figure 1) do not redistribute routes on all interfaces under a single area.
OSPF Instance and Router ID
An OSPF instance (also known as an OSPF process) can be considered a logical routing entity running OSPF in a physical router. This logical routing entity should not be confused with the logical routing feature that allows a system administrator (known as the Cisco IOS XR Owner) to partition the physical box into separate routers.
A physical router can run multiple instances of OSPF, although the only reason to do so would be to connect two or more OSPF domains. Each instance has its own link-state database. The routes in the routing table are calculated from the link-state database. One instance of OSPF does not share routes with another instance of OSPF unless the routes are redistributed.
Each OSPF instance is identified by a router ID. OSPFv2 will obtain a router ID from the following sources, in order of decreasing preference:
1.
The 32-bit numeric value specified by the OSPF router-id command in router configuration mode. (This value can be any 32-bit value. It is not restricted to the IPv4 addresses assigned to interfaces on this router, and need not be a routable IPv4 address.)
2.
The primary IPv4 address of the interface specified by the OSPF router-id command.
3.
The 32-bit numeric value specified by the router-id command in global configuration mode. (This value must be an IPv4 address assigned to an interface on this router.)
4.
The primary IPv4 address of the interface specified by the router-id command in global configuration mode.
5.
The highest IPv4 address assigned to any loopback interface.
6.
The primary IPv4 address of an interface over which this instance of OSPF is running.
We recommend that the router ID be set by the router-id command. Separate instances of OSPF could share the same router ID, but they must be specified in separate routing domains.
Supported OSPF Network Types
OSPF classifies different media into the following three types of networks by default:
•
NBMA networks (POS)
•
Point-to-point networks (POS)
•
Broadcast networks (GigEthernet)
You can configure your Cisco IOS XR network as either a broadcast or an NBMA network. Using this feature, you can configure broadcast networks as NBMA networks when, for example, you have routers in your network that do not support multicast addressing.
Route Authentication Methods for OSPF Version 2
OSPF Version 2 supports two types of route authentication: plain text authentication and MD5 authentication. By default, no authentication is enabled (referred to as null authentication in RFC 2178).
Note
The authentication feature is not supported for OSPFv3 in this initial Cisco IOS XR software release.
Both plain text and MD5 authentication are performed on changed routing information that arrive on an interface. The sender and receiver must know the authentication password or key. For both types of authentication, a router sends a routing update packet with a key and corresponding key number. The receiving router checks the key number and key against its own stored key number and key. If the key numbers and keys match, the router accepts the routing update packet. If they do not match, the routing update is discarded.
Plain Text Authentication
Plain text authentication (also known as Type 1 authentication) uses a password that travels on the physical medium and is easily visible to someone that does not have access permission and could use the password to infiltrate a network. Therefore, plain text authentication does not provide security. It might protect against a faulty implementation of OSPF or a misconfigured OSPF interface trying to send erroneous OSPF packets.
MD5 Authentication
MD5 authentication provides a means of security. No password travels on the physical medium. Instead, the networking device uses MD5 to produce a message digest of the OSPF packet plus the key, which is sent on the physical medium. Using MD5 authentication prevents a router from accepting unauthorized or deliberately malicious routing updates, which could compromise your network security by diverting your traffic.
MD5 authentication supports multiple keys, requiring that a key number be associated with a key.
Authentication Strategies
Authentication can be specified for an entire instance or area, or on an interface or a virtual link. An interface or virtual link can be configured for only one type of authentication, not both. Authentication configured for an interface or virtual link overrides authentication configured for the area or instance.
If you intend for all interfaces in an area to use the same type of authentication, you can configure fewer commands if you use the area authentication command (and specify the message-digest keyword if you want the entire area to use MD5 authentication). This strategy requires fewer commands than specifying authentication for each interface.
Key Rollover
In case you want to configure a new plain text key or MD5 key, there must be a way to do a key rollover to switch from the old key to the new key without disrupting communication. As a network administrator configures the new key into the multiple networking devices that communicate, a time period exists when different devices are using both a new key and an old key. If an interface is configured with a new key, the software sends two copies of the same packet, each authenticated by the old key and the new key. The software tracks which devices start using the new key, and the software stops sending duplicate packets once it detects that all of its neighbors are using the new key. The software then discards the old key. The network administrator must then remove the old key from each router's configuration file.
Neighbors and Adjacency for OSPF
Routers that share a segment (Layer 2 link between two interfaces) become neighbors on that segment. OSPF uses the hello protocol, periodically sending hello packets out each interface. Routers become neighbors when they see themselves listed in the neighbor's hello packet. After two routers are neighbors, they may proceed to exchange and synchronize their databases, which creates an adjacency. Not all neighboring routers have an adjacency.
Designated Router for OSPF
On point-to-point and point-to-multipoint networks, the Cisco IOS XR software floods routing updates to immediate neighbors. There is no DR or backup DR (BDR); all routing information is flooded to each networking device.
On broadcast or NBMA segments only, OSPF minimizes the amount of information being exchanged on a segment by choosing one router to be a DR and one router to be a BDR. Thus, the routers on the segment have a central point of contact for information exchange. Instead of each router changing routing updates with every other router on the segment, each router exchanges information with the DR and BDR. The DR and BDR relay the information to the other routers.
The software looks at the priority of the routers on the segment to determine which routers will be the DR and BDR. The router with the higher priority is elected the DR. If there is a tie, then the router with the higher router ID takes precedence. After the DR is elected, the BDR is elected the same way. A router with a router priority set to zero is ineligible to become the DR or BDR.
Note
Point-to-multipoint networks are not supported for this Cisco IOS XR software release.
Default Route for OSPF
In a regular area, a router generates Type 5 LSAs, which go through Area 0 to other regular areas.
Unlike in a regular area, routing between a stub area and Area 0 is based on a default route. In a stub area, a router generates a default route of 0/0 to the ABR. Likewise, from Area 0 to the ABR a default route of 0/0 is sent to the routers in the stub area. The cost of the default route is 1 (default) or is determined by the value specified in the default-cost command.
Link-State Advertisement Types for OSPF Version 2
Each of the following LSA types has a different purpose:
•
Router LSA (Type 1)—Describes the link state and costs of a router's links to the area. These LSAs are flooded within an area only. The LSA indicates if the router can compute paths based on quality of service (QoS), if it is an ABR or ASBR, and if it is one end of a virtual link. Type 1 LSAs are also used to advertise stub networks.
•
Network LSA (Type 2)—Describes the link state and cost information for all routers attached to the network. This LSA is an aggregation of all the link state and cost information in the network. Only a designated router tracks this information and can generate a network LSA.
•
Summary LSA for ABRs (Type 3)—Advertises internal networks to routers in other areas (interarea routes). Type 3 LSAs may represent a single network or a set of networks summarized into one advertisement. Only ABRs generate summary LSAs.
•
Summary LSA for ASBRs (Type 4)—Advertises the location of an ASBR. Routers that are trying to reach an external network use these advertisements to determine the best path to the next hop. ASBRs generate Type 4 LSAs.
•
Autonomous system external LSA (Type 5)—Redistributes routes from another autonomous system, usually from a different routing protocol into OSPF.
Link-State Advertisement Types for OSPFv3
Each of the following LSA types has a different purpose:
•
Router LSA (Type 1)—Describes the link state and costs of a router's links to the area. These LSAs are flooded within an area only. The LSA indicates if the router is an ABR or ASBR, and if it is one end of a virtual link. Type 1 LSAs are also used to advertise stub networks. In OSPFv3, these LSAs have no address information and are network-protocol-independent. In OSPFv3, router interface information may be spread across multiple router LSAs. Receivers must concatenate all router LSAs originated by a given router when the receiver is running the SPF calculation.
•
Network LSA (Type 2)—Describes the link state and cost information for all routers attached to the network. This LSA is an aggregation of all the link state and cost information in the network. Only a designated router tracks this information and can generate a network LSA. In OSPFv3, network LSAs have no address information and are network-protocol-independent.
•
Interarea-prefix LSA for ABRs (Type 3)—Advertises internal networks to routers in other areas (interarea routes). Type 3 LSAs may represent a single network or a set of networks summarized into one advertisement. Only ABRs generate Type 3 LSAs. In OSPFv3, addresses for these LSAs are expressed "prefix and prefix length" instead of "address and mask". The default route is expressed as a prefix with length 0.
•
Interarea-router LSA for ASBRs (Type 4)—Advertises the location of an ASBR. Routers that are trying to reach an external network use these advertisements to determine the best path to the next hop. ASBRs generate Type 4 LSAs.
•
Autonomous system external LSA (Type 5)—Redistributes routes from another autonomous system, usually from a different routing protocol into OSPF. In OSPFv3, addresses for these LSAs are expressed as "prefix and prefix length" instead of "address and mask. The default route is expressed as a prefix with length 0.
•
Link LSA (Type 8)—Has local-link flooding scope and is never flooded beyond the link with which it is associated. Link LSAs provide the link-local address of the router to all other routers attached to the link, inform other routers attached to the link of a list of IPv6 prefixes to associate with the link, and allow the router to assert a collection of Options bits to associate with the network LSA that will be originated for the link.
•
Intra-area-prefix LSAs (Type 9)—A router can originate multiple intra-area-prefix LSAs for each router or transit network, each with a unique link-state ID. The link-state ID for each intra-area-prefix LSA describes its association to either the router LSA or the network LSA and contains prefixes for stub and transit networks.
An address prefix occurs in almost all newly defined LSAs. The prefix is represented by three fields: Prefix Length, Prefix Options, and Address Prefix. In OSPFv3, addresses for these LSAs are expressed as "prefix and prefix length" instead of "address and mask". The default route is expressed as a prefix with length 0.
Inter-area-prefix and intra-area-prefix LSAs carry all IPv6 prefix information that, in IPv4, is included in router LSAs and network LSAs. The Options field in certain LSAs (router LSAs, network LSAs, interarea-router LSAs, and link LSAs) has been expanded to 24 bits to provide support for OSPF in IPv6.
In OSPFv3, the sole function of link-state ID in interarea-prefix LSAs, interarea-router LSAs, and autonomous system external LSAs is to identify individual pieces of the link-state database. All addresses or router IDs that are expressed by the link-state ID in OSPF Version 2 are carried in the body of the LSA in OSPFv3.
Virtual Link and Transit Area for OSPF
In OSPF, all areas must be connected to the backbone area, known as Area 0. There might be occasions when an area must be defined, but it cannot be connected to Area 0. Examples of such an occasion might be if your company makes a new acquisition that includes an OSPF area, or if Area 0 itself is partitioned.
In the case where an area cannot be connected to Area 0, you must configure a virtual link between that area and Area 0. The two endpoints of a virtual link are ABRs, and the virtual link must be configured in both routers. The nonbackbone area that the two routers belong to is called a transit area. A virtual link specifies the transit area and the router ID of the other virtual endpoint (the other ABR).
A virtual link cannot be configured through a stub area or NSSA.
Figure 2 illustrates a virtual link from Area 3 to Area 0.
Figure 2 Virtual Link to Area 0
Route Redistribution for OSPF
Redistribution allows different routing protocols to exchange routing information. This technique can be used to allow connectivity to span multiple routing protocols. It is important to remember that the redistribute command controls redistribution into an instance of OSPF and not out of OSPF. See the "Configuration Examples for Implementing OSPF on Cisco IOS XR Software" section for an example of route redistribution for OSPF.
OSPF Shortest Path First Throttling
OSPF SPF throttling makes it possible to configure SPF scheduling in millisecond intervals and to potentially delay SPF calculations during network instability. SPF is scheduled to calculate the Shortest Path Tree (SPT) when there is a change in topology. One SPF run may include multiple topology change events.
The interval at which the SPF calculations occur is chosen dynamically and is based on the frequency of topology changes in the network. The chosen interval is within the boundary of the user-specified value ranges. If network topology is unstable, SPF throttling calculates SPF scheduling intervals to be longer until topology becomes stable.
SPF calculations occur at the interval set by the timers throttle spf command. The wait interval indicates the amount of time to wait until the next SPF calculation occurs. Each wait interval after that calculation is twice as long as the previous until the wait interval reaches the maximum wait time specified.
The SPF timing can be better explained using an example. In this example the start interval is set at 5 milliseconds (ms), the initial wait interval at 1000 ms, and the maximum wait time at 90,000 ms.
Figure 3 shows the intervals at which the SPF calculations occur so long as at least one topology change event is received in a given wait interval.
Figure 3 SPF Calculation Intervals Set by the timers spf Command
Notice that the wait interval between SPF calculations doubles when at least one topology change event is received during the previous wait interval. Once the maximum wait time is reached, the wait interval remains the same until the topology stabilizes and no event is received in that interval.
If the first topology change event is received after the current wait interval, the SPF calculation is delayed by the amount of time specified as the start interval. The subsequent wait intervals continue to follow the dynamic pattern.
If the first topology change event occurs after the maximum wait interval begins, the SPF calculation is again scheduled at the start interval and subsequent wait intervals are reset according the parameters specified in the timers throttle spf command. Notice in Figure 4 that a topology change event was received after the start of the maximum wait time interval and that the SPF intervals have been reset.
Figure 4 Timer Intervals Reset After Topology Change Event
Nonstop Forwarding for OSPF Version 2
Cisco IOS XR NSF for OSPF Version 2 allows for the forwarding of data packets to continue along known routes while the routing protocol information is being restored following a failover. With NSF, peer networking devices do not experience routing flaps. During failover, data traffic is forwarded through intelligent line cards while the standby Route Processor (RP) assumes control from the failed RP. The ability of line cards to remain up through a failover and to be kept current with the Forwarding Information Base (FIB) on the active RP is key to Cisco IOS XR NSF operation.
The routing protocols, such as OSPF, run only on the active RP or DRP and receive routing updates from their neighbor routers. When an OSPF NSF-capable router performs an RP failover, it must perform two tasks in order to resynchronize its link-state database with its OSPF neighbors. First, it must relearn the available OSPF neighbors on the network without causing a reset of the neighbor relationship. Second, it must reacquire the contents of the link-state database for the network.
As quickly as possible after an RP failover, the NSF-capable router sends an OSPF NSF signal to neighboring NSF-aware devices. Neighbor networking devices recognize this signal as a cue that the neighbor relationship with this router should not be reset. As the NSF-capable router receives signals from other routers on the network, it can begin to rebuild its neighbor list.
Once neighbor relationships are reestablished, the NSF-capable router begins to resynchronize its database with all of its NSF-aware neighbors. At this point, the routing information is exchanged between the OSPF neighbors. Once this exchange is complete, the NSF-capable device uses the routing information to remove stale routes, update the RIB, and update the FIB with the new forwarding information. The OSPF protocols are then fully converged.
Load Balancing in OSPF Version 2 and OSPFv3
When a router learns multiple routes to a specific network by using multiple routing processes (or routing protocols), it installs the route with the lowest administrative distance in the routing table. Sometimes the router must select a route from among many learned by using the same routing process with the same administrative distance. In this case, the router chooses the path with the lowest cost (or metric) to the destination. Each routing process calculates its cost differently; the costs may need to be manipulated in order to achieve load balancing.
OSPF performs load balancing automatically. If OSPF finds that it can reach a destination through more than one interface and each path has the same cost, it installs each path in the routing table. The only restriction on the number of paths to the same destination is controlled by the maximum-paths command. The default number of maximum paths is 32, and the range is from 1 to 32.
How to Implement OSPF on Cisco IOS XR Software
This section contains the following procedures:
•
Enabling OSPF (required)
•
Configuring Stub and Not-so-Stubby Area Types (optional)
•
Configuring Neighbors for Nonbroadcast Networks (optional)
•
Configuring Authentication at Different Hierarchical Levels for OSPF Version 2 (optional)
•
Controlling the Frequency that the Same LSA Is Originated or Accepted for OSPF (optional)
•
Creating a Virtual Link with MD5 Authentication to Area 0 for OSPF (optional)
•
Summarizing Subnetwork LSAs on an OSPF ABR (optional)
•
Redistributing Routes from One IGP into OSPF (optional)
•
Configuring OSPF Shortest Path First Throttling (optional)
•
Configuring Nonstop Forwarding for OSPF Version 2 (optional)
•
Configuring OSPF Version 2 for MPLS Traffic Engineering (optional)
•
Verifying OSPF Configuration and Operation (optional)
Enabling OSPF
This task explains how to perform the minimum OSPF configuration on your router that is to enable an OSPF process with a router ID, configure a backbone or nonbackbone area, and then assign one or more interfaces on which OSPF will run.
Prerequisites
Although you can configure OSPF before you configure an IP address, no OSPF routing will occur until at least one IP address is configured.
SUMMARY STEPS
1.
configure
2.
router ospf instance-name
or
router ospfv3 instance-name
3.
router-id {ipv4-address | interface-type interface-number}
4.
area area-id
5.
interface type number
6.
Repeat Step 5 for each interface that will use OSPF.
7.
log adjacency changes [detail] [enable | disable]
8.
end
or
commit
DETAILED STEPS
| |
Command or Action
|
Purpose
|
Step 1
|
configure
Example:
RP/0/RP0/CPU0:router# configure
|
Enters global configuration mode.
|
Step 2
|
router ospf instance-name
or
router ospfv3 instance-name
Example:
RP/0/RP0/CPU0:router(config)# router ospf 1
or
RP/0/RP0/CPU0:router(config)# router ospfv3 1
|
Enables OSPF routing for the specified routing instance, and places the router in router configuration mode.
or
Enables OSPFv3 routing for the specified routing instance, and places the router in router ospfv3 configuration mode.
Note The instance-name argument is any alphanumeric string no longer than 40 characters.
|
Step 3
|
router-id {ipv4-address | interface-type
interface-number}
Example:
RP/0/RP0/CPU0:router(config-router)# router-id
192.168.4.3
|
Configures a router ID for the OSPF process.
Note This identifier of the router acts as a stable IP address and is recommended rather than using the default IP address.
|
Step 4
|
area area-id
Example:
RP/0/RP0/CPU0:router(config-router)# area 0
|
Enters area configuration mode and configures an area for the OSPF process.
• Backbone areas have an area ID of 0.
• Nonbackbone areas have a nonzero area ID.
• The area-id argument can be entered in dotted-decimal or IPv4 address notation, such as area 1000 or area 0.0.3.232. However, you must choose one form or the other for an area.
|
Step 5
|
interface type number
Example:
RP/0/RP0/CPU0:router(config-ospf-ar)# interface
POS 0/1/0/3
|
Enters interface configuration mode and associates one or more interfaces for the area configured in Step 4.
|
Step 6
|
Repeat Step 5 for each interface that will use OSPF.
|
—
|
Step 7
|
log adjacency changes [detail] [enable |
disable]
Example:
RP/0/RP0/CPU0:router(config-ospf-ar-if)# log
adjacency changes detail
|
(Optional) Requests notification of neighbor changes.
• By default, this feature is enabled.
• The messages generated by neighbor changes are considered notifications, which are categorized as severity Level 5 in the logging console command. The logging console command controls which severity level of messages are sent to the console. By default, all severity level messages are sent.
|
Step 8
|
end
or
commit
Example:
RP/0/RP0/CPU0:router(config-ospf-ar-if)# end
or
RP/0/RP0/CPU0:router(config-ospf-ar-if)# commit
|
Saves configuration changes.
• When you issue the end command, the system will prompt you to commit changes: Uncommitted changes found. Commit them?
– Entering yes will save configuration changes to the running configuration file, exit the configuration session, and return the router to EXEC mode.
– Entering no will exit the configuration session and return the router to EXEC mode without committing the configuration changes.
• Use the commit command to save the configuration changes to the running configuration file and remain within the configuration session.
|
Configuring Stub and Not-so-Stubby Area Types
This task explains how to configure the stub area and the NSSA for OSPF.
SUMMARY STEPS
1.
configure
2.
router ospf instance-name
or
router ospfv3 instance-name
3.
router-id {ipv4-address | interface-type interface-number}
4.
area area-id
5.
stub [no-summary]
or
nssa [no-redistribution] [default-information-originate] [no-summary]
6.
stub
or
nssa
7.
default-cost cost
8.
end
or
commit
9.
Repeat this task on all other routers in the stub area or NSSA.
DETAILED STEPS
| |
Command or Action
|
Purpose
|
Step 1
|
configure
Example:
RP/0/RP0/CPU0:router# configure
|
Enters global configuration mode.
|
Step 2
|
router ospf instance-name
or
router ospfv3 instance-name
Example:
RP/0/RP0/CPU0:router(config)# router ospf 1
or
RP/0/RP0/CPU0:router(config)# router ospfv3 1
|
Enables OSPF routing for the specified routing instance, and places the router in router configuration mode.
or
Enables OSPFv3 routing for the specified routing instance, and places the router in router ospfv3 configuration mode.
Note The instance-name argument is any alphanumeric string no longer than 40 characters.
|
Step 3
|
router-id {ipv4-address | interface-type
interface-number}
Example:
RP/0/RP0/CPU0:router(config-router)# router-id
192.168.4.3
|
Configures a router ID for the OSPF process.
Note This identifier of the router acts as a stable IP address and is recommended rather than using the default IP address.
|
Step 4
|
area area-id
Example:
RP/0/RP0/CPU0:router(config-router)# area 1
|
Enters area configuration mode and configures a nonbackbone area for the OSPF process.
• The area-id argument can be entered in dotted-decimal or IPv4 address notation, such as area 1000 or area 0.0.3.232. However, you must choose one form or the other for an area.
|
Step 5
|
stub [no-summary]
or
nssa [no-redistribution]
[default-information-originate] [no-summary]
Example:
RP/0/RP0/CPU0:router(config-ospf-ar)# stub no
summary
or
RP/0/RP0/CPU0:router(config-ospf-ar)# nssa
no-redistribution
|
Defines the nonbackbone area as a stub area.
• See the "Configuring Stub and Not-so-Stubby Area Types" section.
• Specify the no-summary keyword to further reduce the number of LSAs sent into a stub area. This keyword prevents the ABR from sending summary link-state advertisements (Type 3) in the stub area.
or
Defines an area as an NSSA.
• See the "Configuring Stub and Not-so-Stubby Area Types" section.
|
Step 6
|
stub
or
nssa
Example:
RP/0/RP0/CPU0:router(config-ospf-ar)# stub
or
RP/0/RP0/CPU0:router(config-ospf-ar)# nssa
|
(Optional) Turns off the options configured for stub and NSSA areas.
• If you configured the stub and NSSA areas using the optional keywords (no-summary, no-redistribution, default-information-originate, and no-summary) in Step 5, you must now reissue the stub and nssa commands without the keywords—rather than using the no form of the command.
• For example, the no nssa default-information-originate form of the command changes the NSSA area into a normal area that inadvertently tears down the existing adjacencies in that area.
|
Step 7
|
default-cost cost
Example:
RP/0/RP0/CPU0:router(config-ospf-ar)#
default-cost 15
|
(Optional) Specifies a cost for the default summary route sent into a stub area or NSSA.
• Use this command only on ABRs attached to the NSSA. Do not use it on any other routers in the area.
• The default cost is 1.
|
Step 8
|
end
or
commit
Example:
RP/0/RP0/CPU0:router(config-ospf-ar)# end
or
RP/0/RP0/CPU0:router(config-ospf-ar)# commit
|
Saves configuration changes.
• When you issue the end command, the system will prompt you to commit changes: Uncommitted changes found. Commit them?
– Entering yes will save configuration changes to the running configuration file, exit the configuration session, and return the router to EXEC mode.
– Entering no will exit the configuration session and return the router to EXEC mode without committing the configuration changes.
• Use the commit command to save the configuration changes to the running configuration file and remain within the configuration session.
|
Step 9
|
Repeat this task on all other routers in the stub area or NSSA.
|
—
|
Configuring Neighbors for Nonbroadcast Networks
This task explains how to configure neighbors for a nonbroadcast network. This task is optional.
Prerequisites
Configuring NBMA networks as either broadcast or nonbroadcast assumes that there are virtual circuits from every router to every router or fully meshed network.
SUMMARY STEPS
1.
configure
2.
router ospf instance-name
or
router ospfv3 instance-name
3.
router-id {ipv4-address | interface-type interface-number}
4.
area area-id
5.
network {broadcast | non-broadcast | {point-to-multipoint [non-broadcast] | point-to-point}}
6.
dead-interval seconds
7.
hello-interval seconds
8.
interface type number
9.
neighbor ip-address [priority number] [poll-interval seconds] [cost number]
or
neighbor ipv6-link-local-address [priority number] [poll-interval seconds] [cost number] [database-filter [all]]
10.
Repeat Step 9 for all neighbors on the interface.
11.
exit
12.
interface type number
13.
neighbor ip-address [priority number] [poll-interval seconds][cost number] [database-filter [all]]
or
neighbor ipv6-link-local-address [priority number] [poll-interval seconds][cost number] [database-filter [all]]
14.
Repeat Step 13 for all neighbors on the interface.
15.
end
or
commit
DETAILED STEPS
| |
Command or Action
|
Purpose
|
Step 1
|
configure
Example:
RP/0/RP0/CPU0:router# configure
|
Enters global configuration mode.
|
Step 2
|
router ospf instance-name
or
router ospfv3 instance-name
Example:
RP/0/RP0/CPU0:router(config)# router ospf 1
or
RP/0/RP0/CPU0:router(config)# router ospfv3 1
|
Enables OSPF routing for the specified routing instance, and places the router in router configuration mode.
or
Enables OSPFv3 routing for the specified routing instance, and places the router in router ospfv3 configuration mode.
Note The instance-name argument is any alphanumeric string no longer than 40 characters.
|
Step 3
|
router-id {ipv4-address | interface-type
interface-number}
Example:
RP/0/RP0/CPU0:router(config-router)# router-id
192.168.4.3
|
Configures a router ID for the OSPF process.
Note This identifier of the router acts as a stable IP address and is recommended rather than using the default IP address.
|
Step 4
|
area area-id
Example:
RP/0/RP0/CPU0:router(config-router)# area 0
|
Enters area configuration mode and configures an area for the OSPF process.
• The example configures a backbone area.
• The area-id argument can be entered in dotted-decimal or IPv4 address notation, such as area 1000 or area 0.0.3.232. However, you must choose one form or the other for an area.
|
Step 5
|
network {broadcast | non-broadcast |
{point-to-multipoint [non-broadcast] |
point-to-point}}
Example:
RP/0/RP0/CPU0:router(config-ospf-ar)# network
non-broadcast
|
Configures the OSPF network type to a type other than the default for a given medium.
• The example sets the network type to NBMA.
|
Step 6
|
dead-interval seconds
Example:
RP/0/RP0/CPU0:router(config-ospf-ar)#
dead-interval 40
|
(Optional) Sets the interval at which hello packets must not be seen before neighbors declare the router down.
|
Step 7
|
hello-interval seconds
Example:
RP/0/RP0/CPU0:router(config-ospf-ar)#
hello-interval 10
|
(Optional) Specifies the interval between hello packets that the software sends on the interface.
|
Step 8
|
interface type number
Example:
RP/0/RP0/CPU0:router(config-ospf-ar)# interface
POS 0/2/0/0
|
Enters interface configuration mode and associates one or more interfaces for the area configured in Step 4.
• In this example, the interface inherits the nonbroadcast network type and the hello and dead intervals from the areas because the values are not set at the interface level.
|
Step 9
|
neighbor ip-address [priority number]
[poll-interval seconds][cost number]
or
neighbor ipv6-link-local-address [priority
number] [poll-interval seconds][cost number]
[database-filter [all]]
Example:
RP/0/RP0/CPU0:router(config-ospf-ar-if)#
neighbor 10.20.20.1 priority 3 poll-interval 15
or
RP/0/RP0/CPU0:router(config-ospf-ar-if)#
neighbor fe80::3203:a0ff:fe9d:f3fe
|
Configures the IPv4 address of OSPF neighbors interconnecting to nonbroadcast networks.
or
Configures the link-local IPv6 address of OSPFv3 neighbors.
• The ipv6-link-local-address argument must be in the form documented in RFC 2373 where the address is specified in hexadecimal using 16-bit values between colons.
• The priority keyword notifies the router that this neighbor is eligible to become a DR or BDR. The priority value should match the actual priority setting on the neighbor router. The neighbor priority default value is zero. This keyword does not apply to point-to-multipoint interfaces.
• The poll-interval keyword does not apply to point-to-multipoint interfaces. RFC 1247 recommends that this value be much larger than the hello interval. The default is 120 seconds (2 minutes).
• Neighbors with no specific cost configured will assume the cost of the interface, based on the cost command. On point-to-multipoint interfaces, cost number is the only keyword and argument combination that works. The cost keyword does not apply to NBMA networks.
• The database-filter keyword filters outgoing LSAs to an OSPF neighbor. If you specify the all keyword, incoming and outgoing LSAs are filtered.
|
Step 10
|
Repeat Step 9 for all neighbors on the interface.
|
—
|
Step 11
|
exit
Example:
RP/0/RP0/CPU0:router(config-ospf-ar-if)# exit
|
Enters area configuration mode.
|
Step 12
|
interface type number
Example:
RP/0/RP0/CPU0:router(config-ospf-ar)# interface
POS 0/3/0/1
|
Enters interface configuration mode and associates one or more interfaces for the area configured in Step 4.
• In this example, the interface inherits the nonbroadcast network type and the hello and dead intervals from the areas because the values are not set at the interface level.
|
Step 13
|
neighbor ip-address [priority number]
[poll-interval seconds][cost number]
[database-filter [all]]
or
neighbor ipv6-link-local-address [priority
number] [poll-interval seconds][cost number]
[database-filter [all]]
Example:
RP/0/RP0/CPU0:router(config-ospf-ar)# neighbor
10.34.16.6
or
RP/0/RP0/CPU0:router(config-ospf-ar)# neighbor
fe80::3203:a0ff:fe9d:f3f
|
Configures the IPv4 address of OSPF neighbors interconnecting to nonbroadcast networks.
or
Configures the link-local IPv6 address of OSPFv3 neighbors.
• The ipv6-link-local-address argument must be in the form documented in RFC 2373 where the address is specified in hexadecimal using 16-bit values between colons.
• The priority keyword notifies the router that this neighbor is eligible to become a DR or BDR. The priority value should match the actual priority setting on the neighbor router. The neighbor priority default value is zero. This keyword does not apply to point-to-multipoint interfaces.
• The poll-interval keyword does not apply to point-to-multipoint interfaces. RFC 1247 recommends that this value be much larger than the hello interval. The default is 120 seconds (2 minutes).
• Neighbors with no specific cost configured will assume the cost of the interface, based on the cost command. On point-to-multipoint interfaces, cost number is the only keyword and argument combination that works. The cost keyword does not apply to NBMA networks.
• The database-filter keyword filters outgoing LSAs to an OSPF neighbor. If you specify the all keyword, incoming and outgoing LSAs are filtered.
|
Step 14
|
Repeat Step 13 for all neighbors on the interface.
|
—
|
Step 15
|
end
or
commit
Example:
RP/0/RP0/CPU0:router(config-ospf-ar)# end
or
RP/0/RP0/CPU0:router(config-ospf-ar)# commit
|
Saves configuration changes.
• When you issue the end command, the system will prompt you to commit changes: Uncommitted changes found. Commit them?
– Entering yes will save configuration changes to the running configuration file, exit the configuration session, and return the router to EXEC mode.
– Entering no will exit the configuration session and return the router to EXEC mode without committing the configuration changes.
• Use the commit command to save the configuration changes to the running configuration file and remain within the configuration session.
|
Configuring Authentication at Different Hierarchical Levels for OSPF Version 2
This task explains how to configure MD5 (secure) authentication on the OSPF router process, configure one area with plain text authentication, and then apply one interface with clear text (null) authentication.
Note
The authentication feature is not supported for OSPFv3 in this software release; however, the hierarchical and inheritance model applies for any OSPFv3 feature.
Note
Authentication configured at the interface level overrides authentication configured at the area level and the router process level. If an interface does not have authentication specifically configured, the interface inherits the authentication parameter value from a higher hierarchical level. See the "OSPF Hierarchical CLI and CLI Inheritance" section for more information about hierarchy and inheritance.
Prerequisites
If you choose to configure authentication, you must first decide whether to configure plain text or MD5 authentication, and whether the authentication applies to all interfaces in an instance, an entire area, or specific interfaces. See the "Route Authentication Methods for OSPF Version 2" section for information about each type of authentication and when you should use a specific method for your network.
SUMMARY STEPS
1.
configure
2.
router ospf instance-name
3.
router-id {ipv4-address | interface-type interface-number}
4.
authentication [message-digest | null]
5.
message-digest-key key-id md5 [encryption-type] key
6.
area area-id
7.
interface type number
8.
Repeat Step 7 for each interface that must communicate, using the same authentication.
9.
area area-id
10.
authentication [message-digest | null]
11.
interface type number
12.
Repeat Step 7 for each interface that must communicate, using the same authentication.
13.
interface type number
14.
authentication [message-digest | null]
15.
end
or
commit
DETAILED STEPS
| |
Command or Action
|
Purpose
|
Step 1
|
configure
Example:
RP/0/RP0/CPU0:router# configure
|
Enters global configuration mode.
|
Step 2
|
router ospf instance-name
Example:
RP/0/RP0/CPU0:router(config)# router ospf 1
|
Enables OSPF routing for the specified routing instance, and places the router in router configuration mode.
Note The instance-name argument is any alphanumeric string no longer than 40 characters.
|
Step 3
|
router-id {ipv4-address | interface-type
interface-number}
Example:
RP/0/RP0/CPU0:router(config-router)# router-id
192.168.4.3
|
Configures a router ID for the OSPF process.
|
Step 4
|
authentication [message-digest | null]
Example:
RP/0/RP0/CPU0:router(config-router)#
authentication message-digest
|
Enables MD5 authentication for the OSPF process.
• This authentication type will apply to the entire router process unless overridden by a lower hierarchical level such as the area or interface.
|
Step 5
|
message-digest-key key-id md5 [encryption-type]
key
Example:
RP/0/RP0/CPU0:router(config-router)#
message-digest-key 4 md5 0 yourkey
|
Specifies the MD5 authentication key for the OSPF process.
• Your neighbor router must have the same key identifier.
|
Step 6
|
area area-id
Example:
RP/0/RP0/CPU0:router(config-router)# area 0
|
Enters area configuration mode and configures a backbone area for the OSPF process.
|
Step 7
|
interface type number
Example:
RP/0/RP0/CPU0:router(config-ospf-ar)# interface
POS 0/1/0/3
|
Enters interface configuration mode and associates one or more interfaces to the backbone area.
• All interfaces will inherit the authentication parameter values specified for the OSPF process (Step 4, Step 5, and Step 6).
|
Step 8
|
Repeat Step 7 for each interface that must communicate, using the same authentication.
|
—
|
Step 9
|
area area-id
Example:
RP/0/RP0/CPU0:router(config-router)# area 1
|
Enters area configuration mode and configures a nonbackbone area 1 for the OSPF process.
• The area-id argument can be entered in dotted-decimal or IPv4 address notation, such as area 1000 or area 0.0.3.232. However, you must choose one form or the other for an area.
|
Step 10
|
authentication [message-digest | null]
Example:
RP/0/RP0/CPU0:router(config-ospf-ar)#
authentication
|
Enables Type 1 (plain text) authentication that provides no security.
• The example specifies plain text authentication (by not specifying a keyword). Use the authentication-key interface command to specify the plain text password.
|
Step 11
|
interface type number
Example:
RP/0/RP0/CPU0:router(config-ospf-ar)# interface
POS 0/1/0/0
|
Enters interface configuration mode and associates one or more interfaces to the nonbackbone area 1 specified in Step 9.
• All interfaces configured will inherit the authentication parameter values configured for area 1.
|
Step 12
|
Repeat Step 11 for each interface that must communicate, using the same authentication.
|
—
|
Step 13
|
interface type number
Example:
RP/0/RP0/CPU0:router(config-ospf-ar)# interface
POS 0/3/0/0
|
Enters interface configuration mode and associates one or more interfaces to a different authentication type.
|
Step 14
|
authentication [message-digest | null]
Example:
RP/0/RP0/CPU0:router(config-ospf-ar-if)#
authentication null
|
Specifies no authentication on POS interface 0/3/0/0, overriding the plain text authentication specified for area 1.
• By default, all of the interfaces configured in the same area will inherit the same authentication parameter values of the area.
|
Step 15
|
end
or
commit
Example:
RP/0/RP0/CPU0:router(config-ospf-ar-if)# end
or
RP/0/RP0/CPU0:router(config-ospf-ar-if)# commit
|
Saves configuration changes.
• When you issue the end command, the system will prompt you to commit changes: Uncommitted changes found. Commit them?
– Entering yes will save configuration changes to the running configuration file, exit the configuration session, and return the router to EXEC mode.
– Entering no will exit the configuration session and return the router to EXEC mode without committing the configuration changes.
• Use the commit command to save the configuration changes to the running configuration file and remain within the configuration session.
|
Controlling the Frequency that the Same LSA Is Originated or Accepted for OSPF
This task explains how to tune the convergence time of OSPF routes in the routing table when many LSAs occur in the same time frame.
SUMMARY STEPS
1.
configure
2.
router ospf instance-name
or
router ospfv3 instance-name
3.
router-id {ipv4-address | interface-type interface-number}
4.
Perform Step 5 or Step 6 or both to control the frequency that the same LSA is originated or accepted.
5.
timers lsa gen-interval seconds
6.
timers lsa min-arrival seconds
7.
timers lsa group-pacing seconds
8.
end
or
commit
DETAILED STEPS
| |
Command or Action
|
Purpose
|
Step 1
|
configure
Example:
RP/0/RP0/CPU0:router# configure
|
Enters global configuration mode.
|
Step 2
|
router ospf instance-name
or
router ospfv3 instance-name
Example:
RP/0/RP0/CPU0:router(config)# router ospf 1
or
RP/0/RP0/CPU0:router(config)# router ospfv3 1
|
Enables OSPF routing for the specified routing instance, and places the router in router configuration mode.
or
Enables OSPFv3 routing for the specified routing instance, and places the router in router ospfv3 configuration mode.
Note The instance-name argument is any alphanumeric string no longer than 40 characters.
|
Step 3
|
router-id {ipv4-address | interface-type
interface-number}
Example:
RP/0/RP0/CPU0:router(config-router)# router-id
192.168.4.3
|
Configures a router ID for the OSPF process.
Note This identifier of the router acts as a stable IP address and is recommended rather than using the default IP address.
|
Step 4
|
Perform Step 5 or Step 6 or both to control the
frequency that the same LSA is originated or
accepted.
|
—
|
Step 5
|
timers lsa gen-interval seconds
Example:
RP/0/RP0/CPU0:router(config-router)# timers lsa
gen-interval 10
|
Changes the minimum interval between the same OSPF LSAs that the router originates.
• The default is 5 seconds for both OSPF and OSPFv3.
|
Step 6
|
timers lsa min-arrival seconds
Example:
RP/0/RP0/CPU0:router(config-router)# timers lsa
min-arrival 2
|
Limits the frequency that new instances of any particular OSPF Version 2 LSA can be accepted during flooding.
• The default is 1 second.
|
Step 7
|
timers lsa group-pacing seconds
Example:
RP/0/RP0/CPU0:router(config-router)# timers lsa
group-pacing 1000
|
Changes the interval at which OSPFv3 link-state LSAs are collected into a group.
• The default is 240 seconds.
|
Step 8
|
end
or
commit
Example:
RP/0/RP0/CPU0:router(config-router)# end
or
RP/0/RP0/CPU0:router(config-router)# commit
|
Saves configuration changes.
• When you issue the end command, the system will prompt you to commit changes: Uncommitted changes found. Commit them?
– Entering yes will save configuration changes to the running configuration file, exit the configuration session, and return the router to EXEC mode.
– Entering no will exit the configuration session and return the router to EXEC mode without committing the configuration changes.
• Use the commit command to save the configuration changes to the running configuration file and remain within the configuration session.
|
Creating a Virtual Link with MD5 Authentication to Area 0 for OSPF
This task explains how to create a virtual link to your backbone (area 0) and apply MD5 authentication. You must perform the steps described on both ABRs, one at each end of the virtual link. To understand virtual links, see the "Virtual Link and Transit Area for OSPF" section.
Note
The MD5 authentication feature is not supported for OSPFv3 in this software release; however, the virtual link configuration steps are supported.
Note
Once you explicitly configure area parameter values, they will be inherited by all the interfaces bound to that area—unless you override the values and configure them explicitly for the interface. An example is provided in the "Virtual Link Configured with MD5 Authentication for OSPF Version 2: Example" section.
Prerequisites
•
You must have the router ID of the neighbor router at the opposite end of the link in order to configure the local router. You can execute the show ospf or show ospfv3 command on the remote router to get its router ID.
•
In order for a virtual link to be successful, you need a stable router ID at each end of the virtual link. You do not want them to be subject to change, which could happen if they are assigned by default (See the "OSPF Instance and Router ID" section for an explanation of how the router ID is determined.) Therefore, we recommend that you perform one of the following tasks before configuring a virtual link:
–
Use the router-id command to set the router ID. This strategy is preferable.
–
Configure a loopback interface so that the router will have a fixed router ID.
•
Before configuring your virtual link for OSPF Version 2, you must decide whether to configure plain text authentication, MD5 authentication, or no authentication (which is the default). Your decision determines whether you need to perform additional tasks related to authentication.
Note
If you decide to configure plain text authentication or no authentication, refer to the authentication command provided in the Routing Software Product Commands document.
SUMMARY STEPS
1.
show ospf [instance-name]
or
show ospfv3 [instance-name]
2.
configure
3.
router ospf instance-name
or
router ospfv3 instance-name
4.
router-id {ipv4-address | interface-type interface-number}
5.
area area-id
6.
virtual link router-id
7.
authentication message-digest
8.
message-digest-key key-id md5 [0 | 7] key
9.
Repeat all of the steps in this task on the ABR that is at the other end of the virtual link. Specify the same key ID and key that you specified for the virtual link on this router.
10.
end
or
commit
11.
show ospf [instance-name] [area-id] virtual-links
or
show ospfv3 [instance-name] virtual-links
DETAILED STEPS
| |
Command or Action
|
Purpose
|
Step 1
|
show ospf [instance-name]
or
show ospfv3 [instance-name]
Example:
RP/0/RP0/CPU0:router# show ospf
or
RP/0/RP0/CPU0:router# show ospfv3
|
(Optional) Displays general information about OSPF routing processes.
• The output displays the router ID of the local router. You need this router ID to configure the other end of the link.
|
Step 2
|
configure
Example:
RP/0/RP0/CPU0:router# configure
|
Enters global configuration mode.
|
Step 3
|
router ospf instance-name
or
router ospfv3 instance-name
Example:
RP/0/RP0/CPU0:router(config)# router ospf 1
or
RP/0/RP0/CPU0:router(config)# router ospfv3 1
|
Enables OSPF routing for the specified routing instance, and places the router in router configuration mode.
or
Enables OSPFv3 routing for the specified routing instance, and places the router in router ospfv3 configuration mode.
Note The instance-name argument is any alphanumeric string no longer than 40 characters.
|
Step 4
|
router-id {ipv4-address | interface-type
interface-number}
Example:
RP/0/RP0/CPU0:router(config-router)# router-id
192.168.4.3
|
Configures a router ID for the OSPF process.
Note This identifier of the router acts as a stable IP address and is recommended rather than using the default IP address.
|
Step 5
|
area area-id
Example:
RP/0/RP0/CPU0:router(config-router)# area 1
|
Enters area configuration mode and configures a nonbackbone area for the OSPF process.
• The area-id argument can be entered in dotted-decimal or IPv4 address notation, such as area 1000 or area 0.0.3.232. However, you must choose one form or the other for an area.
|
Step 6
|
virtual-link router-id
Example:
RP/0/RP0/CPU0:router(config-ospf-ar)# virtual
link 10.3.4.5
|
Defines an OSPF virtual link.
• See the "Virtual Link and Transit Area for OSPF" section.
|
Step 7
|
authentication message-digest
Example:
RP/0/RP0/CPU0:router(config-ospf-ar)#
authentication message-digest
|
Selects MD5 authentication for this virtual link.
Note This command is not supported for OSPFv3. OSPFv3 does not support MD5 authentication.
|
Step 8
|
message-digest-key key-id md5 [0 | 7] key
Example:
RP/0/RP0/CPU0:router(config-ospf-ar)#
message-digest-key 4 md5 0 yourkey
|
Defines an OSPF virtual link.
• See the "Virtual Link and Transit Area for OSPF" section to understand a virtual link.
• The key-id argument is a number in the range from 1 to 255. The key argument is an alphanumeric string of up to 16 characters. The routers at both ends of the virtual link must have the same key identifier and key to be able to route OSPF traffic. When the encryption type identifier "7" is specified, the key is encrypted and stored on the router; otherwise, the key is unencrypted
• The authentication-key key option is not supported for OSPFv3.
• Once the key is encrypted it must remain encrypted.
|
Step 9
|
Repeat all of the steps in this task on the ABR that is at the other end of the virtual link. Specify the same key ID and key that you specified for the virtual link on this router.
|
—
|
Step 10
|
end
or
commit
Example:
RP/0/RP0/CPU0:router(config-ospf-ar)# end
or
RP/0/RP0/CPU0:router(config-ospf-ar)# commit
|
Saves configuration changes.
• When you issue the end command, the system will prompt you to commit changes: Uncommitted changes found. Commit them?
– Entering yes will save configuration changes to the running configuration file, exit the configuration session, and return the router to EXEC mode.
– Entering no will exit the configuration session and return the router to EXEC mode without committing the configuration changes.
• Use the commit command to save the configuration changes to the running configuration file and remain within the configuration session.
|
Step 11
|
show ospf [instance-name] [area-id]
virtual-links
or
show ospfv3 [instance-name] virtual-links
Example:
RP/0/RP0/CPU0:router# show ospf 1 2
virtual-links
or
RP/0/RP0/CPU0:router# show ospfv3 1
virtual-links
|
(Optional) Displays the parameters and the current state of OSPF virtual links.
|
Examples
In the following example, the show ospfv3 virtual links EXEC command verifies that the OSPF_VL0 virtual link to the OSPFv3 neighbor is up, the ID of the virtual link interface is 2, and the IPv6 address of the virtual link endpoint is 2003:3000::1.
RP/0/RP0/CPU0:router# show ospfv3 virtual-links
Virtual Links for OSPFv3 1
Virtual Link OSPF_VL0 to router 10.0.0.3 is up
Interface ID 2, IPv6 address 2003:3000::1
Transit area 0.1.20.255, via interface POS 0/1/0/1, Cost of using 2
Transmit Delay is 5 sec, State POINT_TO_POINT,
Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5
Adjacency State FULL (Hello suppressed)
Index 0/2/3, retransmission queue length 0, number of retransmission 1
First 0(0)/0(0)/0(0) Next 0(0)/0(0)/0(0)
Last retransmission scan length is 1, maximum is 1
Last retransmission scan time is 0 msec, maximum is 0 msec
Virtual Link OSPF_VL0 to router 10.0.0.3 is up
Adjacency State FULL (Hello suppressed)
State is up and Adjacency State is FULL
Summarizing Subnetwork LSAs on an OSPF ABR
If you configured two or more subnetworks when you assigned your IP addresses to your interfaces, you might want the software to summarize into a single LSA all of the subnetworks that the local area advertises to another area. Such summarization would reduce the number of LSAs and thereby conserve network resources. This summarization is known as interarea route summarization. It applies to routes from within the autonomous system. It does not apply to external routes injected into OSPF by way of redistribution.
This task configures the software to summarize subnetworks into one LSA, by specifying that all subnetworks that fall into a range are advertised together. This task is performed on an ABR only.
SUMMARY STEPS
1.
configure
2.
router ospf instance-name
or
router ospfv3 instance-name
3.
router-id {ipv4-address | interface-type interface-number}
4.
area area-id
5.
range ip-address mask [advertise | not-advertise]
or
range ipv6-prefix/prefix-length [advertise | not-advertise]
6.
interface type number
7.
end
or
commit
DETAILED STEPS
| |
Command or Action
|
Purpose
|
Step 1
|
configure
Example:
RP/0/RP0/CPU0:router# configure
|
Enters global configuration mode.
|
Step 2
|
router ospf instance-name
or
router ospfv3 instance-name
Example:
RP/0/RP0/CPU0:router(config)# router ospf 1
or
RP/0/RP0/CPU0:router(config)# router ospfv3 1
|
Enables OSPF routing for the specified routing instance, and places the router in router configuration mode.
or
Enables OSPFv3 routing for the specified routing instance, and places the router in router ospfv3 configuration mode.
Note The instance-name argument is any alphanumeric string no longer than 40 characters.
|
Step 3
|
router-id {ipv4-address | interface-type
interface-number}
Example:
RP/0/RP0/CPU0:router(config-router)# router-id
192.168.4.3
|
Configures a router ID for the OSPF process.
Note This identifier of the router acts as a stable IP address and is recommended rather than using the default IP address.
|
Step 4
|
area area-id
Example:
RP/0/RP0/CPU0:router(config-router)# area 0
|
Enters area configuration mode and configures a backbone area for the OSPF process.
• The area-id argument can be entered in dotted-decimal or IPv4 address notation, such as area 1000 or area 0.0.3.232. However, you must choose one form or the other for an area.
|
Step 5
|
range ip-address mask [advertise |
not-advertise]
or
range ipv6-prefix/prefix-length [advertise |
not-advertise]
Example:
RP/0/RP0/CPU0:router(config-ospf-ar)# range
192.168.0.0 255.255.0.0 advertise
or
Example:
RP/0/RP0/CPU0:router(config-ospf-ar)# range
4004:f000::/32 advertise
|
Consolidates and summarizes OSPF routes at an area boundary.
• The advertise keyword causes the software to advertise the address range of subnetworks in a Type 3 summary LSA.
• The not-advertise keyword causes the software to suppress the Type 3 summary LSA, and the subnetworks in the range remain hidden from other areas.
• In the first example, all subnetworks for network 192.168.0.0 are summarized and advertised by the ABR into areas outside the backbone.
• In the second example, two or more IPv4 interfaces are covered by a 192.x.x network.
|
Step 6
|
interface type number
Example:
RP/0/RP0/CPU0:router(config-ospf-ar)# interface
POS 0/2/0/3
|
Enters interface configuration mode and associates one or more interfaces to the area.
|
Step 7
|
end
or
commit
Example:
RP/0/RP0/CPU0:router(config-ospf-ar)# end
or
RP/0/RP0/CPU0:router(config-ospf-ar)# commit
|
Saves configuration changes.
• When you issue the end command, the system will prompt you to commit changes: Uncommitted changes found. Commit them?
– Entering yes will save configuration changes to the running configuration file, exit the configuration session, and return the router to EXEC mode.
– Entering no will exit the configuration session and return the router to EXEC mode without committing the configuration changes.
• Use the commit command to save the configuration changes to the running configuration file and remain within the configuration session.
|
Redistributing Routes from One IGP into OSPF
This task redistributes from one protocol (could be OSPF) into OSPF.
Prerequisites
For information about configuring routing policy, refer to the Implementing Routing Policy on Cisco IOS XR Software module.
SUMMARY STEPS
1.
configure
2.
router ospf instance-name
or
router ospfv3 instance-name
3.
router-id {ipv4-address | interface-type interface-number}
4.
redistribute protocol [process-id] {level-1 | level-1-2 | level-2} [metric metric-value] [metric-type type-value] [match {internal | external 1 | external 2}] [tag tag-value] [route-map map-tag | policy policy-tag]
or
redistribute protocol [process-id] {level-1 | level-1-2 | level-2} [metric metric-value] [metric-type type-value] [match {internal | external 1 | external 2 | NSSA-external 1 | NSSA-external 2}] [tag tag-value]
5.
summary-prefix address mask [not-advertise] [tag tag]
or
summary-prefix ipv6-prefix/prefix-length [not-advertise] [tag tag]
6.
end
or
commit
DETAILED STEPS
| |
Command or Action
|
Purpose
|
Step 1
|
configure
Example:
RP/0/RP0/CPU0:router# configure
|
Enters global configuration mode.
|
Step 2
|
router ospf instance-name
or
router ospfv3 instance-name
Example:
RP/0/RP0/CPU0:router(config)# router ospf 1
or
RP/0/RP0/CPU0:router(config)# router ospfv3 1
|
Enables OSPF routing for the specified routing instance, and places the router in router configuration mode.
or
Enables OSPFv3 routing for the specified routing instance, and places the router in router ospfv3 configuration mode.
Note The instance-name argument is any alphanumeric string no longer than 40 characters.
|
Step 3
|
router-id {ipv4-address | interface-type
interface-number}
Example:
RP/0/RP0/CPU0:router(config-router)# router-id
192.168.4.3
|
Configures a router ID for the OSPF process.
Note This identifier of the router acts as a stable IP address and is recommended rather than using the default IP address.
|
Step 4
|
redistribute protocol [process-id] {level-1 |
level-1-2 | level-2} [metric metric-value]
[metric-type type-value] [match {internal |
external 1 | external 2}] [tag tag-value]
[route-map map-tag | policy policy-tag]
or
redistribute protocol [process-id] {level-1 |
level-1-2 | level-2} [metric metric-value]
[metric-type type-value] [match {internal |
external 1 | external 2 | NSSA-external 1 |
NSSA-external 2}] [tag tag-value]
Example:
RP/0/RP0/CPU0:router(config-router)#
redistribute bgp 1 level-1
or
RP/0/RP0/CPU0:router(config-router)# redistribute bgp 1 level-1-2 metric-type 1
|
Redistributes OSPF routes from one routing domain to another routing domain.
or
Redistributes OSPFv3 routes from one routing domain to another routing domain.
• This command causes the router to become an ASBR by definition.
• OSPF tags all routes learned through redistribution as external.
• The protocol and its process ID, if it has one, indicate the protocol being redistributed into OSPF.
• The metric is the cost you assign to the external route. The default is 20 for all protocols except BGP, whose default metric is 1.
• The OSPF example redistributes BGP autonomous system 1, Level 1 routes into OSPF as Type 2 external routes.
• The OSPFv3 example redistributes BGP autonomous system 1, Level 1 and 2 routes into OSPF. The external link type associated with the default route advertised into the OSPFv3 routing domain is the Type 1 external route.
Note RPL is not supported for OSPFv3.
|
Step 5
|
summary-prefix address mask [not-advertise]
[tag tag]
or
summary-prefix ipv6-prefix/prefix-length
[not-advertise] [tag tag]
Example:
RP/0/RP0/CPU0:router(config-router)#
summary-prefix 10.1.0.0 255.255.0.0
or
RP/0/RP0/CPU0:router(config-router)# summary-prefix 2010:11:22::/32
|
(Optional) Creates aggregate addresses for OSPF.
or
(Optional) Creates aggregate addresses for OSPFv3.
• This command provides external route summarization of the non-OSPF routes.
• External ranges that are being summarized should be contiguous. Summarization of overlapping ranges from two different routers could cause packets to be sent to the wrong destination.
• This command is optional. If you do not specify it, each route is included in the link-state database and advertised in LSAs.
• In the OSPFv2 example, the summary address 10.1.0.0 includes address 10.1.1.0, 10.1.2.0, 10.1.3.0, and so on. Only the address 10.1.0.0 is advertised in an external LSA.
• In the OSPFv3 example, the summary address 2010:11:22::/32 has addresses such as 2010:11:22:0:1000::1, 2010:11:22:0:2000:679:1, and so on. Only the address 2010:11:22::/32 is advertised in the external LSA.
|
Step 6
|
end
or
commit
Example:
RP/0/RP0/CPU0:router(config-router)# end
or
RP/0/RP0/CPU0:router(config-router)# commit
|
Saves configuration changes.
• When you issue the end command, the system will prompt you to commit changes: Uncommitted changes found. Commit them?
– Entering yes will save configuration changes to the running configuration file, exit the configuration session, and return the router to EXEC mode.
– Entering no will exit the configuration session and return the router to EXEC mode without committing the configuration changes.
• Use the commit command to save the configuration changes to the running configuration file and remain within the configuration session.
|
Configuring OSPF Shortest Path First Throttling
This task explains how to configure SPF scheduling in millisecond intervals and to potentially delay SPF calculations during times of network instability. This task is optional.
Prerequisites
See the "OSPF Shortest Path First Throttling" section for information about OSPF SPF throttling.
SUMMARY STEPS
1.
configure
2.
router ospf instance-name
or
router ospfv3 instance-name
3.
router-id {ipv4-address | interface-type interface-number}
4.
timers throttle spf spf-start spf-hold spf-max-wait
5.
area area-id
6.
interface type number
7.
end
or
commit
8.
show ospf [instance-name]
or
show ospfv3 [instance-name]
DETAILED STEPS
| |
Command or Action
|
Purpose
|
Step 1
|
configure
Example:
RP/0/RP0/CPU0:router# configure
|
Enters global configuration mode.
|
Step 2
|
router ospf instance-name
or
router ospfv3 instance-name
Example:
RP/0/RP0/CPU0:router(config)# router ospf 1
or
RP/0/RP0/CPU0:router(config)# router ospfv3 1
|
Enables OSPF routing for the specified routing instance, and places the router in router configuration mode.
or
Enables OSPFv3 routing for the specified routing instance, and places the router in router ospfv3 configuration mode.
Note The instance-name argument is any alphanumeric string no longer than 40 characters.
|
Step 3
|
router-id {ipv4-address | interface-type
interface-number}
Example:
RP/0/RP0/CPU0:router(config-router)# router-id
192.168.4.3
|
Configures a router ID for the OSPF process.
Note This identifier of the router acts as a stable IP address and is recommended rather than using the default IP address.
|
Step 4
|
timers throttle spf spf-start spf-hold
spf-max-wait
Example:
RP/0/RP0/CPU0:router(config-router)# timers
throttle spf 10 4800 90000
|
Sets SPF throttling timers.
|
Step 5
|
area area-id
Example:
RP/0/RP0/CPU0:router(config-router)# area 0
|
Enters area configuration mode and configures a backbone area.
• The area-id argument can be entered in dotted-decimal or IPv4 address notation, such as area 1000 or area 0.0.3.232. However, you must choose one form or the other for an area.
|
Step 6
|
interface type number
Example:
RP/0/RP0/CPU0:router(config-ospf-ar)# interface
POS 0/1/0/3
|
Enters interface configuration mode and associates one or more interfaces to the area.
|
Step 7
|
end
or
commit
Example:
RP/0/RP0/CPU0:router(config-ospf-ar-if)# end
or
RP/0/RP0/CPU0:router(config-ospf-ar-if)# commit
|
Saves configuration changes.
• When you issue the end command, the system will prompt you to commit changes: Uncommitted changes found. Commit them?
– Entering yes will save configuration changes to the running configuration file, exit the configuration session, and return the router to EXEC mode.
– Entering no will exit the configuration session and return the router to EXEC mode without committing the configuration changes.
• Use the commit command to save the configuration changes to the running configuration file and remain within the configuration session.
|
Step 8
|
show ospf [instance-name]
or
show ospfv3 [instance-name]
Example:
RP/0/RP0/CPU0:router# show ospf 1
or
RP/0/RP0/CPU0:router# show ospfv3 2
|
(Optional) Displays SPF throttling timers.
|
Examples
In the following example, the show ospf EXEC command is used to verify that the initial SPF schedule delay time, the minimum hold time, and the maximum wait time are configured correctly. Additional details are displayed about the OSPF instance, such as router type and redistribution of routes.
RP/0/RP0/CPU0:router# show ospf 1
Routing Process "ospf 1" with ID 192.168.4.3
Supports only single TOS(TOS0) routes
It is an autonomous system boundary router
Redistributing External Routes from,
Initial SPF schedule delay 5 msecs
Minimum hold time between two consecutive SPFs 100 msecs
Maximum wait time between two consecutive SPFs 1000 msecs
Minimum LSA interval 5 secs. Minimum LSA arrival 1 secs
Number of external LSA 0. Checksum Sum 00000000
Number of opaque AS LSA 0. Checksum Sum 00000000
Number of DCbitless external and opaque AS LSA 0
Number of DoNotAge external and opaque AS LSA 0
Number of areas in this router is 1. 1 normal 0 stub 0 nssa
External flood list length 0
Non-Stop Forwarding enabled
Note
For a description of each output display field, refer to the show ospf command in the Routing Software Product Commands document.
Configuring Nonstop Forwarding for OSPF Version 2
This task explains how to configure OSPF NSF on your NSF-capable router. This task is optional.
Note
The NSF feature is not supported for OSPFv3 in this software release.
Prerequisites
OSPF NSF requires that all neighbor networking devices be NSF-aware, which happens automatically once you install the Cisco IOS XR image on the router. If an NSF-capable router discovers that it has non-NSF-aware neighbors on a particular network segment, it will disable NSF capabilities for that segment. Other network segments composed entirely of NSF-capable or NSF-aware routers will continue to provide NSF capabilities.
See the "Nonstop Forwarding for OSPF Version 2" section for conceptual information.
Restrictions
•
OSPF NSF for virtual links is not supported.
•
Neighbors must be NSF-aware.
SUMMARY STEPS
1.
configure
2.
router ospf instance-name
3.
router-id {ipv4-address | interface-type interface-number}
4.
nsf
or
nsf enforce global
5.
nsf interval seconds
6.
end
or
commit
DETAILED STEPS
| |
Command or Action
|
Purpose
|
Step 1
|
configure
Example:
RP/0/RP0/CPU0:router# configure
|
Enters global configuration mode.
|
Step 2
|
router ospf instance-name
Example:
RP/0/RP0/CPU0:router(config)# router ospf 1
|
Enables OSPF routing for the specified routing instance, and places the router in router configuration mode.
Note The instance-name argument is any alphanumeric string no longer than 40 characters.
|
Step 3
|
router-id {ipv4-address | interface-type
interface-number}
Example:
RP/0/RP0/CPU0:router(config-router)# router-id
192.168.4.3
|
Configures a router ID for the OSPF process.
Note This identifier of the router acts as a stable IP address and is recommended rather than using the default IP address.
|
Step 4
|
nsf
or
nsf enforce global
Example:
RP/0/RP0/CPU0:router(config-router)# nsf
or
RP/0/RP0/CPU0:router(config-router)# nsf
enforce global
|
Enables OSPF NSF operations.
• Use the nsf command without the optional enforce and global keywords to abort the NSF restart mechanism on the interfaces of detected non-NSF neighbors and allow NSF neighbors to function properly.
• Use the nsf command with the optional enforce and global keywords if the router is expected to perform NSF during restart. However, if non-NSF neighbors are detected, NSF restart will be canceled for the entire OSPF process.
|
Step 5
|
nsf interval seconds
Example:
RP/0/RP0/CPU0:router(config-router)# nsf
interval 120
|
Sets the minimum time between NSF restart attempts.
Note When you use this command, the OSPF process must be up for at least 90 seconds before OSPF attempts to perform an NSF restart.
|
Step 6
|
end
or
commit
Example:
RP/0/RP0/CPU0:router(config-router)# end
or
RP/0/RP0/CPU0:router(config-router)# commit
|
Saves configuration changes.
• When you issue the end command, the system will prompt you to commit changes: Uncommitted changes found. Commit them?
– Entering yes will save configuration changes to the running configuration file, exit the configuration session, and return the router to EXEC mode.
– Entering no will exit the configuration session and return the router to EXEC mode without committing the configuration changes.
• Use the commit command to save the configuration changes to the running configuration file and remain within the configuration session.
|
Configuring OSPF Version 2 for MPLS Traffic Engineering
This task explains how to configure OSPF for MPLS TE. This task is optional.
For a description of the MPLS TE tasks and commands that allow you to configure the router to support tunnels, configure an MPLS tunnel that OSPF can use, and to troubleshoot MPLS TE, refer to the Implementing MPLS Traffic Engineering Configuration Guide.
Note
The MPLS TE feature is not supported for OSPFv3 in this initial Cisco IOS XR software release.
Prerequisites
Your network must support the following Cisco IOS XR features before you enable MPLS TE for OSPF on your router:
•
MPLS
•
IP Cisco Express Forwarding (CEF)
Note
You must enter the commands in the following task on every OSPF router in the traffic-engineered portion of your network.
Restrictions
MPLS traffic engineering currently supports only a single OSPF area.
SUMMARY STEPS
1.
configure
2.
router ospf instance-name
3.
router-id {ipv4-address | interface-type interface-number}
4.
mpls traffic-eng area area-id
5.
mpls traffic-eng router-id {ip-address | interface-type interface-number}
6.
area area-id
7.
interface type number
8.
end
or
commit
9.
show ospf [instance-name] [area-id] mpls traffic-eng {link | fragment}
DETAILED STEPS
| |
Command or Action
|
Purpose
|
Step 1
|
configure
Example:
RP/0/RP0/CPU0:router# configure
|
Enters global configuration mode.
|
Step 2
|
router ospf instance-name
Example:
RP/0/RP0/CPU0:router(config)# router ospf 1
|
Enables OSPF routing for the specified routing instance, and places the router in router configuration mode.
Note The instance-name argument is any alphanumeric string no longer than 40 characters.
|
Step 3
|
router-id {ipv4-address | interface-type
interface-number}
Example:
RP/0/RP0/CPU0:router(config-router)# router-id
192.168.4.3
|
Configures a router ID for the OSPF process.
Note This identifier of the router acts as a stable IP address and is recommended rather than using the default IP address.
|
Step 4
|
mpls traffic-eng area area-id
Example:
RP/0/RP0/CPU0:router(config-router)# mpls
traffic-eng area 0
|
Configures the OSPF area for MPLS TE.
|
Step 5
|
mpls traffic-eng router-id {ip-address |
interface-type interface-number}
Example:
RP/0/RP0/CPU0:router(config-router)# mpls
traffic-eng router-id loopback 0
|
(Optional) Specifies that the traffic engineering router identifier for the node is the IP address associated with a given interface.
• This IP address is flooded to all nodes.
• For all traffic engineering tunnels originating at other nodes and ending at this node, you must set the tunnel destination to the traffic engineering router identifier of the destination node, because that is the address that the traffic engineering topology database at the tunnel head uses for its path calculation.
• We recommend that loopback interfaces be used for MPLS TE because they are more stable than physical interfaces.
|
Step 6
|
area area-id
Example:
RP/0/RP0/CPU0:router(config-router)# area 0
|
Enters area configuration mode and configures an area for the OSPF process.
• The area-id argument can be entered in dotted-decimal or IPv4 address notation, such as area 1000 or area 0.0.3.232. However, you must choose one form or the other for an area.
|
Step 7
|
interface type number
Example:
RP/0/RP0/CPU0:router(config-ospf-ar)# interface
interface loopback0
|
Enters interface configuration mode and associates one or more interfaces to the area.
|
Step 8
|
end
or
commit
Example:
RP/0/RP0/CPU0:router(config-ospf-ar-if)# end
or
RP/0/RP0/CPU0:router(config-ospf-ar-if)# commit
|
Saves configuration changes.
• When you issue the end command, the system will prompt you to commit changes: Uncommitted changes found. Commit them?
– Entering yes will save configuration changes to the running configuration file, exit the configuration session, and return the router to EXEC mode.
– Entering no will exit the configuration session and return the router to EXEC mode without committing the configuration changes.
• Use the commit command to save the configuration changes to the running configuration file and remain within the configuration session.
|
Step 9
|
show ospf [instance-name] [area-id] mpls
traffic-eng {link | fragment}
Example:
RP/0/RP0/CPU0:router# show ospf 1 0 mpls
traffic-eng link
|
(Optional) Displays information about the links and fragments available on the local router for MPLS TE.
|
Examples
This section provides the following output examples:
•
Sample Output for the show ospf Command Before Configuring MPLS TE
•
Sample Output for the show ospf mpls traffic-eng Command
•
Sample Output for the show ospf Command After Configuring MPLS TE
Sample Output for the show ospf Command Before Configuring MPLS TE
In the following example, the show route ospf EXEC command verifies that POS interface 0/3/0/0 exists and MPLS TE is not configured:
RP/0/RP0/CPU0:router# show route ospf 1 0
O E2 192.168.10.0/24 [110/20] via 192.168.1.2, 00:02:50, POS 0/3/0/0
[110/20] via 192.168.4.1, 00:02:50, POS 0/3/0/1
O E2 192.168.11.0/24 [110/20] via 192.168.1.2, 00:02:50, POS 0/3/0/0
[110/20] via 192.168.4.1, 00:02:50, POS 0/3/0/1
O E2 192.168.244.0/24 [110/20] via 192.168.1.2, 00:02:50, POS 0/3/0/0
[110/20] via 192.168.4.1, 00:02:50, POS 0/3/0/1
O 192.168.12.0/24 [110/2] via 192.168.1.2, 00:02:50, POS 0/3/0/0
[110/2] via 192.168.4.1, 00:02:50, POS 0/3/0/1
Sample Output for the show ospf mpls traffic-eng Command
In the following example, the show ospf mpls traffic-eng EXEC command is used to verify that the MPLS TE fragments are configured correctly:
RP/0/RP0/CPU0:router# show ospf 1 mpls traffic-eng fragment
OSPF Router with ID (192.168.4.3) (Process ID 1)
Area 0 has 1 MPLS TE fragment. Area instance is 3.
MPLS router address is 192.168.4.2
Fragment 0 has 1 link. Fragment instance is 3.
Fragment has 0 link the same as last update.
Fragment advertise MPLS router address
Link is associated with fragment 0. Link instance is 3
Link connected to Point-to-Point network
Interface Address :192.168.50.21
Neighbor Address :192.168.4.1
Maximum bandwidth :19440000
Maximum global pool reservable bandwidth :25000000
Maximum sub pool reservable bandwidth :3125000
Global pool unreserved BW
Priority 0 : 25000000 Priority 1 : 25000000
Priority 2 : 25000000 Priority 3 : 25000000
Priority 4 : 25000000 Priority 5 : 25000000
Priority 6 : 25000000 Priority 7 : 25000000
Priority 0 : 3125000 Priority 1 : 3125000
Priority 2 : 3125000 Priority 3 : 3125000
Priority 4 : 3125000 Priority 5 : 3125000
Priority 6 : 3125000 Priority 7 : 3125000
In the following example, the show ospf mpls traffic-eng EXEC command is used to verify that the MPLS TE links on area instance 3 are configured correctly:
RP/0/RP0/CPU0:router# show ospf mpls traffic-eng link
OSPF Router with ID (192.168.4.1) (Process ID 1)
Area 0 has 1 MPLS TE links. Area instance is 3.
Link is associated with fragment 0. Link instance is 3
Link connected to Point-to-Point network
Interface Address :192.168.20.50
Neighbor Address :192.168.4.1
Maximum bandwidth :19440000
Maximum global pool reservable bandwidth :25000000
Maximum sub pool reservable bandwidth :3125000
Global pool unreserved BW
Priority 0 : 25000000 Priority 1 : 25000000
Priority 2 : 25000000 Priority 3 : 25000000
Priority 4 : 25000000 Priority 5 : 25000000
Priority 6 : 25000000 Priority 7 : 25000000
Priority 0 : 3125000 Priority 1 : 3125000
Priority 2 : 3125000 Priority 3 : 3125000
Priority 4 : 3125000 Priority 5 : 3125000
Priority 6 : 3125000 Priority 7 : 3125000
Sample Output for the show ospf Command After Configuring MPLS TE
In the following example, the show route ospf EXEC command is used to verify that the MPLS TE tunnels replaced POS interface 0/3/0/0 and that configuration was performed correctly:
RP/0/RP0/CPU0:router# show route ospf 1 0
O E2 192.168.10.0/24 [110/20] via 0.0.0.0, 00:00:15, tunnel2
O E2 192.168.11.0/24 [110/20] via 0.0.0.0, 00:00:15, tunnel2
O E2 192.168.1244.0/24 [110/20] via 0.0.0.0, 00:00:15, tunnel2
O 192.168.12.0/24 [110/2] via 0.0.0.0, 00:00:15, tunnel2
Verifying OSPF Configuration and Operation
This task explains how to verify the configuration and operation of OSPF.
Note
To execute OSPFv3 commands for this task, replace ospf with ospfv3 in Steps 1 through 7.
SUMMARY STEPS
1.
show ospf [instance-name]
2.
show ospf [instance-name] border-routers
3.
show ospf [instance-name] database
4.
show ospf [instance-name] [area-id] flood-list interface type number
5.
show ospf [instance-name] [area-id] neighbor [interface-type interface-number] [neighbor-id] [detail]
6.
clear ospf [instance-name] process
7.
clear ospf [instance-name] statistics [neighbor [interface-type interface-number] [ip-address]]
DETAILED STEPS
| |
Command or Action
|
Purpose
|
Step 1
|
show ospf [instance-name]
Example:
RP/0/RP0/CPU0:router# show ospf group1
|
(Optional) Displays general information about OSPF routing processes.
|
Step 2
|
show ospf [instance-name] border-routers
Example:
RP/0/RP0/CPU0:router# show ospf group1
border-routers
|
(Optional) Displays the internal OSPF routing table entries to an ABR and ASBR.
|
Step 3
|
show ospf [instance-name] database
Example:
RP/0/RP0/CPU0:router# show ospf group2 database
|
(Optional) Displays the lists of information related to the OSPF database for a specific router.
• The various forms of this command deliver information about different OSPF LSAs. Refer to the Routing Software Product Commands.
|
Step 4
|
show ospf [instance-name] [area-id] flood-list
interface type number
Example:
RP/0/RP0/CPU0:router# show ospf 100 flood-list
interface pos 0/3/0/0
|
(Optional) Displays a list of OSPF LSAs waiting to be flooded over an interface.
|
Step 5
|
show ospf [instance-name] [area-id] neighbor
[interface-type interface-number] [neighbor-id]
[detail]
Example:
RP/0/RP0/CPU0:router# show ospf 100 neighbor
|
(Optional) Displays OSPF neighbor information on a per-interface basis.
|
Step 6
|
clear ospf [instance-name] process
Example:
RP/0/RP0/CPU0:router# clear ospf 100 process
|
(Optional) Resets an OSPF router process without stopping and restarting it.
|
Step 7
|
clear ospf [instance-name] statistics [neighbor
[interface-type interface-number] [ip-address]]
Example:
RP/0/RP0/CPU0:router# clear ospf 100 statistics
|
(Optional) Clears the OSPF statistics of neighbor state transitions.
|
Configuration Examples for Implementing OSPF on Cisco IOS XR Software
This section provides the following configuration examples:
•
Comparison of Cisco IOS and Cisco IOS XR for OSPF Version 2: Example
•
CLI Inheritance and Precedence for OSPF Version 2: Example
•
MPLS TE for OSPF Version 2: Example
•
ABR with Summarization for OSPFv3: Example
•
ABR Stub Area for OSPFv3: Example
•
ABR Totally Stub Area for OSPFv3: Example
•
Route Redistribution for OSPFv3: Example
•
Virtual Link Configured Through Area 1 for OSPFv3: Example
Comparison of Cisco IOS and Cisco IOS XR for OSPF Version 2: Example
The following example compares how an OSPF interface is configured for an area in Cisco IOS software and then in Cisco IOS XR software.
In Cisco IOS software, OSPF interfaces and areas are configured through the network command.
In Cisco IOS XR software, area 0 must be explicitly configured with the area command and all interfaces that are in the range from 10.1.2.0 to 10.1.2.255 are bound to area 0. Interfaces are configured with the interface command (while the router is in area configuration mode) and the area keyword is not included in the interface statement.
Cisco IOS Software Configuration
ip address 10.1.2.1 10.255.255.255
network 10.1.2.0 0.0.0.255 area 0
Cisco IOS XR Software Configuration
ip address 10.1.2.1 255.255.255.255
The following example compares how OSPF interface parameters are configured for an area in Cisco IOS software and then in Cisco IOS XR software.
In Cisco IOS software, OSPF interface-specific parameters are configured in interface configuration mode.
In Cisco IOS XR software, OSPF interface-specific parameters are configured in interface configuration mode and explicitly defined for area 0. In addition, the ip ospf keywords are no longer required.
Cisco IOS Software Configuration
ip address 10.1.2.1 255.255.255.0
ip ospf authentication message-digest
ip ospf message-digest-key 1 md5 0 test
network 10.1.2.1 0.0.0.0 area 0
Cisco IOS XR Software Configuration
ip address 10.1.2.1 255.255.255.0
authentication message-digest
message-digest-key 1 md5 0 test
The following example compares the hierarchical CLI structure of Cisco IOS XR software to that of Cisco IOS software.
In Cisco IOS software, OSPF areas are configured through the network command.
In Cisco IOS XR software, OSPF areas must be explicitly configured and interfaces configured under the area configuration mode are explicitly bound to that area. In this example, interface 10.1.2.0/24 is bound to area 0 and interface 10.1.3.0/24 is bound to area 1.
Cisco IOS Software Configuration
ip address 10.1.2.1 255.255.255.0
ip address 10.1.3.1 255.255.255.0
network 10.1.2.0 0.0.0.255 area 0
network 10.1.3.0 0.0.0.255 area 1
Cisco IOS XR Software Configuration
ip address 10.1.2.1 255.255.255.0
ip address 10.1.3.1 255.255.255.0
CLI Inheritance and Precedence for OSPF Version 2: Example
The following example configures the cost parameter at different hierarchical levels of the OSPF topology, and illustrates how the parameter is inherited and how only one setting takes precedence. According to the precedence rule, the most explicit configuration is used.
The cost parameter is set to 5 seconds in router configuration mode for the OSPF process. Area 1 sets the cost to 15 seconds and area 6 sets the cost to 30 seconds. All the interfaces in area 0 will inherit a cost of 5 seconds from the OSPF process because the cost was not set in area 0 or its interfaces.
In area 1, every interface will have a cost of 15 seconds, because the cost is set in area 1 and 15 seconds overrides the value 5 seconds that was set in router configuration mode.
Area 4 does not set the cost, but POS interface 01/0/2 sets the cost to 20 seconds. The remaining interfaces in area 4 will have a cost of 5 seconds that is inherited from the OSPF process.
Area 6 sets the cost to 30 seconds that will be inherited by POS interfaces 0/1/0/3 and 0/2/0/3. POS interface 0/3/0/3 will use the cost of 1 second that is set in interface configuration mode.
MPLS TE for OSPF Version 2: Example
The following example shows how to configure the OSPF portion of MPLS TE. However, you still need to build an MPLS TE topology and create an MPLS TE tunnel. Refer to the MPLS Configuration Guide document for information.
In this example loopback interface 0 is associated with area 0 and area 0 is declared to be an MPLS area:
ip address 10.10.10.10 255.255.255.0
ip address 10.1.2.2 255.255.255.0
auto-cost reference-bandwidth 10000
mpls traffic-eng area 0
mpls traffic-eng router-id Loopback 0
ABR with Summarization for OSPFv3: Example
The following example shows the prefix range 2300::/16 summarized from area 1 into the backbone:
ABR Stub Area for OSPFv3: Example
The following example shows that area 1 is configured as a stub area:
ABR Totally Stub Area for OSPFv3: Example
The following example shows that area 1 is configured as a totally stub area:
Route Redistribution for OSPFv3: Example
The following example uses prefix lists to limit the routes redistributed from other protocols.
Only routes with 9898:1000 in the upper 32 bits, and with prefix lengths from 32 to 64 will be redistributed from BGP 42. Only routes not matching this pattern will be redistributed from BGP 1956.
Note
In the initial release of Cisco IOS XR software, this is the only mechanism used to control redistribution. Future releases will add support for RPL.
seq 10 permit 9898:1000::/32 ge 32 le 64
seq 10 deny 9898:1000::/32 ge 32 le 64
seq 20 permit ::/0 le 128
distribute-list prefix-list list1 out bgp 42
distribute-list prefix-list list2 out bgp 1956
Virtual Link Configured Through Area 1 for OSPFv3: Example
This example sets up a virtual link to connect the backbone through area 1 for the OSPFv3 topology that consists of areas 0 and 1, and virtual links 10.0.0.217 and 10.0.0.212:
ABR 1 Configuration
ABR 2 Configuration
Virtual Link Configured with MD5 Authentication for OSPF Version 2: Example
The following examples show how to configure a virtual link to your backbone and apply MD5 authentication. You must perform the steps described on both ABRs at each end of the virtual link.
Once you explicitly configure the ABRs, the configuration will be inherited by all the interfaces bound to that area—unless you override the values and configure them explicitly for the interface.
To understand virtual links, see the "Virtual Link and Transit Area for OSPF" section.
Note
The MD5 authentication feature is not supported for OSPFv3 in this software release.
In this example, all interfaces on router ABR1 use MD5 authentication:
authentication message-digest
message-digest-key 100 md5 0 cisco
In this example, only area 1 interfaces on router ABR3 use MD5 authentication:
authentication message-digest
message-digest-key 100 md5 0 cisco
Where to Go Next
To configure route maps through the RPL for OSPF Version 2, refer to the Implementing Routing Policy on Cisco IOS XR Software document.
To build an MPLS TE topology, create tunnels, and configure forwarding over the tunnel for OSPF Version 2; refer to the Implementing MPLS on Cisco IOS XR Software document.
Additional References
The following sections provide references related to implementing OSPF on Cisco IOS XR software.
Related Documents
Standards
Standards
|
Title
|
No new or modified standards are supported by the features in this document, and support for existing standards had not been modified by the features in this document.
|
—
|
RFCs
RFCs
|
Title
|
RFC 1587
|
Not so Stubby Area (NSSA)
|
RFC 1793
|
OSPF over demand circuit
|
RFC 2328
|
OSPF Version 2
|
RFC 2740
|
OSPFv3
|
Technical Assistance
Description
|
Link
|
Technical Assistance Center (TAC) home page, containing 30,000 pages of searchable technical content, including links to products, technologies, solutions, technical tips, and tools. Registered Cisco.com users can log in from this page to access even more content.
|
http://www.cisco.com/public/support/tac/home.shtml
|