Cisco IOS IP Routing Protocols Command Reference
OSPF Commands: A through ip ospf demand-circuit

Table Of Contents

OSPF Commands

area authentication

area default-cost

area filter-list

area nssa

area nssa translate

area range

area sham-link

area stub

area virtual-link

auto-cost

capability lls

capability transit

capability vrf-lite

clear ip ospf

clear ip ospf traffic

clear ipv6 ospf traffic

compatible rfc1583

default-information originate (OSPF)

default-metric (OSPF)

discard-route

distance ospf

domain-id (OSPF)

domain-tag

ignore lsa mospf

interface-id snmp-if-index

ip ospf area

ip ospf authentication

ip ospf authentication-key

ip ospf bfd

ip ospf cost

ip ospf database-filter all out

ip ospf dead-interval

ip ospf demand-circuit


OSPF Commands


area authentication

To enable authentication for an Open Shortest Path First (OSPF) area, use the area authentication command in router configuration mode. To remove an authentication specification of an area or a specified area from the configuration, use the no form of this command.

area area-id authentication [message-digest]

no area area-id authentication [message-digest]

Syntax Description

area-id

Identifier of the area for which authentication is to be enabled. The identifier can be specified as either a decimal value or an IP address.

message-digest

(Optional) Enables Message Digest 5 (MD5) authentication on the area specified by the area-id argument.


Defaults

Type 0 authentication (no authentication)

Command Modes

Router configuration

Command History

Release
Modification

10.0

This command was introduced.

11.0

The message-digest keyword was added.

12.2(33)SRA

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

12.2SX

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


Usage Guidelines

Specifying authentication for an area sets the authentication to Type 1 (simple password) as specified in RFC 1247. If this command is not included in the configuration file, authentication of Type 0 (no authentication) is assumed.

The authentication type must be the same for all routers and access servers in an area. The authentication password for all OSPF routers on a network must be the same if they are to communicate with each other via OSPF. Use the ip ospf authentication-key interface command to specify this password.

If you enable MD5 authentication with the message-digest keyword, you must configure a password with the ip ospf message-digest-key interface command.

To remove the authentication specification for an area, use the no form of this command with the authentication keyword.


Note To remove the specified area from the software configuration, use the no area area-id command (with no other keywords). That is, the no area area-id command removes all area options, such as area authentication, area default-cost, area nssa, area range, area stub, and area virtual-link.


Examples

The following example mandates authentication for areas 0 and 10.0.0.0 of OSPF routing process 201. Authentication keys are also provided.

interface ethernet 0
 ip address 192.168.251.201 255.255.255.0
 ip ospf authentication-key adcdefgh
!
interface ethernet 1
 ip address 10.56.0.201 255.255.0.0
 ip ospf authentication-key ijklmnop
!
router ospf 201
 network 10.0.0.0 0.255.255.255 area 10.0.0.0
 network 192.168.0.0 0.0.255.255 area 0
 area 10.0.0.0 authentication
 area 0 authentication

Related Commands

Command
Description

area default-cost

Specifies a cost for the default summary route sent into a stub area.

area stub

Defines an area as a stub area.

ip ospf authentication-key

Assigns a password to be used by neighboring routers that are using the simple password authentication of OSPF.

ip ospf message-digest-key

Enables OSPF MD5 authentication.


area default-cost

To specify a cost for the default summary route that is sent into a stub area or not-so-stubby area (NSSA), use the area default-cost command in router address family topology or router configuration mode. To remove the assigned default route cost, use the no form of this command.

area area-id default-cost cost

no area area-id default-cost cost

Syntax Description

area-id

Identifier for the stub area or NSSA. The identifier can be specified as either a decimal value or an IP address.

cost

Cost for the default summary route used for a stub or NSSA. The acceptable value is a 24-bit number.


Command Default

cost: 1

Command Modes

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

Command History

Release
Modification

10.0

This command was introduced.

12.2(33)SRA

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

12.2(33)SRB

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

12.2SX

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


Usage Guidelines

