Table Of Contents
OSPF Commands on Cisco IOS XR Software
address-family (OSPF)
area (OSPF)
authentication (OSPF)
authentication-key (OSPF)
auto-cost (OSPF)
capability opaque disable
clear ospf process
clear ospf redistribution
clear ospf routes
clear ospf statistics
cost (OSPF)
database-filter all out (OSPF)
dead-interval (OSPF)
default-cost (OSPF)
default-information originate (OSPF)
default-metric (OSPF)
demand-circuit (OSPF)
disable-dn-bit-check
distance (IP)
distance ospf
distribute-list
domain-id
domain-tag
flood-reduction (OSPF)
hello-interval (OSPF)
ignore lsa mospf
interface (OSPF)
log adjacency changes (OSPF)
max-metric
maximum interfaces (OSPF)
maximum paths (OSPF)
maximum redistributed-prefixes (OSPF)
message-digest-key
mpls ldp sync (OSPF)
mpls traffic-eng (OSPF)
mpls traffic-eng multicast-intact (OSPF)
mpls traffic-eng router-id (OSPF)
mtu-ignore (OSPF)
multi-area-interface
neighbor (OSPF)
neighbor database-filter all out
network (OSPF)
nsf (OSPF)
nsf flush-delay-time (OSPF)
nsf interval (OSPF)
nsf lifetime (OSPF)
nssa (OSPF)
ospf name-lookup
packet-size
passive (OSPF)
priority (OSPF)
protocol shutdown
range (OSPF)
redistribute (OSPF)
retransmit-interval (OSPF)
route policy (OSPF)
router-id (OSPF)
router ospf
security ttl (OSPF)
show ospf
show ospf border-routers
show ospf database
show ospf flood-list
show ospf interface
show ospf mpls traffic-eng
show ospf neighbor
show ospf request-list
show ospf retransmission-list
show ospf routes
show ospf summary-prefix
show ospf virtual-links
show protocols (OSPF)
stub (OSPF)
summary-prefix (OSPF)
timers lsa group-pacing
timers lsa min-arrival
timers throttle lsa all (OSPF)
timers throttle spf (OSPF)
transmit-delay (OSPF)
virtual-link (OSPF)
vrf (OSPF)
OSPF Commands on Cisco IOS XR Software
This chapter describes the commands used to configure and monitor the Open Shortest Path First (OSPF) routing protocol.
For detailed information about OSPF concepts, configuration tasks, and examples, see the Implementing OSPF on Cisco IOS XR Software configuration guide.
address-family (OSPF)
To enter address family configuration mode for Open Shortest Path First (OSPF), use the address-family command in the appropriate mode. To disable address family configuration mode, use the no form of this command.
address-family ipv4 [unicast]
no address-family ipv4 [unicast]
Syntax Description
ipv4
|
Specifies IP Version 4 (IPv4) address prefixes.
|
unicast
|
(Optional) Specifies unicast address prefixes.
|
Defaults
An address family is not specified.
Command Modes
Router configuration
VRF configuration
Command History
Release
|
Modification
|
Release 2.0
|
This command was introduced on the Cisco CRS-1.
|
Release 3.0
|
No modification.
|
Release 3.2
|
This command was supported on the Cisco XR 12000 Series Router.
|
Release 3.3.0
|
This command was added under the VRF configuration mode.
|
Release 3.4.0
|
No modification.
|
Release 3.5.0
|
No modification.
|
Usage Guidelines
To use this command, you must be in a user group associated with a task group that includes the proper task IDs. For detailed information about user groups and task IDs, see the Configuring AAA Services on Cisco IOS XR Software module of the Cisco IOS XR System Security Configuration Guide.
OSPF version 2 automatically provides routing services for IPv4 unicast topologies, so this command is redundant.
Task ID
Task ID
|
Operations
|
ospf
|
read, write
|
Examples
The following example shows how to configure the OSPF router process with IPv4 unicast address prefixes:
RP/0/RP0/CPU0:router(config)# router ospf 1
RP/0/RP0/CPU0:router(config-ospf)# address-family ipv4 unicast
area (OSPF)
To configure an Open Shortest Path First (OSPF) area, use the area command in the appropriate mode. To terminate an OSPF area, use the no form of this command.
area area-id
no area area-id
Syntax Description
area-id
|
Identifier of an OSPF area. The area-id argument can be specified as either a decimal value or an IP address (dotted decimal) format. Range is 0 to 4294967295.
|
Defaults
No OSPF area is defined.
Command Modes
Router configuration
VRF configuration
Command History
Release
|
Modification
|
Release 2.0
|
This command was introduced on the Cisco CRS-1.
|
Release 3.0
|
No modification.
|
Release 3.2
|
This command was supported on the Cisco XR 12000 Series Router.
|
Release 3.3.0
|
This command was added under the VRF configuration mode.
|
Release 3.4.0
|
No modification.
|
Release 3.5.0
|
No modification.
|
Usage Guidelines
To use this command, you must be in a user group associated with a task group that includes the proper task IDs. For detailed information about user groups and task IDs, see the Configuring AAA Services on Cisco IOS XR Software module of the Cisco IOS XR System Security Configuration Guide.
Use the area command to explicitly configure an area. Commands configured under the area configuration mode (such as the interface [OSPF] and authentication commands), are automatically bound to that area.
To modify or remove the area, the area-id argument format must be the same as the format used when creating the area. Otherwise, even if the actual 32-bit value matches, the area is not matched. For example, if you create an area with an area-id of 10 it would not match an area-id of 0.0.0.10.
Note
To remove the specified area from the router configuration, use the no area area-id command. The no area area-id command removes the area and all area options, such as authentication, default-cost, nssa, range, stub, virtual-link, and interface.
Task ID
Task ID
|
Operations
|
ospf
|
read, write
|
Examples
The following example shows how to configure area 0 and Packet-over-SONET/SDH (POS) interface 0/2/0/0. POS interface 0/2/0/0 is bound to area 0 automatically.
RP/0/RP0/CPU0:router# configure
RP/0/RP0/CPU0:router(config)# router ospf 1
RP/0/RP0/CPU0:router(config-ospf)# area 0
RP/0/RP0/CPU0:router(config-ospf-ar)# interface POS 0/2/0/0
authentication (OSPF)
To enable plain text, Message Digest 5 (MD5) authentication, or null authentication for an Open Shortest Path First (OSPF) interface, use the authentication command in the appropriate mode. To remove such authentication, use the no form of this command.
authentication [message-digest [keychain keychain] | null]
no authentication
Syntax Description
message-digest
|
(Optional) Specifies that MD5 is used.
|
keychain keychain
|
(Optional) Specifies a keychain name.
|
null
|
(Optional) Specifies that no authentication is used. Useful for overriding password or MD5 authentication if configured for an area.
|
Defaults
If this command is not specified in interface configuration mode, then the interface adopts the authentication parameter specified by the area.
If this command is not specified in area configuration mode, then the interface adopts the authentication parameter specified for the process.
If this command is not specified at any level, then the interface does not use authentication.
If no keyword is specified, plain text authentication is used.
Command Modes
Interface configuration
Area configuration
Router configuration
Virtual-link configuration
VRF configuration
Multi-area interface configuration
Command History
Release
|
Modification
|
Release 2.0
|
This command was introduced on the Cisco CRS-1.
|
Release 3.0
|
No modification.
|
Release 3.2
|
This command was supported on the Cisco XR 12000 Series Router.
|
Release 3.3.0
|
This command was added under the VRF configuration mode.
|
Release 3.4.0
|
No modification.
|
Release 3.4.1
|
This command was added under the multi-area interface configuration mode.
|
Release 3.5.0
|
The keychain keychain keyword and argument pair was added.
|
Usage Guidelines
To use this command, you must be in a user group associated with a task group that includes the proper task IDs. For detailed information about user groups and task IDs, see the Configuring AAA Services on Cisco IOS XR Software module of the Cisco IOS XR System Security Configuration Guide.
Use the authentication command to specify an authentication type for the interface, which overrides the authentication specified for the area to which this interface belongs. If this command is not included in the configuration file, the authentication configured in the area to which the interface belongs is assumed (as specified by the area authentication command).
The authentication type and password must be the same for all OSPF interfaces that are to communicate with each other through OSPF. If you specified plain text authentication, use the authentication-key command to specify the plain text password.
If you enable MD5 authentication with the message-digest keyword, you must configure a key with the message-digest-key interface command.
To manage the rollover of keys and enhance MD5 authentication for OSPF, you can configure a container of keys called a keychain with each key comprising the following attributes: generate/accept time, key identification, and authentication algorithm. The keychain management feature is always enabled.
Note
Changes to the system clock will impact the validity of the keys in the existing configuration.
Task ID
Task ID
|
Operations
|
ospf
|
read, write
|
Examples
The following example shows how to set authentication for areas 0 and 1 of OSPF routing process 201. Authentication keys are also provided.
RP/0/RP0/CPU0:router# configure
RP/0/RP0/CPU0:router(config)# router ospf 201
RP/0/RP0/CPU0:router(config-ospf)# router-id 10.1.1.1
RP/0/RP0/CPU0:router(config-ospf)# area 0
RP/0/RP0/CPU0:router(config-ospf-ar)# authentication
RP/0/RP0/CPU0:router(config-ospf-ar)# interface POS 0/1/0/1
RP/0/RP0/CPU0:router(config-ospf-ar-if)# authentication-key mykey
RP/0/RP0/CPU0:router(config-ospf-ar-if)# exit
RP/0/RP0/CPU0:router(config-ospf)# area 1
RP/0/RP0/CPU0:router(config-ospf-ar)# authentication
RP/0/RP0/CPU0:router(config-ospf-ar)# interface POS 0/1/0/0
RP/0/RP0/CPU0:router(config-ospf-ar-if)# authentication-key mykey1
The following example shows how to configure use of an authentication keychain:
RP/0/RP0/CPU0:router# configure
RP/0/RP0/CPU0:router(config)# router ospf 201
RP/0/RP0/CPU0:router(config-ospf)# router-id 10.1.1.1
RP/0/RP0/CPU0:router(config-ospf)# authentication message-digest keychain mykeychain
Related Commands
Command
|
Description
|
authentication-key (OSPF)
|
Assigns a password to be used by neighboring routers that are using the simple password authentication of OSPF.
|
message-digest-key
|
Specifies a key used with OSPF MD5 authentication.
|
authentication-key (OSPF)
To assign a password to be used by neighboring routers that are using the Open Shortest Path First (OSPF) simple password authentication, use the authentication-key command in the appropriate mode. To remove a previously assigned OSPF password, use the no form of this command.
authentication-key [clear | encrypted] password
no authentication-key
Syntax Description
clear
|
(Optional) Specifies that the key be clear text.
|
encrypted
|
(Optional) Specifies that the key be encrypted using a two-way algorithm.
|
password
|
Any contiguous string up to 8 characters in length that can be entered from the keyboard. For example, mypswd2.
|
Defaults
If this command is not specified in interface configuration mode, then the interface adopts the OSPF password parameter specified by the area.
If this command is not specified in area configuration mode, then the interface adopts the OSPF password parameter specified for the process.
If this command is not specified at any level, then no password is specified.
Clear is the default if the clear or encrypted keyword is not specified.
Command Modes
Interface configuration
Area configuration
Router configuration
Virtual-link configuration
VRF configuration
Multi-area configuration
Command History
Release
|
Modification
|
Release 2.0
|
This command was introduced on the Cisco CRS-1.
|
Release 3.0
|
No modification.
|
Release 3.2
|
This command was supported on the Cisco XR 12000 Series Router.
The 0 and 7 keywords were changed to clear and encrypted.
|
Release 3.3.0
|
This command was added under the VRF configuration mode.
|
Release 3.4.0
|
No modification.
|
Release 3.4.1
|
This command was added under the multi-area interface configuration mode.
|
Release 3.5.0
|
No modification.
|
Usage Guidelines
To use this command, you must be in a user group associated with a task group that includes the proper task IDs. For detailed information about user groups and task IDs, see the Configuring AAA Services on Cisco IOS XR Software module of the Cisco IOS XR System Security Configuration Guide.
The password created by this command is inserted directly into the OSPF header when the Cisco IOS XR software originates routing protocol packets. A separate password can be assigned to each network on an individual interface basis. All neighboring routers on the same network must have the same password to be able to exchange OSPF information.
The authentication-key command must be used with the authentication command. If the authentication command is not configured, the password provided by the authentication-key command is ignored and no authentication is adopted by the OSPF interface.
Note
The authentication-key command cannot be used with the authentication command when the message-digest or null keyword is configured.
Task ID
Task ID
|
Operations
|
ospf
|
read, write
|
Examples
The following example shows how to configure an authentication password as the string yourpass:
RP/0/RP0/CPU0:router# configure
RP/0/RP0/CPU0:router(config)# router ospf 201
RP/0/RP0/CPU0:router(config-ospf)# authentication-key yourpass
Related Commands
auto-cost (OSPF)
To control how the Open Shortest Path First (OSPF) protocol calculates default metrics for the interface, use the auto-cost command in the appropriate mode. To revert to the default reference bandwidth, use the no form of this command.
auto-cost {reference-bandwidth mbps | disable}
no auto-cost {reference-bandwidth | disable}
Syntax Description
reference-bandwidth mbps
|
Specifies a rate in Mbps (bandwidth). Range is 1 to 4294967.
|
disable
|
Assigns a cost based on interface type.
|
Defaults
mbps: 100 Mbps
Command Modes
Router configuration
VRF configuration
Command History
Release
|
Modification
|
Release 2.0
|
This command was introduced on the Cisco CRS-1.
|
Release 3.0
|
No modification.
|
Release 3.2
|
This command was supported on the Cisco XR 12000 Series Router.
|
Release 3.3.0
|
This command was added under the VRF configuration mode.
|
Release 3.4.0
|
No modification.
|
Release 3.5.0
|
No modification.
|
Usage Guidelines
To use this command, you must be in a user group associated with a task group that includes the proper task IDs. For detailed information about user groups and task IDs, see the Configuring AAA Services on Cisco IOS XR Software module of the Cisco IOS XR System Security Configuration Guide.
By default OSPF calculates the OSPF metric for an interface according to the bandwidth of the interface.
The OSPF metric is calculated as the mbps value divided by bandwidth, with mbps equal to 108 by default.
If you have multiple links with high bandwidth (such as OC-192), you might want to use a larger number to differentiate the cost on those links. That is, the metric calculated using the default mbps value is the same for all high-bandwidth links.
Recommended usage of cost configuration for OSPF interfaces with high bandwidth is to be consistent: Either explicitly configure (by using the cost command) or choose the default (by using the auto-cost command).
The value set by the cost command overrides the cost resulting from the auto-cost command.
Task ID
Task ID
|
Operations
|
ospf
|
read, write
|
Examples
The following example shows how to set the reference value for the auto cost calculation to 1000 Mbps:
RP/0/RP0/CPU0:router# configure
RP/0/RP0/CPU0:router(config)# router ospf 1
RP/0/RP0/CPU0:router(config-ospf)# auto-cost reference-bandwidth 1000
Related Commands
Command
|
Description
|
cost (OSPF)
|
Explicitly specifies the cost of the interface (network) for OSPF path calculation.
|
capability opaque disable
To prevent Multiprotocol Label Switching traffic engineering (MPLS TE) topology information flooded to the network through opaque LSAs, use the capability opaque disable command in the appropriate mode.
capability opaque disable
no capability opaque disable
Command Default
Opaque LSAs are allowed.
Command Modes
Router configuration
VRF configuration
Command History
Release
|
Modification
|
Release 2.0
|
This command was introduced on the Cisco CRS-1.
|
Release 3.0
|
No modification.
|
Release 3.2
|
This command was supported on the Cisco XR 12000 Series Router. The enable keyword was removed.
|
Release 3.3.0
|
This command was added under the VRF configuration mode.
|
Release 3.4.0
|
No modification.
|
Release 3.5.0
|
No modification.
|
Usage Guidelines
To use this command, you must be in a user group associated with a task group that includes the proper task IDs. For detailed information about user groups and task IDs, see the Configuring AAA Services on Cisco IOS XR Software module of the Cisco IOS XR System Security Configuration Guide.
The capability opaque disable command prevents flooded MPLS TE information (Types 1 and 4) through opaque LSAs of all scope (Types 9, 10, and 11).
Control opaque LSA support capability must be enabled for OSPF to support MPLS TE.
The MPLS TE topology information is flooded to the area through opaque LSAs by default.
Task ID
Task ID
|
Operations
|
ospf
|
read, write
|
Examples
The following example shows how to prevent OSPF from supporting opaque services:
RP/0/RP0/CPU0:router# configure
RP/0/RP0/CPU0:router(config)# router ospf 1
RP/0/RP0/CPU0:router(config-ospf)# capability opaque disable
clear ospf process
To reset an Open Shortest Path First (OSPF) router process without stopping and restarting it, use the clear ospf process command in EXEC mode.
clear ospf [process-name [vrf [vrf-name | all]]] process
Syntax Description
process-name
|
(Optional) Name that uniquely identifies an OSPF routing process. The process name is defined by the router ospf command. If this argument is included, only the specified routing process is affected. Otherwise, all OSPF processes are reset.
|
vrf
|
(Optional) An OSPF VPN routing and forwarding (VRF) instance.
|
vrf-name
|
(Optional) Name of the OSPF VRF instance to be reset.
|
all
|
(Optional) Resets all OSPF VRF instances.
|
Defaults
No default behavior or value
Command Modes
EXEC
Command History
Release
|
Modification
|
Release 2.0
|
This command was introduced on the Cisco CRS-1.
|
Release 3.0
|
No modification.
|
Release 3.2
|
This command was supported on the Cisco XR 12000 Series Router.
|
Release 3.3.0
|
The vrf keyword was added.
|
Release 3.4.0
|
No modification.
|
Release 3.5.0
|
No modification.
|
Usage Guidelines
To use this command, you must be in a user group associated with a task group that includes the proper task IDs. For detailed information about user groups and task IDs, see the Configuring AAA Services on Cisco IOS XR Software module of the Cisco IOS XR System Security Configuration Guide.
When the OSPF router process is reset, OSPF releases all resources allocated, cleans up the internal database, and shuts down and restarts all interfaces that belong to the process.
Note
The clear ospf process command may change the router ID unless the OSPF router ID is explicitly configured through the router-id (OSPF) command.
Task ID
Task ID
|
Operations
|
ospf
|
read, write
|
Examples
The following example shows how to reset all OSPF processes:
RP/0/RP0/CPU0:router# clear ospf process
The following example shows how to reset the OSPF process 1:
RP/0/RP0/CPU0:router# clear ospf 1 process
Related Commands
clear ospf redistribution
To clear all routes redistributed from other protocols out of the Open Shortest Path First (OSPF) routing table, use the clear ospf redistribution command in EXEC mode.
clear ospf [process-name [vrf [vrf-name | all]]] redistribution
Syntax Description
process-name
|
(Optional) Name that uniquely identifies an OSPF routing process. The process name is defined by the router ospf command. If this argument is included, only the specified routing process is affected. Otherwise, all OSPF routes are cleared.
|
vrf
|
(Optional) OSPF VPN routing and forwarding (VRF) instance.
|
vrf-name
|
(Optional) Name of the OSPF VRF instance to be reset.
|
all
|
(Optional) Resets all OSPF VRF instances.
|
Defaults
No default behavior or value
Command Modes
EXEC
Command History
Release
|
Modification
|
Release 2.0
|
This command was introduced on the Cisco CRS-1.
|
Release 3.0
|
No modification.
|
Release 3.2
|
This command was supported on the Cisco XR 12000 Series Router.
|
Release 3.3.0
|
The vrf keyword was added.
|
Release 3.4.0
|
No modification.
|
Release 3.5.0
|
No modification.
|
Usage Guidelines
To use this command, you must be in a user group associated with a task group that includes the proper task IDs. For detailed information about user groups and task IDs, see the Configuring AAA Services on Cisco IOS XR Software module of the Cisco IOS XR System Security Configuration Guide.
Use the clear ospf redistribution command to cause the routing table to be read again. OSPF regenerates and sends Type 5 and Type 7 link-state advertisements (LSAs) to its neighbors. If an unexpected route has appeared in the OSPF redistribution, using this command corrects the issue.
Note
Use of this command can cause a significant number of LSAs to flood the network. We recommend that you use this command with caution.
Task ID
Task ID
|
Operations
|
ospf
|
read, write
|
Examples
The following example shows how to clear all redistributed routes across all processes from other protocols:
RP/0/RP0/CPU0:router# clear ospf redistribution
clear ospf routes
To clear all Open Shortest Path First (OSPF) routes from the OSPF routing table, use the clear ospf routes command in EXEC mode.
clear ospf [process-name [vrf [vrf-name | all]]] routes
Syntax Description
process-name
|
(Optional) Name that uniquely identifies an OSPF routing process. The process name is defined by the router ospf command. If this argument is included, only the specified routing process is affected. Otherwise, all OSPF routes are cleared.
|
vrf
|
(Optional) OSPF VPN routing and forwarding (VRF) instance.
|
vrf-name
|
(Optional) Name of the OSPF VRF instance to be reset.
|
all
|
(Optional) Resets all OSPF VRF instances.
|
Defaults
No default behavior or value
Command Modes
EXEC
Command History
Release
|
Modification
|
Release 2.0
|
This command was introduced on the Cisco CRS-1.
|
Release 3.0
|
No modification.
|
Release 3.2
|
This command was supported on the Cisco XR 12000 Series Router. The topology keyword was replaced with the routes keyword.
|
Release 3.3.0
|
The vrf keyword was added.
|
Release 3.4.0
|
No modification.
|
Release 3.5.0
|
No modification.
|
Usage Guidelines
To use this command, you must be in a user group associated with a task group that includes the proper task IDs. For detailed information about user groups and task IDs, see the Configuring AAA Services on Cisco IOS XR Software module of the Cisco IOS XR System Security Configuration Guide.
Task ID
Task ID
|
Operations
|
ospf
|
read, write
|
Examples
The following example shows how to clear all OSPF routes from the OSPF routing table and recompute valid routes. When the OSPF routing table is cleared, OSPF routes in the global routing table are also recalculated.
RP/0/RP0/CPU0:router# clear ospf routes
Related Commands
Command
|
Description
|
router ospf
|
Configures an OSPF routing process.
|
clear ospf statistics
To clear the Open Shortest Path First (OSPF) statistics of neighbor state transitions, use the clear ospf statistics command in EXEC mode.
clear ospf [process-name [vrf [vrf-name | all]]] statistics [neighbor [interface-type
interface-instance] [ip-address]]
Syntax Description
process-name
|
(Optional) Name that uniquely identifies an OSPF routing process. The process name is defined by the router ospf command. If this argument is included, only the specified routing process is affected. Otherwise, all OSPF statistics of neighbor state transitions are cleared.
|
vrf
|
(Optional) OSPF VPN routing and forwarding (VRF) instance.
|
vrf-name
|
(Optional) Name of the OSPF VRF instance to be reset.
|
all
|
(Optional) Resets all OSPF VRF instances.
|
neighbor
|
(Optional) Clears the state transition counters of the specified neighbor only.
|
interface-type
|
(Optional) Interface type. For more information, use the question mark (?) online help function.
|
interface-instance
|
(Optional) Either a physical interface instance or a virtual interface instance:
• Physical interface instance. Naming notation is rack/slot/module/port and a slash between values is required as part of the notation.
– rack: Chassis number of the rack.
– slot: Physical slot number of the line card.
– module: Module number. A physical layer interface module (PLIM) is always 0.
– port: Physical port number of the interface.
• Virtual interface instance. Number range varies depending on interface type.
For more information about the syntax for the router, use the question mark (?) online help function.
|
ip-address
|
(Optional) IP address of a specified neighbor for whom you want to clear the state transition counter.
|
Defaults
No default behavior or value
Command Modes
EXEC
Command History
Release
|
Modification
|
Release 2.0
|
This command was introduced on the Cisco CRS-1.
|
Release 3.0
|
No modification.
|
Release 3.2
|
This command was supported on the Cisco XR 12000 Series Router.
|
Release 3.3.0
|
The vrf keyword was added.
|
Release 3.4.0
|
No modification.
|
Release 3.5.0
|
No modification.
|
Usage Guidelines
To use this command, you must be in a user group associated with a task group that includes the proper task IDs. For detailed information about user groups and task IDs, see the Configuring AAA Services on Cisco IOS XR Software module of the Cisco IOS XR System Security Configuration Guide.
Use the clear ospf statistics command to reset OSPF counters. Reset is useful to detect changes in counter values.
Task ID
Task ID
|
Operations
|
ospf
|
read, write
|
Examples
The following example shows how to reset the OSPF transition state counters for all neighbors on Packet-over-SONET/SDH (POS) interface 0/2/0/0:
RP/0/RP0/CPU0:router# clear ospf statistics neighbor POS 0/2/0/0
Related Commands
Command
|
Description
|
router ospf
|
Configures an OSPF routing process.
|
cost (OSPF)
To explicitly specify the interface (network) for Open Shortest Path First (OSPF) path calculation, use the cost command in the appropriate mode. To remove the cost, use the no form of this command.
cost cost
no cost
Syntax Description
cost
|
Unsigned integer value expressed as the link-state metric. Range is 1 to 65535.
|
Defaults
If this command is not specified in interface configuration mode, then the interface adopts the cost parameter specified by the area.
If this command is not specified in area configuration mode, then the interface adopts the cost parameter specified for the process.
If this command is not specified at any level, then the cost is calculated by the auto-cost command.
Command Modes
Interface configuration
Area configuration
Router configuration
VRF configuration
Multi-area configuration
Command History
Release
|
Modification
|
Release 2.0
|
This command was introduced on the Cisco CRS-1.
|
Release 3.0
|
No modification.
|
Release 3.2
|
This command was supported on the Cisco XR 12000 Series Router.
|
Release 3.3.0
|
This command was added under the VRF configuration mode.
|
Release 3.4.0
|
No modification.
|
Release 3.4.1
|
This command was added under the multi-area interface configuration mode.
|
Release 3.5.0
|
No modification.
|
Usage Guidelines
To use this command, you must be in a user group associated with a task group that includes the proper task IDs. For detailed information about user groups and task IDs, see the Configuring AAA Services on Cisco IOS XR Software module of the Cisco IOS XR System Security Configuration Guide.
The link-state metric is advertised as the link cost in the router link advertisement. Cisco IOS XR software does not support type of service (ToS), so you can assign only one cost for each interface.
In general, the path cost is calculated using the following formula:
10^8 / bandwidth (the default auto cost is set to 100 Mbps)
This calculation is the default reference bandwidth used by the auto-costing calculation which establishes the interface auto-cost The auto-cost command can set this reference bandwidth to some other value. The cost command is used to override the auto-costing calculated default value for interfaces.
Using this formula, the default path cost is 1 for any interface that has a link bandwidth of 100 Mbps or higher. If this value does not suit the network, configure the reference bandwidth for auto calculating costs based on the link bandwidth.
The value set by the cost command overrides the cost resulting from the auto-cost (OSPF) command.
Task ID
Task ID
|
Operations
|
ospf
|
read, write
|
Examples
The following example shows how to set the cost value to 65 for Packet-over-SONET/SDH (POS) interface 0/1/0/1:
RP/0/RP0/CPU0:router# configure
RP/0/RP0/CPU0:router(config)# router ospf 1
RP/0/RP0/CPU0:router(config-ospf)# area 0
RP/0/RP0/CPU0:router(config-ospf-ar)# interface POS 0/1/0/1
RP/0/RP0/CPU0:router(config-ospf-ar-if)# cost 65
Related Commands
Command
|
Description
|
auto-cost (OSPF)
|
Controls how the OSPF protocol calculates default metrics for the interface.
|
database-filter all out (OSPF)
To filter outgoing link-state advertisements (LSAs) to an Open Shortest Path First (OSPF) interface, use the database-filter all out command in the appropriate mode. To restore the forwarding of LSAs to the interface, use the disable form of the command.
database-filter all out [disable | enable]
Syntax Description
disable
|
(Optional) Disables filtering.
|
enable
|
(Optional) Enables filtering.
|
Defaults
The database filter is disabled.
Command Modes
Interface configuration
Area configuration
Router configuration
VRF configuration
Multi-area configuration
Command History
Release
|
Modification
|
Release 2.0
|
This command was introduced on the Cisco CRS-1.
|
Release 3.0
|
No modification.
|
Release 3.2
|
This command was supported on the Cisco XR 12000 Series Router.
|
Release 3.3.0
|
This command was added under the VRF configuration mode.
|
Release 3.4.0
|
No modification.
|
Release 3.4.1
|
This command was added under the multi-area interface configuration mode.
|
Release 3.5.0
|
No modification.
|
Usage Guidelines
To use this command, you must be in a user group associated with a task group that includes the proper task IDs. For detailed information about user groups and task IDs, see the Configuring AAA Services on Cisco IOS XR Software module of the Cisco IOS XR System Security Configuration Guide.
Use the database-file all out command to perform the same function that the neighbor database-filter all out command performs on a neighbor basis.
Task ID
Task ID
|
Operations
|
ospf
|
read, write
|
Examples
The following example shows how to prevent flooding of OSPF LSAs to broadcast, nonbroadcast, and point-to-point networks reachable through Packet-over-SONET/SDH (POS) interface 0/1/0/1:
RP/0/RP0/CPU0:router# configure
RP/0/RP0/CPU0:router(config)# router ospf 1
RP/0/RP0/CPU0:router(config-ospf)# area 0
RP/0/RP0/CPU0:router(config-ospf-ar)# interface POS 0/1/0/1
RP/0/RP0/CPU0:router(config-ospf-ar-if)# database-filter all out
Related Commands
dead-interval (OSPF)
To set the interval after which a neighbor is declared dead when no hello packets are observed, use the dead-interval command in the appropriate mode. To return to the default time, use the no form of this command.
dead-interval seconds
no dead-interval
Syntax Description
seconds
|
Integer that specifies the interval (in seconds). Range is 1 to 65535. The value must be the same for all nodes on the network.
|
Defaults
If this command is not specified in interface configuration mode, then the interface adopts the dead interval parameter specified by the area.
If this command is not specified in area configuration mode, then the interface adopts the dead interval parameter specified for the process.
If this command is not specified at any level, then the dead interval is four times the interval set by the hello-interval (OSPF) command.
Command Modes
Interface configuration
Area configuration
Router configuration
Virtual-link configuration
VRF configuration
Multi-area configuration
Command History
Release
|
Modification
|
Release 2.0
|
This command was introduced on the Cisco CRS-1.
|
Release 3.0
|
No modification.
|
Release 3.2
|
This command was supported on the Cisco XR 12000 Series Router.
|
Release 3.3.0
|
This command was added under the VRF configuration mode.
|
Release 3.4.0
|
No modification.
|
Release 3.4.1
|
This command was added under the multi-area interface configuration mode.
|
Release 3.5.0
|
No modification.
|
Usage Guidelines
To use this command, you must be in a user group associated with a task group that includes the proper task IDs. For detailed information about user groups and task IDs, see the Configuring AAA Services on Cisco IOS XR Software module of the Cisco IOS XR System Security Configuration Guide.
The dead interval value must be the same for all routers and access servers on a specific network.
If the hello interval is configured, the dead interval value must be larger than the hello interval value. The dead interval value is usually configured four times larger than the hello interval value.
Task ID
Task ID
|
Operations
|
ospf
|
read, write
|
Examples
The following example shows how to set the OSPF dead interval to 40 seconds:
RP/0/RP0/CPU0:router# configure
RP/0/RP0/CPU0:router(config)# router ospf 1
RP/0/RP0/CPU0:router(config-ospf)# area 0
RP/0/RP0/CPU0:router(config-ospf-ar)# interface POS 0/1/0/1
RP/0/RP0/CPU0:router(config-ospf-ar-if)# dead-interval 40
Related Commands
Command
|
Description
|
hello-interval (OSPF)
|
Specifies the interval between hello packets that the Cisco IOS XR software sends on the interface.
|
default-cost (OSPF)
To specify a cost for the default summary route sent into a stub area or not-so-stubby area (NSSA), use the default-cost command in area configuration mode. To remove the assigned default route cost, use the no form of this command.
default-cost cost
no default-cost cost
Syntax Description
cost
|
Cost for the default summary route used for a stub or NSSA area. The acceptable value is a 24-bit number.
|
Defaults
cost: 1
Command Modes
Area configuration
Command History
Release
|
Modification
|
Release 2.0
|
This command was introduced on the Cisco CRS-1.
|
Release 3.0
|
No modification.
|
Release 3.2
|
This command was supported on the Cisco XR 12000 Series Router.
|
Release 3.3.0
|
No modification.
|
Release 3.4.0
|
No modification.
|
Release 3.5.0
|
No modification.
|
Usage Guidelines
To use this command, you must be in a user group associated with a task group that includes the proper task IDs. For detailed information about user groups and task IDs, see the Configuring AAA Services on Cisco IOS XR Software module of the Cisco IOS XR System Security Configuration Guide.
Use the default-cost command only on an Area Border Router (ABR) attached to a stub or an NSSA area.
In all routers and access servers attached to the stub area, the area should be configured as a stub area using the stub command in the area submode. Use the default-cost command only on an ABR attached to the stub area. The default-cost command provides the metric for the summary default route generated by the ABR into the stub area.
Task ID
Task ID
|
Operations
|
ospf
|
read, write
|
.
Examples
The following example shows how to assign a default cost of 20 to a stub area (the Packet-over-SONET/SDH (POS) interface 0/4/0/3 is also configured in the stub area):
RP/0/RP0/CPU0:router# configure
RP/0/RP0/CPU0:router(config)# router ospf 201
RP/0/RP0/CPU0:router(config-ospf)# area 10.15.0.0
RP/0/RP0/CPU0:router(config-ospf-ar)# stub
RP/0/RP0/CPU0:router(config-ospf-ar)# default-cost 20
RP/0/RP0/CPU0:router(config-ospf-ar)# interface POS 0/4/0/3
Related Commands
Command
|
Description
|
stub (OSPF)
|
Defines an area as a stub area.
|
default-information originate (OSPF)
To generate a default external route into an Open Shortest Path First (OSPF) routing domain, use the default-information originate command in the appropriate mode. To disable this feature, use the no form of this command.
default-information originate [always] [metric metric-value] [metric-type type-value]
[route-policy policy-name]
no default-information originate
Syntax Description
always
|
(Optional) Always advertises the default route regardless of whether the routing table h |