This command is used only on an Area Border Router (ABR) attached to a stub area or NSSA.

There are two stub area router configuration commands: the stub and default-cost options of the area command. In all routers and access servers attached to the stub area, the area should be configured as a stub area using the stub option of the area command. Use the default-cost option only on an ABR attached to the stub area. The default-cost option provides the metric for the summary default route generated by the ABR into the stub area.


Note To remove the specified area from the software configuration, use the no area area-id command (with no other keywords). That is, the no area area-id command removes all area options, such as area authentication, area default-cost, area nssa, area range, area stub, and area virtual-link.


Release 12.2(33)SRB

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

Examples

The following example assigns a default cost of 20 to stub network 10.0.0.0:

interface ethernet 0
 ip address 10.56.0.201 255.255.0.0
!
router ospf 201
 network 10.0.0.0 0.255.255.255 area 10.0.0.0
 area 10.0.0.0 stub
 area 10.0.0.0 default-cost 20

Related Commands

Command
Description

area authentication

Enables authentication for an OSPF area.

area stub

Defines an area as a stub area.


area filter-list

To filter prefixes advertised in type 3 link-state advertisements (LSAs) between Open Shortest Path First (OSPF) areas of an Area Border Router (ABR), use the area filter-list command in router address family topology or router configuration mode. To change or cancel the filter, use the no form of this command.

area area-id filter-list prefix prefix-list-name {in | out}

no area area-id filter-list prefix prefix-list-name {in | out}

Syntax Description

area-id

Identifier of the area for which filtering is configured. The identifier can be specified as either a decimal value or an IP address.

prefix

Indicates that a prefix list is used.

prefix-list-name

Name of a prefix list.

in

The prefix list is applied to prefixes advertised to the specified area from other areas.

out

The prefix list is applied to prefixes advertised out of the specified area to other areas.


Command Default

This command is disabled by default. The router will not filter prefixes.

Command Modes

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

Command History

Release
Modification

12.0(15)S

This command was introduced.

12.2(4)T

This command was integrated into Cisco IOS Release 12.2(4)T.

12.2(28)SB

This command was integrated into Cisco IOS Release 12.2(28)SB.

12.2(33)SRB

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


Usage Guidelines

With this feature enabled in the "in" direction, all type 3 LSAs originated by the ABR to this area, based on information from all other areas, are filtered by the prefix list. Type 3 LSAs that were originated as a result of the area range command in another area are treated like any other type 3 LSA that was originated individually. Any prefix that does not match an entry in the prefix list is implicitly denied.

With this feature enabled in the "out" direction, all type 3 LSAs advertised by the ABR, based on information from this area to all other areas, are filtered by the prefix list. If the area range command has been configured for this area, type 3 LSAs that correspond to the area range are sent to all other areas, only if at least one prefix in the area range matches an entry in the prefix list.

If all specific prefixes are denied by the prefix list, type 3 LSAs that correspond to the area range command will not be sent to any other area. Prefixes that are not permitted by the prefix list are implicitly denied.

Release 12.2(33)SRB

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

Examples

The following example filters prefixes that are sent from all other areas to area 1:

area 1 filter-list prefix AREA_1 in 

Related Commands

Command
Description

area range

Consolidates and summarizes routes at an area boundary.


area nssa

To configure an area as a not-so-stubby area (NSSA), use the area nssa command in router address family topology or router configuration mode. To remove the NSSA distinction from the area, use the no form of this command.

area area-id nssa [no-redistribution] [default-information-originate [metric] [metric-type]] [no-summary]

no area area-id nssa [no-redistribution] [default-information-originate [metric] [metric-type]] [no-summary]

Syntax Description

area-id

Identifier for the stub area or NSSA. The identifier can be specified as either a decimal value or an IP address.

no-redistribution

(Optional) Used when the router is an NSSA Area Border Router (ABR) and you want the redistribute command to import routes only into the normal areas, but not into the NSSA area.

default-information-
originate

(Optional) Used to generate a Type 7 default into the NSSA area. This keyword takes effect only on the NSSA ABR or the NSSA Autonomous System Boundary Router (ASBR).

metric

(Optional) OSPF default metric.

metric-type

(Optional) OSPF metric type for default routes.

no-summary

(Optional) Allows an area to be a not-so-stubby area but not have summary routes injected into it.


Command Default

No NSSA area is defined.

Command Modes

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

Command History

Release
Modification

10.0

This command was introduced.

12.2(33)SRA

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

12.2(33)SRB

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

12.2SX

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


Usage Guidelines

To remove the specified area from the software configuration, use the no area area-id command (with no other keywords). That is, the no area area-id command removes all area options, such as area authentication, area default-cost, area nssa, area range, area stub, and area virtual-link.

Release 12.2(33)SRB

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

Examples

The following example makes area 1 an NSSA area:

router ospf 1
 redistribute rip subnets
 network 172.19.92.0 0.0.0.255 area 1
 area 1 nssa

Related Commands

Command
Description

redistribute

Redistributes routes from one routing domain into another routing domain.


area nssa translate

To configure an area as a not-so-stubby area (NSSA) and to configure the OSPF Forwarding Address Suppression in Translated Type-5 LSAs feature, use the area nssa translate command in router address family topology or router configuration mode. To remove the NSSA distinction from the area, use the no form of this command.

area area-id nssa translate type7 suppress-fa

no area area-id nssa translate type7 suppress-fa

Syntax Description

area-id

Identifier for the stub area or NSSA. The identifier can be specified as either a decimal value or an IP address.

translate

Translates one type of LSA to another type of LSA. This keyword takes effect only on an NSSA Area Border Router (ABR) or an NSSA Autonomous System Boundary Router (ASBR).

type7

Translates a Type-7 LSA to a Type-5 LSA. This keyword takes effect only on an NSSA ABR or an NSSA ASBR.

suppress-fa

Suppresses the forwarding address of the Type-7 LSAs from being placed in the Type-5 LSAs. This keyword takes effect only on an NSSA ABR or an NSSA ASBR.


Command Default

No translation occurs.

Command Modes

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

Command History

Release
Modification

12.2(15)T

This command was introduced.

12.2(27)SBC

This command was integrated into Cisco IOS Release 12.2(27)SBC.

12.2(33)SRA

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

12.2(33)SRB

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

12.2SX

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


Usage Guidelines

To configure the OSPF Forwarding Address Suppression in Translated Type-5 LSAs feature, configure the translate type7 suppress-fa keywords. Consider the following caution.


Caution Configuring the OSPF Forwarding Address Suppression in Translated Type-5 LSAs feature causes the router to be noncompliant with RFC 1587. Also, suboptimal routing might result because there might be better paths to reach the destination's forwarding address. This feature should not be configured without careful consideration and not until the network topology is understood.

If the translate keyword is used in addition to the no-redistribution or default-information-originate keywords, two separate lines for the area nssa command appear in the configuration file for ease of readability. For example, if the area 6 nssa no-redistribution translate type7 suppress-fa command is configured, the following lines would appear in the configuration file:

router ospf 1
 area 6 nssa no-redistribution
 area 6 nssa translate type7 suppress-fa

To remove the specified area from the software configuration, use the no area area-id command (with no other keywords). That is, the no area area-id command removes all area options, such as area authentication, area default-cost, area nssa, area range, area stub, and area virtual-link.

Release 12.2(33)SRB

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

Examples

The following example causes OSPF to translate Type-7 LSAs from area 1 to Type-5 LSAs, but not place the Type-7 forwarding address into the Type-5 LSAs. OSPF places 0.0.0.0 as the forwarding address in the Type-5 LSAs.

router ospf 2
 network 172.19.92.0 0.0.0.255 area 1
 area 1 nssa translate type7 suppress-fa

Related Commands

Command
Description

redistribute

Redistributes routes from one routing domain into another routing domain.


area range

To consolidate and summarize routes at an area boundary, use the area range command in router address family topology or router configuration mode. To disable this function, use the no form of this command.

area area-id range ip-address ip-address-mask [advertise | not-advertise] [cost cost]

no area area-id range ip-address ip-address-mask [advertise | not-advertise] [cost cost]

Syntax Description

area-id

Identifier of the area for which routes are to be summarized. It can be specified as either a decimal value or an IPv6 prefix.

ip-address

IP address.

ip-address-mask

IP address mask.

advertise

(Optional) Sets the address range status to advertise and generates a Type 3 summary link-state advertisement (LSA).

not-advertise

(Optional) Sets the address range status to DoNotAdvertise. The Type 3 summary LSA is suppressed, and the component networks remain hidden from other networks.

cost cost

(Optional) Metric or cost for this summary route, which is used during OSPF SPF calculation to determine the shortest paths to the destination. The value can be 0 to 16777215.


Command Default

This command is disabled by default.

Command Modes

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

Command History

Release
Modification

10.0

This command was introduced.

12.0(24)S

The cost keyword and cost argument were added.

12.2(15)T

The cost keyword and cost argument were added.

12.2(18)S

This command was integrated into Cisco IOS Release 12.2(18)S.

12.2(28)SB

This command was integrated into Cisco IOS Release 12.2(28)SB.

12.2(33)SRA

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

12.2(33)SRB

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

12.2SX

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


Usage Guidelines

The area range command is used only with Area Border Routers (ABRs). It is used to consolidate or summarize routes for an area. The result is that a single summary route is advertised to other areas by the ABR. Routing information is condensed at area boundaries. External to the area, a single route is advertised for each address range. This behavior is called route summarization.

Multiple area range router configuration commands can be configured. Thus, OSPF can summarize addresses for many different sets of address ranges.


Note To remove the specified area from the software configuration, use the no area area-id command (with no other keywords). That is, the no area area-id command removes all area options, such as area default-cost, area nssa, area range, area stub, and area virtual-link.


Release 12.2(33)SRB

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

Examples

The following example specifies one summary route to be advertised by the ABR to other areas for all subnets on network 10.0.0.0 and for all hosts on network 192.168.110.0:

interface ethernet 0
 ip address 192.168.110.201 255.255.255.0
!
interface ethernet 1
 ip address 192.168.120.201 255.255.255.0
!
router ospf 201
 network 192.168.110.0 0.0.0.255 area 0
 area 10.0.0.0 range 10.0.0.0 255.0.0.0
 area 0 range 192.168.110.0 255.255.0.0

Related Commands

Command
Description

area range (IPv6)

Consolidates and summarizes routes at an area boundary in an IPv6 network.


area sham-link

To configure a sham link interface on a provider edge (PE) router in a Multiprotocol Label Switching (MPLS) Virtual Private Network (VPN) backbone, use the area sham-link command in global configuration mode. To remove the sham link, use the no form of this command.

area area-id sham-link source-address destination-address [cost number] [ttl-security hops hop-count]

no area area-id sham-link source-address destination-address

Syntax Description

area-id

ID number of the Open Shortest Path First (OSPF) area assigned to the sham link. Valid values: numeric value or valid IP address. There is no default.

source-address

IP address of the source PE router in the format: ip-address [mask].

destination-address

IP address of the destination PE route in the format: ip-address [mask].

number

OSPF cost to send IP packets over the sham link interface. The range of this value is from 1 to 65535.

ttl-security hops hop-count

(Optional) Configures TTL security on a sham link. The hop-count argument range is from 1 to 254.


Command Default

No default behavior or values.

Command Modes

Global configuration (config-router)

Command History

Release
Modification

12.2(8)T

This command was introduced.

12.0(21)ST

This command was integrated into Cisco IOS Release 12.0(21)ST, and support for Cisco 12000 series Internet Routers was added.

12.0(22)S

This command was integrated into Cisco IOS Release 12.0(22)S, and support for Cisco 10000 series Internet Routers was added.

12.2(33)SRA

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

12.2SX

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

12.2(33)SRC

Support for the ttl-security and hops keywords and the hop-count argument were added.


Usage Guidelines

In the MPLS VPN environment, several VPN client sites can be connected in the same Open Shortest Path First (OSPF) area. If these sites are connected over a backdoor link in addition to the VPN backbone, all traffic passes over the backdoor link instead of over the VPN backbone. OSPF always selects intra-area routes over interarea (external) routes.

To correct this default OSPF behavior in an MPLS VPN, use the area sham-link command to configure a sham link between two PEs to connect the sites through the MPLS VPN backbone. A sham link represents an intra-area (unnumbered point-to-point) connection between PEs. All other routers in the area use the sham link to calculate intra-area shortest path first (SPF) routes to the remote site.

Configure the source and destination addresses of the sham link as a host route mask (255.255.255.255) on the PE routers that serve as the endpoints of the sham link. The source and destination IP addresses must belong to the VRF and be advertised by Border Gateway Protocol (BGP) to remote PE routers. The sham link endpoint addresses should not be advertised by OSPF.

Examples

The following example shows how to configure a sham link between two PE routers in an MPLS VPN backbone by using the area sham-link command on each router:

Router1(config)# interface loopback 55
Router1(config-if)# ip vrf forwarding v1
Router1(config-if)# ip address 10.0.0.1 255.255.255.255
Router1(config-if)# exit
Router1(config)# router ospf 2 vrf v1
Router1(config-router)# log-adjacency-changes
Router1(config-router)# area 120 sham-link 10.0.0.1 10.44.0.1 cost 1
Router1(config-router)# redistribute bgp 1 subnets
Router1(config-router)# network 10.2.0.1 255.255.255.255 area 1
Router1(config-router)# network 10.120.0.0 0.255.255.255 area 120
Router1(config-router)# network 10.140.0.0 0.255.255.255 area 120
Router1(config-router)# exit
Router2(config)# interface loopback 44
Router2(config-if)# ip vrf forwarding v1
Router2(config-if)# ip address 172.16.0.1 255.255.255.255
Router1(config-if)# exit
Router2(config)# router ospf 2 vrf v1
Router2(config-router)# log-adjacency-changes
Router2(config-router)# area 120 sham-link 10.44.0.1 10.0.0.1 cost 1
Router2(config-router)# redistribute bgp 1 subnets
Router2(config-router)# network 10.2.0.1 255.255.255.255 area 1
Router2(config-router)# network 10.120.0.0 0.255.255.255 area 120
Router2(config-router)# network 10.140.0.0 0.255.255.255 area 120

area stub

To define an area as a stub area, use the area stub command in router address family topology or router configuration mode. To disable this function, use the no form of this command.

area area-id stub [no-summary]

no area area-id stub [no-summary]

Syntax Description

area-id

Identifier for the stub area; either a decimal value or an IP address.

no-summary

(Optional) Prevents an Area Border Router (ABR) from sending summary link advertisements into the stub area.


Defaults

No stub area is defined.

Command Modes

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

Command History

Release
Modification

10.0

This command was introduced.

12.2(33)SRA

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

12.2(33)SRB

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

12.2SX

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


Usage Guidelines

You must configure the area stub command on all routers and access servers in the stub area. Use the area router configuration command with the default-cost keyword to specify the cost of a default internal route sent into a stub area by an ABR.

There are two stub area router configuration commands: the stub and default-cost options of the area router configuration command. In all routers attached to the stub area, the area should be configured as a stub area using the stub keyword of the area command. Use the default-cost keyword only on an ABR attached to the stub area. The default-cost keyword provides the metric for the summary default route generated by the ABR into the stub area.

To further reduce the number of link-state advertisements (LSAs) sent into a stub area, you can configure the no-summary keyword on the ABR to prevent it from sending summary LSAs (LSA type 3) into the stub area.


Note To remove the specified area from the software configuration, use the no area area-id command (with no other keywords). That is, the no area area-id command removes all area options, such as area authentication, area default-cost, area nssa, area range, area stub, and area virtual-link.


Release 12.2(33)SRB

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

Examples

The following example assigns a default cost of 20 to stub network 10.0.0.0:

interface ethernet 0
 ip address 10.56.0.201 255.255.0.0
!
router ospf 201
 network 10.0.0.0 0.255.255.255 area 10.0.0.0
 area 10.0.0.0 stub
 area 10.0.0.0 default-cost 20

Related Commands

Command
Description

area authentication

Enables authentication for an OSPF area.

area default-cost

Specifies a cost for the default summary route sent into a stub area.


area virtual-link

To define an Open Shortest Path First (OSPF) virtual link, use the area virtual-link command in router address family topology or router configuration mode. To remove a virtual link, use the no form of this command.

area area-id virtual-link router-id [hello-interval seconds] [retransmit-interval seconds] [transmit-delay seconds] [dead-interval seconds] [ttl-security hops hop-count]

no area area-id virtual-link router-id [hello-interval] [retransmit-interval] [transmit-delay] [dead-interval] [ttl-security]

Syntax Description

area-id

Area ID assigned to the transit area for the virtual link. This can be either a decimal value or a valid IP or IPv6 prefix. There is no default.

router-id

Router ID associated with the virtual link neighbor. The router ID appears in the show ip ospf or show ipv6 display command. There is no default.

hello-interval seconds

(Optional) Time (in seconds) between the hello packets that the Cisco  IOS software sends on an interface. The hello interval is an unsigned integer value to be advertised in the hello packets. The value must be the same for all routers and access servers attached to a common network. The default is 10 seconds.

retransmit-interval seconds

(Optional) Time (in seconds) between link-state advertisement (LSA) retransmissions for adjacencies belonging to the interface. The retransmit interval is the expected round-trip delay between any two routers on the attached network. The value must be greater than the expected round-trip delay. The default is 5 seconds.

transmit-delay seconds

(Optional) Estimated time (in seconds) required to send a link-state update packet on the interface. The integer value that must be greater than zero. LSAs in the update packet have their age incremented by this amount before transmission. The default value is 1 second.

dead-interval seconds

(Optional) Time (in seconds) that hello packets are not seen before a neighbor declares the router down. The dead interval is an unsigned integer value. The default is four times the hello interval, or 40 seconds. As with the hello interval, this value must be the same for all routers and access servers attached to a common network.

ttl-security hops hop-count

(Optional) Configures TTL security on a virtual link. The hop-count argument range is from 1 to 254.


Command Default

area-id: No area ID is predefined.
router-id: No router ID is predefined.

Command Modes

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

Command History

Release
Modification

10.0

This command was introduced.

12.0(24)S

Support for IPv6 was added.

12.2(15)T

Support for IPv6 was added.

12.2(18)S

This command was integrated into Cisco IOS Release 12.2(18)S.

12.2(28)SB

This command was integrated into Cisco IOS Release 12.2(28)SB.

12.2(33)SRA

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

12.2(33)SRB

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

12.2(33)SXH

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

12.2(33)SRC

Support for the ttl-security and hops keywords and the hop-count argument were added.


Usage Guidelines

In OSPF, all areas must be connected to a backbone area. If the connection to the backbone is lost, it can be repaired by establishing a virtual link.

The smaller the hello interval, the faster topological changes will be detected, but more routing traffic will ensue.

The setting of the retransmit interval should be conservative, or needless retransmissions will result. The value should be larger for serial lines and virtual links.

The transmit delay value should take into account the transmission and propagation delays for the interface.

To configure a virtual link in OSPF for IPv6, you must use a router ID instead of an address. In OSPF for IPv6, the virtual link takes the router ID rather than the IPv6 prefix of the remote router.


Note For a virtual link to be properly configured, each virtual link neighbor must include the transit area ID and the corresponding virtual link neighbor router ID. To see the router ID, use the show ip ospf or the show ipv6 ospf command in privileged EXEC mode.



Note To remove the specified area from the software configuration, use the no area area-id command (with no other keywords). That is, the no area area-id command removes all area options, such as area default-cost, area nssa, area range, area stub, and area virtual-link.


Release 12.2(33)SRB

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

Examples

The following example establishes a virtual link with default values for all optional parameters:

ipv6 router ospf 1
 log-adjacency-changes
 area 1 virtual-link 192.168.255.1

The following example establishes a virtual link in OSPF for IPv6:

ipv6 router ospf 1
 log-adjacency-changes
 area 1 virtual-link 192.168.255.1 hello-interval 5

auto-cost

To control how Open Shortest Path First (OSPF) calculates default metrics for the interface, use the auto-cost command in router configuration mode. To assign cost based only on the interface type, use the no form of this command.

auto-cost reference-bandwidth mbps

no auto-cost reference-bandwidth

Syntax Description

reference-bandwidth mbps

Rate in Mbps (bandwidth). The range is from 1 to 4294967; the default is 100.


Defaults

100 Mbps

Command Modes

Router configuration

Command History

Release
Modification

11.2

This command was introduced.

12.2(33)SRA

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

12.2SX

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


Usage Guidelines

In Cisco IOS Release 10.3 and later releases, by default OSPF will calculate the OSPF metric for an interface according to the bandwidth of the interface. For example, a 64K link will get a metric of 1562, and a T1 link will have a metric of 64.

The OSPF metric is calculated as the ref-bw value divided by the bandwidth, with mbps equal to 108 by default, and bandwidth determined by the bandwidth (interface) command. The calculation gives FDDI a metric of 1.

If you have multiple links with high bandwidth (such as FDDI or ATM), you might want to use a larger number to differentiate the cost on those links.

The value set by the ip ospf cost command overrides the cost resulting from the auto-cost command.

Examples

The following example changes the cost of the FDDI link to 10, while the gigabit Ethernet link remains at a cost of 1. Thus, the link costs are differentiated.

router ospf 1
 auto-cost reference-bandwidth 1000

Related Commands

Command
Description

ip ospf cost

Explicitly specifies the cost of sending a packet on an interface.


capability lls

To enable the use of the Link-Local Signalling (LLS) data block in originated Open Shortest Path First (OSPF) packets and reenable OSPF nonstop forwarding (NSF) awareness, use the capability lls command in router configuration mode. To disable LLS and OSPF NSF awareness, use the no form of this command.

capability lls

no capability lls

Syntax Description

This command has no arguments or keywords.

Command Default

LLS is enabled.

Command Modes

Router configuration

Command History

Release
Modification

12.2(15)T

This command was introduced.

12.2(33)SRA

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

12.2(31)SB2

This command was integrated into Cisco IOS Release 12.2(31)SB2.

12.2(33)SXH

This command was integrated into Cisco IOS Release 12.2(31)SXH.


Usage Guidelines

You might want to disable NSF awareness by disabling the use of the LLS data block in originated OSPF packets. You might want to disable NSF awareness if the router has no applications using LLS.

If NSF is configured and you try to disable LLS, you will receive the error message, "OSPF Non-Stop Forwarding (NSF) must be disabled first."

If LLS is disabled and you try to configure NSF, you will receive the error message, "OSPF Link-Local Signaling (LLS) capability must be enabled first."

Examples

The following example disables LLS support and OSPF NSF awareness:

router ospf 2
 no capability lls

capability transit

To reenable Open Shortest Path First (OSPF) area capability transit after it has been disabled, use the capability transit command in router configuration mode. To disable OSPF area capability transit on all areas for a router process, use the no form of this command.

capability transit

no capability transit

Syntax Description

This command has no arguments or keywords.

Defaults

OSPF area capability transit is enabled.

Command Modes

Router configuration

Command History

Release
Modification

12.0(27)S

This command was introduced.

12.3(7)T

This command was integrated into Cisco IOS Release 12.3(7)T.

12.2(25)S

This command was integrated into Cisco IOS Release 12.2(25)S.

12.2(27)SBC

This command was integrated into Cisco IOS Release 12.2(27)SBC.

12.2(33)SRA

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

12.2(33)SXH

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


Usage Guidelines

OSPF area capability transit is enabled by default, allowing the OSPF Area Border Router to install better-cost routes to the backbone area through the transit area instead of the virtual links. If you want to retain a traffic pattern through the virtual-link path, you can disable capability transit by entering the no capability transit command. If paths through the transit area are discovered, they are most likely to be more optimal paths, or at least equal to, the virtual-link path. To reenable capability transit, enter the capability transit command.

If you need to verify whether OSPF area capability transit is enabled for a specific routing process, enter the show ip ospf command.

Examples

The following example shows how to disable OSPF area capability transit on all areas for a router process named ospf 1. A show ip ospf command is issued first to display the current areas that have area capability transit enabled. The no capability transit command is then entered to disable OSPF area capability transit on all areas for the router process ospf 1.

Router# show ip ospf

 Routing Process "ospf 1" with ID 10.1.1.1
 Supports only single TOS(TOS0) routes
 Supports opaque LSA
 Supports Link-local Signaling (LLS)
!Supports area transit capability
It is an area border router
 Initial SPF schedule delay 5000 msecs
 Minimum hold time between two consecutive SPFs 10000 msecs
 Maximum wait time between two consecutive SPFs 10000 msecs
 Minimum LSA interval 5 secs. Minimum LSA arrival 1 secs
 LSA group pacing timer 240 secs
 Interface flood pacing timer 33 msecs
 Retransmission pacing timer 66 msecs
 Number of external LSA 8. Checksum Sum 0x02853F
 Number of opaque AS LSA 0. Checksum Sum 0x000000
 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 2. 2 normal 0 stub 0 nssa
!Number of areas transit capable is 1
External flood list length 0
    Area BACKBONE(0)
        Number of interfaces in this area is 3
        Area has no authentication
        SPF algorithm last executed 00:02:21.524 ago
        SPF algorithm executed 11 times
        Area ranges are
        Number of LSA 49. Checksum Sum 0x19B5FA
        Number of opaque link LSA 0. Checksum Sum 0x000000
        Number of DCbitless LSA 0
        Number of indication LSA 0
        Number of DoNotAge LSA 38
        Flood list length 0
    Area 1
        Number of interfaces in this area is 3
       !This area has transit capability: Virtual Link Endpoint
        Area has no authentication
        SPF algorithm last executed 00:02:36.544 ago
        SPF algorithm executed 9 times
        Area ranges are
        Number of LSA 42. Checksum Sum 0x1756D5
        Number of opaque link LSA 0. Checksum Sum 0x000000
        Number of DCbitless LSA 0
        Number of indication LSA 0
        Number of DoNotAge LSA 0
        Flood list length 0

Router(config)# router ospf 1

Router(router-config)# no capability transit

Related Commands

Command
Description

show ip ospf

Displays general information about OSPF routing processes.


capability vrf-lite

To suppress the provider edge (PE) specific checks on a router when the Open Shortest Path First (OSPF) process is associated with the VPN routing and forwarding instance (VRF), use the capability vrf-lite command in router configuration mode. To restore the checks, use the no form of this command.

capability vrf-lite

no capability vrf-lite

Syntax Description

This command has no arguments or keywords.

Defaults

Disabled. PE specific checks are performed if the process is associated with VRF command modes.

Command Modes

Router configuration

Command History

Release
Modification

12.0(21)ST

This command was introduced.

12.0(22)S

This command was integrated into Cisco IOS Release 12.0(22)S.

12.2(8)B

This command was integrated into Cisco IOS Release 12.2(8)B.

12.2(13)T

This command was integrated into Cisco IOS Release 12.2(13)T.

12.2(14)S

This command was integrated into Cisco IOS Release 12.2(14)S.

12.2(33)SRA

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

12.2SX

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


Usage Guidelines

This command works only if the OSPF process is associated with the VRF.