IP Routing – Open Shortest Path First (OSPF)

area authentication

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

Syntax

area area-id authentication [message-digest] no area area-id authentication

Parameters

  • 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—Enables Message Digest 5 (MD5) authentication on the area specified by the area-id

Default Configuration

Type 0 authentication (no authentication).

Command Mode

Router RIP Configuration mode

User Guidelines

If the area does not exist when the area authentication command is applied it is created.

Specifying default authentication for an area without the message-digest keyword sets the authentication to Type 1 (simple password) as specified in RFC 2328, Appendix D. If this command is not included in the configuration file, authentication of Type 0 (no authentication) is assumed.

Use the ip ospf authentication interface command to change the area default authentication.

If you enable authentication, you must configure a key chain name with the ip ospf authentication key-chain interface command for an IP interface. If a key chain has not been defined for an IP interface or there is not valid key OSPF packets are not sent on the interface and received IP interface packets are dropped.

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

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.

Example

The following example mandates default authentication for areas 0 and 10.0.0.0. Authentication keys are also provided:

switchxxxxxx(config)# router ospf 1
switchxxxxxx(config-ospf)# area 10.0.0.0 authentication
switchxxxxxx(config-ospf)# area 0 authentication
switchxxxxxx(config-ospf)# network 10.56.0.201 area 10.0.0.0
switchxxxxxx(config-ospf)# network 192.168.251.201 area 0
switchxxxxxx(config-ospf)# exit
switchxxxxxx(config)# interface ip 192.168.251.201
switchxxxxxx(config-ip)# ip ospf authentication key-chain chain1
switchxxxxxx(config-ip)# exit
switchxxxxxx(config)# interface ip 10.56.0.201
switchxxxxxx(config-ip)# ip ospf authentication key-chain chain2
switchxxxxxx(config-ip)# exit

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 return to default, use the no form of this command.

Syntax

area area-id default-cost cost no area area-id default-cost

Parameters

  • 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.

Default Configuration cost—1.

Command Mode

Router RIP Configuration mode

User Guidelines

If the area does not exist when the area default-cost command is applied it is created.

This command is used only on an Area Border Router (ABR) attached to a stub area or NSSA. If the area is not a stub area or NSSA or the Router is not an ABR attached  to the stub area or NSSA then the configuration is saved but is not applied.

There are two stub area router configuration commands: the area stub and area default-cost commands. In all routers attached to the stub area, the area should be configured as a stub area using the area stub command. The area default-cost command impacts only on an ABR attached to the stub area. If the area default-cost command is configured on non ABR attached to the area the configuration is saved but it is not applied. The area default-cost command 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.

Example

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

switchxxxxxx(config)# interface vlan1
switchxxxxxx(config-if)# ip address 10.56.0.201 255.255.0.0
switchxxxxxx(config-if)# exit
switchxxxxxx(config)# router ospf 1
switchxxxxxx(config-ospf)# network 10.56.0.201 area 10.0.0.0
switchxxxxxx(config-ospf)# area 10.0.0.0 stub
switchxxxxxx(config-ospf)# area 10.0.0.0 default-cost 20
switchxxxxxx(config-ospf)# exit

area nssa

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

Syntax

area area-id nssa [no-summary] [translator-role {always | candidate}]

[translator-stability-interval seconds] no area area-id nssa

Parameters

  • area-id—Identifier for the stub area or NSSA. The identifier can be specified as either a decimal value or an IP address.
  • no-summary—Allows an area to be an NSSA but not have summary routes injected into it.
  • translator-role—Specifies whether or not an NSSA border router will unconditionally translate Type-7 LSAs into Type-5 LSAs. The default value is candidate.
  • always—Specifies that an NSSA border router always translates Type-7 LSAs into Type-5 LSAs regardless of the translator state of other NSSA border routers.
  • candidate—Specifies that an NSSA border router participates in the translator election process described in RFC 3101, Section 3.1.
  • seconds—Specifies the number of seconds after an elected translator determines its services are no longer required, that it should continue to perform its translation duties. The default value is 40 seconds.

Default Configuration No NSSA area is defined.

Command Mode

Router RIP Configuration mode

User Guidelines

If the area does not exist when the area nssa command  is applied it is created.

The no format of the area nssa command does not remove the area, it only changes the area type to transit.

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, including area authentication, area default-cost, area nssa, area range, area stub, and area virtual-link.

Example

The following example makes area 1 an NSSA area:

switchxxxxxx(config)# router ospf 1
switchxxxxxx(config-ospf)# redistribute rip subnets
switchxxxxxx(config-ospf)# network 172.19.92.1 area 1
switchxxxxxx(config-ospf)# area 1 nssa
switchxxxxxx(config-ospf)# exit

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.

Syntax

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

Parameters

  • area-id—Identifier of the area for which routes are to be summarized. It can be specified as either a decimal value or an IP address.
  • ip-address—IP Address.
  • ip-address-mask—IP Address Mask.
  • advertise—Sets the address range status to advertise and generates a Type 3 summary link-state advertisement (LSA). if the advertise and non-advertise keywords are omitted the advertise keyword is assumed.
  • not-advertise—Sets the address range status to DoNotAdvertise. The Type 3 summary LSA is suppressed, and the component networks remain hidden from other networks.

Default Configuration

This command is disabled by default.

Command Mode

Router RIP Configuration mode

User Guidelines

If the area does not exist when the area range command  is configured it is created.

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, including area authentication, area default-cost, area nssa, area range, area stub, and area virtual-link.

Example

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

switchxxxxxx(config)# interface vlan 100
switchxxxxxx(config-if)# ip address 192.42.110.201 255.255.255.0
switchxxxxxx(config-if)# exit
switchxxxxxx(config)# interface vlan102
switchxxxxxx(config-if)# ip address 36.56.1.1 255.255.0.0
switchxxxxxx(config-if)# exit
switchxxxxxx(config)# router ospf 201
switchxxxxxx(config-ospf)# network 192.42.110.201 area 0
switchxxxxxx(config-ospf)# network 36.56.1.1 area 36.0.0.0
switchxxxxxx(config-ospf)# area 36.0.0.0 range 10.0.0.0 255.0.0.0
switchxxxxxx(config-ospf)# area 0 range 192.42.110.0 255.255.255.0
switchxxxxxx(config-ospf)# exit

area shutdown

To initiate a graceful shutdown of the Open Shortest Path First (OSPF) protocol in the current area, use the area shutdown command in router configuration mode. To restart the OSPF protocol, use the no form of this command.

Syntax

area area-id  shutdown no area area-id shutdown

Parameters

n area-id—Identifier for the area. The identifier can be specified as either a decimal value or an IP address.

Default Configuration

OSPF stays active in the current area.

Command Mode

Router RIP Configuration mode

User Guidelines

Use the area shutdown command in router configuration mode to temporarily shut down a protocol in the least disruptive manner and to notify its neighbors that it is going away. All traffic that has another path through the network will be directed to that alternate path.

Example

The following example shows how to enable a graceful shutdown of the OSPF protocol in area 10.0.0.0:

switchxxxxxx(config)# router ospf 1
switchxxxxxx(config-ospf)# area 10.0.0.0 shutdown
switchxxxxxx(config-ospf)# exit

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.

Syntax

area area-id stub [no-summary] no area area-id area area-id stub

Parameters

  • area-id—Identifier for the stub area. The identifier can be specified as either a decimal value or an IP address.
  • no-summary—Prevents an Area Border Router (ABR) from sending summary link advertisements into the stub area.

Default Configuration No stub area is defined.

Command Mode

Router RIP Configuration mode

User Guidelines

If the area does not exist when the area stub command  is configured it is created.

The no format of the area stub command does not remove the area, it only changes the area type to transit.

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 area stub and area default-cost commands. In all routers attached to the stub area, the area should be configured as a stub area using the area stub command. The area default-cost command is needed only on an ABR attached to the stub area. If the area default-cost command is configured on non ABR attached to the area the configuration is saved but is not effected. The area default-cost command 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. The no-summary keyword configured on non ABR is saved but is not effected.

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.

Example

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

switchxxxxxx(config)# router ospf
switchxxxxxx(config-ospf)# network 10.1.1.1 area 10.0.0.0
switchxxxxxx(config-ospf)# area 10.0.0.0 default-cost 20
switchxxxxxx(config-ospf)# area 10.0.0.0 stub
switchxxxxxx(config-ospf)# exit

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] [message-digest | null][key-chain name-of-chain]

no area area-id virtual-link router-id

  • area-id—Area ID assigned to the virtual link. This can be either a decimal value or a valid IPv4 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—Specifies the time (in seconds) between the hello packets that are sent 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. Range is from 1 to 8192. The default is 10.
  • retransmit-interval seconds—Specifies the 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. Range is from 1 to 8192. The default is 5.
  • transmit-delay seconds—Specifies the 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. Range is from 1 to 8192. The default value is 1.

  • dead-interval seconds—Specifies the 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.

  • message-digest—Specifies that MD5 authentication will be used.
  • null—No authentication is used. Useful for overriding password or message-digest authentication if configured for an area.
  • name-of-chain—Specifies the name of key chain.

Default Configuration

No OSPF virtual link is defined.

Command Mode

Router RIP Configuration mode

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.

Note. In order 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, including area authentication, area default-cost, area nssa, area range, area stub, and area virtual-link.

Example 1. The following example establishes a virtual link using by a few commands:

switchxxxxxx(config)# router ospf 1
switchxxxxxx(config-ospf)# area 1 virtual-link 192.168.255.1
switchxxxxxx(config-ospf)# area 1 virtual-link 192.168.255.1 hello-interval 100
switchxxxxxx(config-ospf)# area 1 virtual-link 192.168.255.1 message-digest key-chain chain1
switchxxxxxx(config-ospf)# exit

Example 2. The following example establishes a virtual link using bone command:

switchxxxxxx(config)# router ospf 1
switchxxxxxx(config-ospf)# area 1 virtual-link 192.168.255.1 hello-interval 100 message-digest key-chain chain1
switchxxxxxx(config-ospf)# exit

clear ip ospf process

To restart the Open Shortest Path First (OSPF) process, use the clear ip ospf process command in privileged EXEC mode.

Syntax

clear ip ospf [process-id] process

Parameters

n process-id—Process ID. If the parameter is omitted all the OSPF processes are restarted.

Default Configuration

N/A

Command Mode

Privileged EXEC mode

User Guidelines

Use the process-id argument to restart only one OSPF process. If the process-id argument is not specified, all OSPF processes are restarted.

The clear ip ospf process command changes the OSPF process router-id if it was reconfigured by the user else if the current used router-id has the default value the command runs the router-id re-election algorithm.

Example

Example 1. The following example restarts all the OSP processes:

switchxxxxxx# clear ip ospf process

Example 2. The following example restarts one OSP process with process-id 1:

switchxxxxxx# clear ip ospf 1 process

compatible rfc1583

To restore the method used to calculate summary route costs per RFC 1583, use the compatible rfc1583 command in router configuration mode. To disable RFC 1583 compatibility, use the no form of this command.

Syntax

compatible rfc1583 no compatible rfc1583

Parameters

N/A

Default Configuration Compatible with RFC 1583.

Command Mode

Router RIP Configuration mode

User Guidelines

To minimize the chance of routing loops, all Open Shortest Path First (OSPF) routers in an OSPF routing domain should have RFC compatibility set identically.

Because of the introduction of RFC 2328, OSPF Version 2, the method used to calculate summary route costs has changed. Use the no compatible rfc1583 command to enable the calculation method used per RFC 2328.

Example

The following example specifies that the router process is compatible with RFC 1583:

switchxxxxxx(config)# router ospf 1
switchxxxxxx(config-ospf)# compatible rfc1583
switchxxxxxx(config-ospf)# exit

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 router configuration or router address family topology configuration mode. To disable this feature, use the no form of this command.

Syntax

default-information originate [always] [metric metric-value] [metric-type type-value] no default-information originate

Parameters

  • always—Always advertises the default route regardless of whether the software has a default route.
  • Note. The always keyword includes the following exception when the route map is used. When a route map is used, the origination of the default route by OSPF is not bound to the existence of a default route in the routing table and the always keyword is ignored.
  • metric-value—Metric used for generating the default route. If you omit a value and do not specify a value using the default-metric router configuration command, the default metric value is 10. The value used is specific to the protocol.
  • type-value—External link type associated with the default route that is advertised into the OSPF routing domain. It can be one of the following values:
    • Type 1 external route
    • Type 2 external route

The default is type 2 external route.

Default Configuration

This command is disabled by default. No default external route is generated into the OSPF routing domain.

Command Mode

Router RIP Configuration mode

User Guidelines

Whenever you use the redistribute or the default-information router configuration command to redistribute routes into an OSPF routing domain, the router becomes an Autonomous System Boundary Router (ASBR). However, an ASBR does not, by default, generate a default route into the OSPF routing domain. The software still must have a default route for itself before it generates one, except when you have specified the always keyword.

When a route map is used, the origination of the default route by OSPF is not bound to the existence of a default route in the routing table.

Example

The following example specifies a metric of 100 for the default route that is redistributed into the OSPF routing domain and an external metric type of Type 1:

switchxxxxxx(config)# router ospf 109
switchxxxxxx(config-ospf)# default-information originate metric 100 metric-type 1
switchxxxxxx(config-ospf)# exit

default-metric (OSPF)

To set default metric values for the Open Shortest Path First (OSPF) routing protocol, use the default-metric command in router address family topology or router configuration mode. To return to the default state, use the no form of this command.

Syntax

default-metric metric-value no default-metric

Parameters

n metric-value—Default metric value. The range is from 1 to 4294967295.

Default Configuration

Default metric value appropriate for the specified routing protocol.

Command Mode

Router RIP Configuration mode

User Guidelines

The default-metric command is used in conjunction with the redistribute router configuration command to cause the current routing protocol to use the same metric value for all redistributed routes. A default metric helps solve the problem of redistributing routes with incompatible metrics.

Whenever metrics do not convert, using a default metric provides a reasonable substitute and enables the redistribution to proceed.

Note. When enabled, the default-metric command applies a metric value of 0 to redistributed connected routes. The default-metric command does not override metric values that are applied with the redistribute command.

Example

The following example specifies a default metric of 100 for that will used for destributed routes from RIP:

switchxxxxxx(config)# router ospf 1
switchxxxxxx(config-ospf)# default-metric 100
switchxxxxxx(config-ospf)# redistribute rip
switchxxxxxx(config-ospf)# exit

ip ospf authentication

To override the area default authentication type for an  IP interface, use the ip ospf authentication command in IP interface configuration mode. To return to the area default authentication type for an interface, use the no form of this command.

Syntax

ip ospf authentication [message-digest | null] no ip ospf authentication

Parameters

  • message-digest—Specifies that MD5 authentication will be used.
  • null—No authentication is used. Useful for overriding password or message-digest authentication if configured for an area.

Default Configuration

The area default authentication type.

Command Mode

IP Configuration mode

User Guidelines

Specifying default authentication for an area  without keyword sets the authentication to Type 1 (simple password) as specified in RFC 2328, Appendix D. If this command is not included in the configuration file, the area default authentication of type is assumed.

If you enable the MD5 authentication, you must configure a key chain name with the ip ospf authentication key-chain interface command. If a key chain is not defined for the IP interface or there is not a valid key then RIP packets are not sent on the IP interface and received IP interface packets are dropped.

If you enable the simple password authentication, you must configure a password with the ip ospf authentication-key interface command. If a password is not defined for the IP interface then OSPF packets are not sent on the IP interface and received IP interface packets are dropped.

Example

The following example overides the area default authentication for the 10.56.0.201and 10.10.1.1 IP interfaces:

switchxxxxxx(config)# router ospf
switchxxxxxx(config-ospf)# area 10.0.0.0 authentication
switchxxxxxx(config-ospf)# network 10.56.0.201 area 10.0.0.0
switchxxxxxx(config-ospf)# network 10.10.1.1 area 10.0.0.0
switchxxxxxx(config-ospf)# network 10.2.1.1 area 10.0.0.0
switchxxxxxx(config-ospf)# exit
switchxxxxxx(config)# interface ip 10.56.0.201
switchxxxxxx(config-ip)# ip ospf authentication message-digest
switchxxxxxx(config-ip)# ip ospf authentication key-chain chain2
switchxxxxxx(config-ip)# exit
switchxxxxxx(config)# interface ip 10.10.1.1
switchxxxxxx(config-ip)# ip ospf authentication null
switchxxxxxx(config-ip)# exit
switchxxxxxx(config)# interface ip 10.2.1.1
switchxxxxxx(config-ip)# ip ospf authentication-key Ases12@@@#$4
switchxxxxxx(config-ip)# exit

ip ospf authentication key-chain

To define a name of key chain to be used by authentication, use the ip ospf authentication key-chain command in  IP interface configuration mode. To return to default, use the no form of this command.

Syntax

ip ospf authentication key-chain name-of-chain no ip ospf authentication key-chain

Parameters

n name-of-chain—Specifies the name of key chain.

Default Configuration No key chain is specified.

Command Mode

IP Configuration mode

User Guidelines

Use the ip ospf authentication key-chain IP Interface Configuration mode command to define a key chain name. Only one key chaine may be defined per an IP interface. Each the ip ospf authentication key-chain command overides the previous definition.

Example

The following example defines chain1 and chain2:

switchxxxxxx(config)# router ospf
switchxxxxxx(config-ospf)# area 10.0.0.0 authentication
switchxxxxxx(config-ospf)# area 0 authentication
switchxxxxxx(config-ospf)# network 10.56.0.201 area 10.0.0.0
switchxxxxxx(config-ospf)# network 192.168.251.201 area 0
switchxxxxxx(config-ospf)# exit
switchxxxxxx(config)# interface ip 192.168.251.201
switchxxxxxx(config-ip)# ip ospf authentication key-chain chain1
switchxxxxxx(config-ip)# exit
switchxxxxxx(config)# interface ip 10.56.0.201
switchxxxxxx(config-ip)# ip ospf authentication key-chain chain2
switchxxxxxx(config-ip)# exit

ip ospf authentication-key

To assign a password to be used by neighboring routers that are using the OSPF simple password authentication, use the ip ospf authentication-key command in IP interface configuration mode. To remove a previously assigned OSPF password, use the no form of this command.

Syntax

ip ospf authentication-key password no ip ospf authentication-key

Parameters

n password—Any continuous string of characters that can be entered from the keyboard up to 8 bytes in length.

Default Configuration

No password is specified.

Command Mode

IP Configuration mode

User Guidelines

The password created by this command is used as a “key” that is inserted directly into the OSPF header when the switch software originates routing protocol packets. A separate password can be assigned to each subnetwork. All neighboring routers on the same subnetwork must have the same password to be able to exchange OSPF information.

Only one password may be defined per an IP interface. Each the ip ospf authentication-key command overides the previous definition.

Example

The following example shows how to define a password:

switchxxxxxx(config)# interface ip 1.1.1.1
switchxxxxxx(config-ip)# ip ospf authentication mode text
switchxxxxxx(config-ip)# ip ospf authentication-key alpha$$1267
switchxxxxxx(config-ip)# exit

ip ospf cost

To explicitly specify the cost of sending a packet on an interface, use the ip ospf cost command in IP interface configuration mode. To reset the path cost to the default value, use the no form of this command.

Syntax

ip ospf cost interface-cost no ip ospf cost

Parameters

n interface-cost—Unsigned integer value expressed as the link-state metric. It can be a value in the range from 1 to 65535.

Default Configuration

The default value depends on the interface’s ifSpeed (see User Guidelines).

Command Mode

IP Configuration mode

User Guidelines

You must define OSPF on an IP interface by the network command before using of the ip ospf cost command on the same IP interface.

You can set the metric manually using this command, if you need to change the default.

In general, the path cost is calculated using the following formula:

                                  10^10 / ifSpeed

Using this formula, the default path costs were calculated as noted in the following list. If these values do not suit your network, you can use your own method of calculating path costs.

   10G Ethernet Default cost is 1    1G Ethernet Default cost is 10

   100M Ethernet Default cost is 100

   10M Ethernet Default cost is 1000

Example

The following example sets the interface cost value to 65:

switchxxxxxx(config)# interface ip 1.1.1.1
switchxxxxxx(config-ip)# ip ospf cost 65
switchxxxxxx(config-ip)# exit

ip ospf dead-interval

To set the interval during which at least one hello packet must be received from a neighbor before the router declares that neighbor down, use the ip ospf dead-interval command in IP interface configuration mode. To restore the default value, use the no form of this command.

Syntax

ip ospf dead-interval seconds no ip ospf dead-interval

Parameters

n seconds—Interval (in seconds) during which the router must receive at least one hello packet from a neighbor or else that neighbor is removed from the peer list and does not participate in routing. The range is 1 to 65535. The value must be the same for all nodes on the network.

Default Configuration

Four times the interval set by the ip ospf hello-interval command.

Command Mode

IP Configuration mode

User Guidelines

The dead interval is advertised in OSPF hello packets. This value must be the same for all networking devices on a specific network.

Example

The following example sets the OSPF dead interval to 20 seconds:

switchxxxxxx(config)# interface ip 1.1.1.1
switchxxxxxx(config-ip)# ip ospf dead-interval 20
switchxxxxxx(config-ip)# exit

ip ospf hello-interval

To specify the interval between hello packets that are sent on the IP interface, use the ip ospf hello-interval command in IP interface configuration mode. To return to the default time, use the no form of this command.

Syntax

ip ospf hello-interval seconds no ip ospf hello-interval

Parameters

n seconds—Specifies the interval (in seconds). The value must be the same for all nodes on a specific network. The range is from 1 to 65535.

Default Configuration

10 seconds

Command Mode

IP Configuration mode

User Guidelines

This value is advertised in the hello packets. The smaller the hello interval, the faster topological changes will be detected, but more routing traffic will ensue. This value must be the same for all routers and access servers on a specific network.

Example

The following example sets the interval between hello packets to 15 seconds:

switchxxxxxx(config)# interface ip 1.1.1.1
switchxxxxxx(config-ip)# ip ospf hello-interval 15
switchxxxxxx(config-ip)# exit

ip ospf mtu-ignore

To disable Open Shortest Path First (OSPF) maximum transmission unit (MTU) mismatch detection on receiving Database Descriptor (DBD) packets, use the ip ospf mtu-ignore command in IP interface configuration mode. To reset to default, use the no form of this command.

Syntax

ip ospf mtu-ignore no ip ospf mtu-ignore

Parameters

N/A

Default Configuration

OSPF MTU mismatch detection is enabled.

Command Mode

IP Configuration mode

User Guidelines

OSPF checks whether neighbors are using the same MTU on a common interface. This check is performed when neighbors exchange DBD packets. If the receiving MTU in the DBD packet is higher than the IP MTU configured on the incoming interface, OSPF adjacency will not be established.

Example

The following example disables MTU mismatch detection on receiving DBD packets:

switchxxxxxx(config)# interface ip 1.1.1.1
switchxxxxxx(config-ip)# ip ospf mtu-ignore
switchxxxxxx(config-ip)# exit

ip ospf name-lookup

To configure Open Shortest Path First (OSPF) to look up Domain Name System (DNS) names for use in all OSPF show EXEC command displays, use the ip ospf name-lookup command in global configuration mode. To disable this function, use the no form of this command.

Syntax ip ospf name-lookup no ip ospf name-lookup

Parameters

N/A

Default Configuration

This command is disabled by default.

Command Mode

Global Configuration mode

User Guidelines

This command makes it easier to identify a router because the router is displayed by name rather than by its router ID or neighbor ID.

Example

The following example configures OSPF to look up DNS names for use in all OSPF show EXEC command displays:

switchxxxxxx(config)# ip ospf name-lookup

ip ospf passive-interface

To disable sending OSPF routing updates on an IP interface, use the ip ospf passive-interface command in IP interface  configuration mode. To re-enable the sending of OSPF routing updates, use the no form of this command.

Syntax

ip ospf passive-interface no ip ospf passive-interface

Parameters

N/A

Default Configuration

Routing updates are sent on the interface.

Command Mode

IP Configuration mode

User Guidelines

OSPF routing information is neither sent nor received through the specified router interface. The specified interface address appears as a stub network in the OSPF domain.

Example

The following example sets all OSPF IP interfaces as passive and then activates Ethernet interface 0:

switchxxxxxx(config)# router ospf 100
switchxxxxxx(config-ospf)# network 1.1.1.1 area 0
switchxxxxxx(config-ospf)# passive-interface default
switchxxxxxx(config-ospf)# exit
switchxxxxxx(config)# interface ip 1.1.1.1
switchxxxxxx(config-ip)# no passive-interface
switchxxxxxx(config-ip)# exit

ip ospf priority

To set the router priority, which helps determine the designated router for this network, use the ip ospf priority command in IP interface configuration mode. To return to the default value, use the no form of this command.

Syntax

ip ospf priority number-value no ip ospf priority

Parameters

n number-value—A number value that specifies the priority of the router. The range is from 0 to 255.

Default Configuration

Priority of 1.

Command Mode

IP Configuration mode

User Guidelines

When two routers attached to a network both attempt to become the designated router, the one with the higher router priority takes precedence. If there is a tie, the router with the higher router ID takes precedence. A router with a router priority set to zero is ineligible to become the designated router or backup designated router. Router priority is configured only for interfaces to multiaccess networks (in other words, not to point-to-point networks).

Example

The following example sets the router priority value to 4:

switchxxxxxx(config)# interface ip 1.1.1.1
switchxxxxxx(config-ip)# ip ospf priority 4
switchxxxxxx(config-ip)# exit

ip ospf retransmit-interval

To specify the time between link-state advertisement (LSA) retransmissions for adjacencies belonging to the IP interface, use the ip ospf retransmit-interval command in IP interface configuration mode. To return to the default value, use the no form of this command.

Syntax

ip ospf retransmit-interval seconds no ip ospf retransmit-interval

Parameters

n seconds—Time (in seconds) between retransmissions. The range is from 1 to 65535 seconds. The default is 5 seconds.

Default Configuration 5 seconds.

Command Mode

IP Configuration mode

User Guidelines

When a router sends an LSA to its neighbor, it keeps the LSA until it receives back the acknowledgment message. If the router receives no acknowledgment, it will resend the LSA.

The setting of the seconds argument should be greater than the expected round-trip delay between any two routers on the attached network. The setting of this parameter should also be conservative, or needless LSA retransmissions may occur. The value should be larger for serial lines and virtual links.

Note. It is recommended to use the same value for the seconds argument on neighbor OSPF routers. Using inconsistent values on neighbor routers can cause needless LSA retransmissions.

Example

The following example sets the retransmit interval value to 8 seconds:

switchxxxxxx(config)# interface ip 1.1.1.1
switchxxxxxx(config-ip)# ip ospf retransmit-interval 8
switchxxxxxx(config-ip)# exit

ip ospf shutdown

To initiate an Open Shortest Path First (OSPF) protocol graceful shutdown at the IP interface level, use the ip ospf shutdown command in interface configuration mode. To restart the OSPF protocol on an interface, use the no form of this command.

Syntax ip ospf shutdown no ip ospf shutdown

Parameters N/A

Default Configuration

Command Mode

IP Configuration mode

User Guidelines

Use the ip ospf shutdown command to put OSPF on a specific interface in shutdown mode.

Example

The following example shows how to initiate an OSPF protocol shutdown on IP interface 1.1.1.1:

switchxxxxxx(config)# interface ip 1.1.1
switchxxxxxx(config-ip)# ip ospf shutdown
switchxxxxxx(config-ip)# exit

ip ospf transmit-delay

To set the estimated time required to send a link-state update packet on the IP interface, use the ip ospf transmit-delay command in IP interface configuration mode. To return to the default value, use the no form of this command.

Syntax

ip ospf transmit-delay seconds no ip ospf transmit-delay

Parameters

n seconds—Time (in seconds) required to send a link-state update. The range is from 1 to 65535 seconds. The default is 1 second.

Default Configuration 1 second.

Command Mode

IP Configuration mode

User Guidelines

Link-state advertisements (LSAs) in the update packet must have their ages incremented by the amount specified in the seconds argument before transmission. The value assigned should take into account the transmission and propagation delays for the interface.

If the delay is not added before transmission over a link, the time in which the LSA propagates over the link is not considered. This setting has more significance on very low-speed links.

Example

The following example sets the retransmit delay value to 3 seconds:

switchxxxxxx(config)# interface ip 1.1.1.1
switchxxxxxx(config-ip)# ip ospf transmit-delay 3
switchxxxxxx(config-ip)# exit

ip ospf ttl-security

To configure the Time-to-Live (TTL) security check feature on a specific interface, use the ip ospf ttl-security command in interface configuration mode. To disable TTL security on an interface, use the no form of this command.

Syntax

ip ospf ttl-security [hops hop-count |disable] no ip ospf ttl-security

Parameters

  • hop-count—Configures the maximum number of IP hops. The hop-count argument range is from 1 to 254.
  • disable—Disables TTL security on an interface.

Default Configuration

TTL security is disabled on all Open Shortest Path First (OSPF) interfaces.

Command Mode

Interface Configuration mode

User Guidelines

Use the ip ospf ttl-security command to configure TTL security on a specific interface.

The disable keyword can be used to disable TTL security on a specific interface but is only useful if the ttl-security all-interfaces command was used to first configure TTL security on all OSPF interfaces. In this way, all OSPF interfaces can be configured with TTL security and then individual interfaces can be disabled. This can save time as opposed to configuring each interface one-by-one from the start.

Example

The following example shows how to effectively use the disable keyword to disable TTL security on Ethernet interface 0/0 after the feature has first been configured on all OSPF interfaces:

switchxxxxxx(config)# router ospf 1
switchxxxxxx(config-ospf)# ttl-security all-interfaces
switchxxxxxx(config-ospf)# exit
switchxxxxxx(config)# interface vlan 100
switchxxxxxx(config-if)# ip ospf ttl-security disable
switchxxxxxx(config-if)# exit

log-adjacency-changes

To configure the router to send a syslog message when an Open Shortest Path First (OSPF) neighbor goes up or down, use the log-adjacency-changes command in router configuration mode. To turn off this function, use the no form of this command.

Syntax

log-adjacency-changes [detail] no log-adjacency-changes

Parameters

n detail—Sends a syslog message for each state change, not just when a neighbor goes up or down.

Default Configuration

Enabled

Command Mode

Router RIP Configuration mode

User Guidelines

This command allows you to know about OSPF neighbors going up or down. The log-adjacency-changes command provides a high level view of those changes of the peer relationship. The log-adjacency-changes command is on by default but only up/down (full/down) events are reported, unless the detail keyword is also used.

Example

The following example configures the router to send a syslog message when an OSPF neighbor state changes:

switchxxxxxx(config)# router ospf 1
switchxxxxxx(config-ospf)# log-adjacency-changes default
switchxxxxxx(config-ospf)# exit

network area

To define the IP interfaces on which Open Shortest Path First (OSPF) runs and to define the area ID for those interfaces, use the network area command in router configuration mode. To disable OSPF routing for interfaces defined with the ip-address wildcard-mask pair, use the no form of this command.

Syntax

network ip-address area area-id [shutdown] no network ip-address

Parameters

  • ip-address—IP address.
  • area-id —Area that is to be associated with the OSPF address range. It can be specified as either a decimal value or as an IP address. If you intend to associate areas with IP subnets, you can specify a subnet address as the value of the area-id
  • shutdown—OSPF is enabled on the interface in the shutdown state

Default Configuration

This command is disabled by default.

Command Mode

Router RIP Configuration mode

User Guidelines

OSPF can be defined only on manually configured IP interfaces, meaning that RIP cannot be defined on an IP address defined by DHCP or on a default IP address.

Use the network CLI command with the shutdown keyword to create OSPF on an interface if you are going to change the default values of RIP configuration and the use the no ip ospf shutdown CLI command.

Use the no network CLI command to remove OSPF on an IP interface and remove its interface configuration.

Note. Any individual IP interface can only be attached to a single area. If the address ranges specified for different areas overlap, the software will adopt the first area in the network command list and ignore the subsequent overlapping portions. In general, we recommend that you configure address ranges that do not overlap in order to avoid inadvertent conflicts.

Example

Example 1.The following example shows how to enable OSPF on IP interface 1.1.1.1 with the default interface configuration:

switchxxxxxx(config)# router ospf
switchxxxxxx(config-ospf)# network 1.1.1.1 area 0
switchxxxxxx(config-ospf)# exit

Example 2. The following example enables OSPF on 1.1.1.1 in the shutdown  state, configures the interface cost and starts OSPF:

switchxxxxxx(config)# router ospf
switchxxxxxx(config-ospf)# network 1.1.1.1 area 0 shutdown
switchxxxxxx(config-ospf)# exit
switchxxxxxx(config)# interface ip 1.1.1.1
switchxxxxxx(config-ip)# ip ospf cost 102
switchxxxxxx(config-ip)# no ip ospf shutdown
switchxxxxxx(config)# exit

no area

To remove the specified area from the software configuration, use the no area command in router configuration mode.

Syntax

no area area-id

Parameters

n area-id—Identifier for the removed area. The identifier can be specified as either a decimal value or an IP address.

Default Configuration Area is defined.

Command Mode

Router RIP Configuration mode

User Guidelines

To remove the specified area from the software configuration, use the no area area-id command. That is, the no area area-id command removes all area options, including area authentication, area default-cost, area nssa, area range, area stub, and area virtual-link.

Example

The following example removes area 1:

switchxxxxxx(config)# router ospf 1
switchxxxxxx(config-ospf)# no area 1
switchxxxxxx(config-ospf)# exit

passive-interface (OSPF)

To disable sending OSPF routing updates on all OSPF IP interfaces, use the passive-interface command in router configuration mode. To re-enable the sending of OSPF routing updates, use the no form of this command.

Syntax

passive-interface no passive-interface

Parameters

N/A

Default Configuration

Routing updates are sent on all OSPF IP interfaces.

Command Mode

Router RIP Configuration mode

User Guidelines

OSPF routing information is neither sent nor received through all OSPF IP interfaces. A passive IP interface address appears as a stub network in the OSPF domain.

After using of the passive-interface command you can then configure individual interfaces where adjacencies are desired using the no ip ospf passive-interface command. The passive-interface command is useful in Internet service provider (ISP) and large enterprise networks where many of the distribution routers have more than 200 interfaces.

Example

The following example sets all OSPF IP interfaces as passive and then activates IP interface 1.1.1.1:

switchxxxxxx(config)# router ospf 100
switchxxxxxx(config-ospf)# network 1.1.1.1 area 0
switchxxxxxx(config-ospf)# passive-interface
switchxxxxxx(config-ospf)# exit
switchxxxxxx(config)# interface ip 1.1.1.1
switchxxxxxx(config-ip)# no ip ospf passive-interface
switchxxxxxx(config-ip)# exit

redistribute (OSPF)

To redistribute routes from one routing domain into OSPF routing domain, use the redistribute command in the appropriate configuration mode. To disable redistribution, use the no form of this command.

Syntax

redistribute protocol [process-id] [metric metric-value] [metric-type type-value] [match {internal | external 1| external 2}] [subnets] [nssa-only] no redistribute protocol [process-id] [metric metric-value] [metric-type type-value] [match

{internal | external 1| external 2}] [subnets] [nssa-only]

Parameters

  • protocol—Source protocol from which routes are being redistributed. It can be one of the following keywords: connected, static, rip, ospf or bgp.
  • protocol—Source protocol from which routes are being redistributed. It can be one of the following keywords: connected, static, rip, or ospf.
  • process-id—The process-id argument is used only together with the ospf keyword and specifies the appropriate OSPF process ID from which routes are to be redistributed. This identifies the routing process. This value takes the form of a nonzero decimal number. If it is omitted then a value of 1 is assumed.
  • metric metricvalue—Specifies the metric assigned to the redistributed routes.
  • If the metric value is set by the route map (by the set metric command) then the value will supersede the metric value specified by the metric-value
  • If no metric is specified, the following metric is assigned depending on the source protocol:
    • from OSPF
  1. the internal OSPF metric from the redistribution source process is advertised as the external metric in the redistribution destination process.
  2. the external OSPF metric from the redistribution source process is advertised as the external metric with value of 1.
  • from BGP – 1
  • from any protocol except OSPF and BGP – 20
  • metric-type type-value—Specifies the external link type associated with the default route advertised into the OSPF routing domain. It can be one of two values:
    • 1 – Type 1 external route
    • 2 – Type 2 external route

If a metric-type is not specified, a Type 2 external route is adopted.

  • match {internal | external 1 | external 2}—The match keyword is used only together with the ospf keyword and specifies the criteria by which OSPF routes are redistributed into the target OSPF process. It can be one of the following:
    • internal – Routes that are internal to a specific autonomous system.
    • external 1 – Routes that are external to the autonomous system, but are imported into OSPF as Type 1 external route.
    • external 2 – Routes that are external to the autonomous system, but are imported into OSPF as Type 2 external route.

By default the internal and external 1 routes are redistributed.

Note. A few the redistribute commands with different values of the match keyword may be defined.

  • subnets—For redistributing routes into OSPF, the scope of redistribution for the specified protocol. If the subnets keyword is not specified, only routes that are not subnetted are redistributed. By default, no subnets are defined.
  • nssa-only—Sets the nssa-only attribute for all routes redistributed into OSPF. On a router internal to an NSSA area, the nssa-only keyword causes the originated type-7 NSSA LSAs to have their propagate (P) bit set to zero, which prevents area border routers from translating these LSAs into type-5 external LSAs. On an area border router that is connected to a NSSA and normal areas, the nssa-only keyword causes the routes to be redistributed only into the NSSA areas.

Default Configuration

Route redistribution is disabled.

Command Mode

Router RIP Configuration mode

User Guidelines

Routes distributed to the source protocol are never redistributed by it

The connected keyword is used to redistribute to the target OSPF autonomous system routes that correspond to defined IP interfaces on which the destination OSPF process is not enabled. By default, the OSPF process advertises only IP interfaces on which the OSPF process is enabled.

The static keyword is used to redistribute to the target OSPF process static routes. By default, static routes are not redistributed to OSPF.

Changing or disabling any keyword will not affect the state of other keywords.

A router receiving a link-state protocol with an internal metric will consider the cost of the route from itself to the redistributing router plus the advertised cost to reach the destination. An external metric only considers the advertised metric to reach the destination.

Whenever you use the redistribute or the default-information router configuration commands to redistribute routes into an OSPF routing domain, the router automatically becomes an ASBR. However, an ASBR does not, by default, generate a default route into the OSPF routing domain.

Removing options that you have configured for the redistribute command requires careful use of the no form of the redistribute command to ensure that you obtain the result that you are expecting.

Example

Example 1. The following example causes RIP routes to be redistributed into an OSPF domain:

switchxxxxxx(config)# router ospf 110
switchxxxxxx(config-ospf)# redistribute rip metric 200 subnets
switchxxxxxx(config-ospf)# exit

Example 2. In the following example, network 172.16.0.0 will appear as an external link-state advertisement (LSA) in OSPF 1 with a cost of 100 (the cost is preserved):

switchxxxxxx(config)# interface vlan 2 0
switchxxxxxx(config-if)# ip address 172.16.0.1 255.0.0.0
switchxxxxxx(config-if)# exit
switchxxxxxx(config)# interface vlan 10
switchxxxxxx(config-if)# ip address 10.0.0.1 255.0.0.0
switchxxxxxx(config-if)# exit
switchxxxxxx(config)# router ospf 2
switchxxxxxx(config-ospf)# network 172.16.0.1 area 0
switchxxxxxx(config-ospf)# exit
switchxxxxxx(config)# interface ip 172.16.0.1
switchxxxxxx(config-ip)# ip ospf cost 100
switchxxxxxx(config-ip)# exit
switchxxxxxx(config)# router ospf 1
switchxxxxxx(config-ospf)# network 10.0.0.1 area 0
switchxxxxxx(config-ospf)# redistribute ospf 2 subnet
switchxxxxxx(config-ospf)# exit

Example 3. In the following example, internal route are redistributed from OSPF process 1 to OSPF process 2 with their metrics as external 1; external 1 routes are redistributed with metric equal to 100 as external 1 and external 2 routes are redistributed with metric equal to 200 as external 2 :

switchxxxxxx(config)# router ospf 2
switchxxxxxx(config-ospf)# redistribute ospf 1 match internal metric-type 1 subnet
switchxxxxxx(config-ospf)# redistribute ospf 1 match external 1 metric-type 1 metric 100 subnet
switchxxxxxx(config-ospf)# redistribute ospf 1 match external 2 metric-type 2 metric 200 subnet
switchxxxxxx(config-ospf)# exit

Example 4. The following example removes the subnets options:

switchxxxxxx(config)# router ospf 2
switchxxxxxx(config-ospf)# no redistribute ospf subnets
switchxxxxxx(config-ospf)# exit

router ospf

To configure an Open Shortest Path First (OSPF) routing process, use the router ospf command in global configuration mode. To terminate an OSPF routing process, use the no form of this command.

Syntax

router ospf [process-id] no router ospf [process-id]

Parameters

n process-id—Internally used identification parameter for an OSPF routing process. It is locally assigned and can be any positive integer. A unique value is assigned for each OSPF routing process. The default value is 1.

Default Configuration

No OSPF routing process is defined.

Command Mode

Global Configuration mode

User Guidelines

The no format of the router ospf  commnad removes the OSPF configuration.

Use the TBD command to disable OSPF without OSPF configuration removing.

Example

The following example configures an OSPF routing process:

switchxxxxxx(config)# router ospf 2

router-id

To use a fixed router ID, use the router-id command in router configuration mode. To return to the default, use the no form of this command.

Syntax

router-id ip-address no router-id ip-address

Parameters

n ip-address—Router ID in IP address format.

Default Configuration

The minimum IPv4 address configured on the router.

Command Mode

Router RIP Configuration mode

User Guidelines

You can configure an arbitrary value in the IP address format for each router. However, each router ID must be unique.

If this command is used on an OSPF router process which is already active (has neighbors), the new router-ID is used at the next reload or at a manual OSPF process restart. To manually restart the OSPF process, use the clear ip ospf process command.

Example

The following example specifies a fixed router-id:

switchxxxxxx(config)# router ospf 1
switchxxxxxx(config-ospf)# router-id 10.1.1.1
switchxxxxxx(config-ospf)# exit

show ip ospf

To display general information about Open Shortest Path First (OSPF) routing processes, use the show ip ospf command in user EXEC or privileged EXEC mode.

Syntax

show ip ospf [process-id]

Parameters

n process-id—Process ID. If this argument is included, only information for the specified routing process is included.

Command Mode User EXEC mode

Privileged EXEC mode

Example

The following is sample output from the show ip ospf command:

switchxxxxxx# show ip ospf OSPF Routing Process 1 with ID 192.168.0.0 Administrative state is UP Default Redistribute Metric is 100 Redistributing is enabled from     Connected: metric value is default metric       metric type is external 2       with subnets       nssa only      Connected: metric value is default metric       metric type is external 2       with subnets       nssa only     static: metric value is 50       metric type is external 1       without subnets     OSPF 109:       internal: internal  metric value is preserved, metric type is external 1           metric value is preserved, metric type is external 1            with subnets         exteranl 1            metric value is 100, metric type is external 1            with subnets         exteranl 2 metric is value 100, metric type is external 2            with subnets     OSPF 120: from metric type: internal:  metric value is default metric, metric type is external 1 metric value is default metric, metric type is external 1            with subnets         exteranl 1: metric value is default metric, metric type is external 2            metric value is default metric, metric type is external 2            with subnets Supports only single TOS(TOS0) routes Supports opaque LSA It is an Autonomous System Boundary Router It is an Area Boundary Router It is RFC1583 Compatible SPF schedule delay 5000 ms Maximum Number of Equal Cost Paths 4 Number of External LSAs (Type 5) is 6, Checksum is 0x11029BEB Number of Opaque External LSAs (Type11) is 0, Checksum is 0x0 Number of originated LSAs is 126 Number of received LSAs is 1006 Area BACKBONE(0) Administrative state is UP Number of interfaces in this area is 2 Area has message digest authentication SPF algorithm executed 4 times Area ranges are 192.168.0.0/16 Advertise 192.100.0.0/16 Not Advertise Number of ASBR is 0 Number of ABR is 2 Number of LSA in this area is 10. Checksum Sum 0x29BEB Number of Router LSA(Type 1) 2. Checksum Sum 0x2929BEB Number of Network LSA(Type 2) 3. Checksum Sum 0x2929000 Number of Summary IP Network LSA(Type 3) 3. Checksum Sum 0xBEB          Number of Summary ASBR LSA(Type 4) 2. Checksum Sum 0x2929BEB Number of Opaque Link-Local LSAs (Type 9) is 0, Checksum is 0x0 Number of Opaque Area-Local LSAs (Type 10) is 0, Checksum is 0x0 Area 24 Administrative state is UP Number of interfaces in this area is 2 Area has no authentication SPF algorithm executed 10 times Area ranges are Number of ASBR is 1 Number of ABR is 3 Number of Router LSA(Type 1) 2. Checksum Sum 0x2929BEB Number of Network LSA(Type 2) 3. Checksum Sum 0x2929000 Number of Summary IP Network LSA(Type 3) 3. Checksum Sum 0xBEB          Number of Summary ASBR LSA(Type 4) 2. Checksum Sum 0x2929BEB Number of Opaque Link-Local LSAs (Type 9) is 0, Checksum is 0x0 Number of Opaque Area-Local LSAs (Type 10) is 0, Checksum is 0x0 Area 10.0.0.0 It is a NSSA area Administrative state is UP Number of interfaces in this area is 4 Area default metric is 100 Perform type-7/type-5 LSA translation, suppress forwarding address Number of Router LSA(Type 1) 2. Checksum Sum 0x2929BEB Number of Network LSA(Type 2) 3. Checksum Sum 0x2929000 Number of Summary IP Network LSA(Type 3) 3. Checksum Sum 0xBEB          Number of Summary ASBR LSA(Type 4) 2. Checksum Sum 0x2929BEB Number of Opaque Link-Local LSAs (Type 9) is 0, Checksum is 0x0 Number of Opaque Area-Local LSAs (Type 10) is 0, Checksum is 0x0 Area 192.168.1.1 It is a stub area, no summary Administrative state is UP Number of interfaces in this area is 4 Area default metric is 100 Number of Router LSA(Type 1) 2. Checksum Sum 0x2929BEB Number of Network LSA(Type 2) 3. Checksum Sum 0x2929000 Number of Summary IP Network LSA(Type 3) 3. Checksum Sum 0xBEB Number of Opaque Link-Local LSAs (Type 9) is 0, Checksum is 0x0          Number of Opaque Area-Local LSAs (Type 10) is 0, Checksum is 0x0

show ip ospf border-routers

To display the internal Open Shortest Path First (OSPF) routing table entries to an Area Border Router (ABR) and Autonomous System Boundary Router (ASBR), use the show ip ospf border-routers command in privileged EXEC mode.

Syntax

show ip ospf border-routers

Command Mode

Privileged EXEC mode

Example

The following is sample output from the show ip ospf border-routers command:

switchxxxxxx# show ip ospf border-routers OSPF Routing Process 4 with ID 10.10.24.4                  Internal Routing Table Destination         Route  Route      Next Hop          Outgoing     Router         Route Router ID            Type   Cost         IP Address        Interface     Type           Area ID 192.168.97.53     Intr         10     172.16.1.53         VLAN 1      ABR            0.0.0.3 192.168.103.51   Intr         10     192.168.96.51     VLAN 2      ABR,            0.0.0.3 192.168.103.52   Inte         22     192.168.96.51     VLAN 3      ASBR          0.0.0.3 192.168.103.52   Inte         22     172.16.1.53         VLAN 100  ASBR,ABR  0.0.0.3 Field’s descriptions: Destination Router ID—Router ID of the destination. Route Type—Intr - Intra-area route, Inte - Inter-area route. Route Cost—Cost of using this route. Next Hop IP Address—Next hop toward the destination. Outgoing Interface—Outgoing interface toward the destination. Router Type—The router type of the destination: it is either an ABR or ASBR or both. Route Area ID—The area ID of the area from which this route is learned.

show ip ospf database

To display lists of information related to the Open Shortest Path First (OSPF) database for a specific router, use the show ip ospf database command in EXEC mode.

Syntax

show ip ospf [process-id [area-id]] database show ip ospf [process-id [area-id]] database  [adv-router [ip-address]] show ip ospf [process-id [area-id]] database  [asbr-summary] [link-state-id]

show ip ospf [process-id [area-id]] database  [asbr-summary] [link-state-id] [adv-router

[ip-address]] show ip ospf [process-id [area-id]] database  [asbr-summary] [link-state-id] [self-originate]

[link-state-id]

show ip ospf [process-id [area-id]] database  [database-summary] show ip ospf [process-id [area-id]] database  [external] [link-state-id] show ip ospf [process-id [area-id]] database  [external] [link-state-id] [adv-router [ip-address]] show ip ospf [process-id [area-id]] database  [external] [link-state-id] [self-originate] [link-state-id] show ip ospf [process-id [area-id]] database  [network] [link-state-id] show ip ospf [process-id [area-id]] database  [network] [link-state-id] [adv-router [ip-address]] show ip ospf [process-id [area-id]] database  [network] [link-state-id] [self-originate] [link-state-id] show ip ospf [process-id [area-id]] database  [nssa-external] [link-state-id]

show ip ospf [process-id [area-id]] database  [nssa-external] [link-state-id] [adv-router [ip-address]]

show ip ospf [process-id [area-id]] database  [nssa-external] [link-state-id] [self-originate]

[link-state-id] show ip ospf [process-id [area-id]] database  [router] [link-state-id] show ip ospf [process-id [area-id]] database  [router] [adv-router [ip-address]] show ip ospf [process-id [area-id]] database  [router] [self-originate] [link-state-id] show ip ospf [process-id [area-id]] database  [self-originate] [link-state-id] show ip ospf [process-id [area-id]] database  [summary] [link-state-id] show ip ospf [process-id [area-id]] database  [summary] [link-state-id] [adv-router [ip-address]] show ip ospf [process-id [area-id]] database  [summary] [link-state-id] [self-originate] [link-state-id]

Parameters

  • process-id—Internal identification. It is locally assigned and can be any positive integer. The number used here is the number assigned administratively when enabling the OSPF routing process.
  • area-id—Area number associated with the OSPF address range defined in the network router configuration command used to define the particular area.
  • adv-router [ip-address]—Displays all the LSAs of the specified router. If no IP address is included, the information is about the local router itself (in this case, the same as self-originate). n link-state-id—Portion of the Internet environment that is being described by the advertisement.

The value entered depends on the advertisement’s LS type. It must be entered in the form of an IP address.

When the link state advertisement is describing a network, the link-state-id can take one of two forms:

The network’s IP address (as in type 3 summary link advertisements and in autonomous system external link advertisements).

A derived address obtained from the link state ID. (Note that masking a network links advertisement’s link state ID with the network’s subnet mask yields the network’s IP address.)

When the link state advertisement is describing a router, the link state ID is always the described router’s OSPF router ID.

When an autonomous system external advertisement (LS Type = 5) is describing a default route, its link state ID is set to Default Destination (0.0.0.0).

  • asbr-summary—Displays information only about the autonomous system boundary router summary LSAs.
  • database-summary—Displays how many of each type of LSA for each area there are in the database, and the total.
  • external—Displays information only about the external LSAs.
  • network—Displays information only about the network LSAs.
  • nssa-external—Displays information only about the NSSA external LSAs.
  • router—Displays information only about the router LSAs.
  • self-originate—Displays only self-originated LSAs (from the local router).
  • summary—Displays information only about the summary LSAs.

Command Mode User EXEC mode

User Guidelines

The various forms of this command deliver information about different OSPF link state advertisements.

Example

Example 1. The following is sample output from the show ip ospf database command when no arguments or keywords are used:

switchxxxxxx# show ip ospf database OSPF Routing Process 300 with ID 192.168.239.66 Displaying Router Link States(Area 0.0.0.0) Link ID             ADV Router        Age        Seq#           Checksum   Link count ------------------  ---------------          -----      ----------------   ---------------  ----------- 172.16.21.6     172.16.21.6        1731    0x80002CFB    0x69BC         8 172.16.21.5     172.16.21.5        1112     0x800009D2    0xA2B8          5 172.16.1.2       172.16.1.2          1662     0x80000A98    0x4CB6         9 172.16.1.1       172.16.1.1          1115      0x800009B6    0x5F2C         1 172.16.1.5       172.16.1.5          1691      0x80002BC     0x2A1A         5 172.16.65.6     172.16.65.6        1395      0x80001947    0xEEE1         4 172.16.241.5   172.16.241.5      1161      0x8000007C    0x7C70         1 172.16.27.6     172.16.27.6        1723      0x80000548    0x8641          4 172.16.70.6      172.16.70.6       1485      0x80000B97    0xEB84         6 Displaying Net Link States(Area 0.0.0.0) Link ID             ADV Router        Age        Seq#           Checksum ------------------  ---------------          -----      ----------------   -------------- 172.16.1.3       192.168.239.66     1245    0x800000EC      0x82E Displaying Summary Net Link States(Area 0.0.0.0) Link ID             ADV Router        Age        Seq#           Checksum ------------------  ---------------          -----      ----------------   -------------- 172.16.240.0   172.16.241.5      1152    0x80000077      0x7A05 172.16.241.0   172.16.241.5      1152    0x80000070      0xAEB7 172.16.244.0   172.16.241.5       1152   0x80000071      0x95CB

Example 2. The following is sample output from the show ip ospf database command with the asbr-summary keyword:

switchxxxxxx# show ip ospf database asbr-summary OSPF Routing Process 300 with ID 192.168.239.66 Displaying Summary ASB Link States(Area 0.0.0.0) LS age: 1463 Options: (No TOS-capability) LS Type: Summary Links(AS Boundary Router), Type 4 Link State ID: 172.16.245.1 (AS Boundary Router address) Advertising Router: 172.16.241.5 LS Seq Number: 0x80000072 LS Checksum: 0x3548 LS Length: 28 Network Mask: 0.0.0.0 TOS: 0  Metric: 1

Example 3. The following is sample output from the show ip ospf database command with the external keyword:

switchxxxxxx# show ip ospf database external OSPF Routing Process 300 with ID 192.168.239.66 Displaying AS External Link States LS age: 280 Options: (No TOS-capability) LS Type: AS External Link, Type 5 Link State ID: 10.105.0.0 (External Network) Advertising Router: 172.16.70.6 LS Seq Number: 0x80000AFD LS Checksum: 0xC3A LS Length: 36 Network Mask: 255.255.0.0 TOS: 0 Metric Type: 2 (Larger than any link state path) Metric: 1 Forward Address: 0.0.0.0 External Route Tag: 0

Example 4. The following is sample output from the show ip ospf database command with the network keyword:

switchxxxxxx# show ip ospf database network OSPF Routing Process 300 with ID 192.168.239.66 Displaying Network Link States(Area 0.0.0.0) LS age: 1367 Options: (No TOS-capability) LS Type: Network Links, Type 2 Link State ID: 172.16.1.3 (address of Designated Router) Advertising Router: 192.168.239.66 LS Seq Number: 0x800000E7 LS Checksum: 0x1229 LS Length: 52 Network Mask: 255.255.255.0 Attached Router: 192.168.239.66 Attached Router: 172.16.241.5 Attached Router: 172.16.1.1 Attached Router: 172.16.54.5 Attached Router: 172.16.1.5

Example 5. The following is sample output from the show ip ospf database command with the router keyword:

switchxxxxxx# show ip ospf database router OSPF Routing Process 300 with ID 192.168.239.66 Displaying Router Link States(Area 0.0.0.0) LS age: 1176 Options: (No TOS-capability) LS Type: Router Links, Type 1 Link State ID: 172.16.21.6 Advertising Router: 172.16.21.6 LS Seq Number: 0x80002CF6 LS Checksum: 0x73B7 LS Length: 120 AS Boundary Router Number of Links: 8 Link connected to: another Router (point-to-point) Link ID) Neighboring Router ID: 172.16.21.5 (Link Data) Router Interface address: 172.16.21.6 Number of TOS metrics: 0 TOS 0  Metrics: 2 Link connected to: another Router (transit network Link ID) Neighboring Router ID: 182.16.21.5 (Link Data) Designated Router: 182.18.21.6 Number of TOS metrics: 0 TOS 0  Metrics: 2

Example 6. The following is sample output from show ip ospf database command with the summary keyword:

switchxxxxxx# show ip ospf database summary OSPF Routing Process 300 with ID 192.168.239.66 Displaying Summary Net Link States(Area 0.0.0.0) LS age: 1401 Options: (No TOS-capability) LS Type: Summary Links(Network), Type 3 Link State ID: 172.16.240.0 (summary Network Number) Advertising Router: 172.16.241.5 LS Seq Number: 0x80000072 LS Checksum: 0x84FF LS Length: 28 Network Mask: 255.255.255.0 TOS: 0  Metric: 1

Example 7. The following is sample output from show ip ospf database command with the database-summary keyword:

switchxxxxxx# show ip ospf database database-summary OSPF Routing Process 1 with ID 10.0.1.1 Area 0 database summary LSA Type                 Count Router                          3 Network                        0 Summary Net               0   Summary ASBR           0 Type-7 Ext                    0 Opaque Link                 0 Opaque Area                0   Subtotal                        3 Process 1 database summary  LSA Type              Count Router                         2 Network                       0 Summary Net              2 Summary ASBR          0 Type-7 Ext                   0 Opaque Link                0 Opaque Area               0 Opaque AS                   0 Total                              4

Example 8. The following is sample output from the show ip ospf database command with the nssa-external keyword:

switchxxxxxx# show ip ospf database nssa-external OSPF Routing Process 300 with ID 192.168.239.66 Displaying NSSA External Link States LS age: 280 Options: (No TOS-capability) LS Type: NSSA External Link, Type 7 Link State ID: 10.105.0.0 (External Network) Advertising Router: 172.16.70.6 LS Seq Number: 0x80000AFD LS Checksum: 0xC3A LS Length: 36 Network Mask: 255.255.0.0 TOS: 0 Metric Type: 2 (Larger than any link state path) Metric: 1 Forward Address: 0.0.0.0 External Route Tag: 0

show ip ospf interface

To display OSPF interface information related to Open Shortest Path First (OSPF), use the show ip ospf interface command in user EXEC or privileged EXEC mode.

Syntax

show ip ospf [process-id] interface [ip-address] [brief]

Parameters

  • process-id—Process ID number. If this argument is included, only information for the specified routing process is included. Range is from 1 to 65535.
  • ip-address—Interface IP address.
  • brief—Displays brief overview information for OSPF interfaces, states, addresses and masks, and areas on the router.

Command Mode User EXEC mode

Privileged EXEC mode

Example

Example 1. The following is sample output from the show ip ospf interface command when Ethernet interface 0/0 is specified:

switchxxxxxx# show ip ospf interface OSPF Routing Process 1 with ID 192.168.0.0 Internet Address 192.168.254.202/24, Area 0 Interface VLAN 10, BROADCAST is up, IP Interface is up, OSPF Adminastrative state is up Cost: 10 IP Interface has message digest authentication, key chain name is chain99 Transmit Delay is 1 sec Priority 1 Hello Interval  is 10  sec, Dead Interval is 40 sec, Retransmit Interval is 5 sec It is a Designated Router Designated Router (ID) 192.168.99.1, Interface address 192.168.254.202 Backup Designated router (ID) 192.168.254.10, Interface address 192.168.254.10 Number of LSAs 120, Checksum 0x11029BEB Neighbor Count is 1, Adjacent neighbor count is 1 Adjacent with neighbor 192.168.254.10  (Backup Designated Router) Internet Address 192.168.25.202/24, Area 0 Interface VLAN 10, BROADCAST is up, IP Interface is up, OSPF Adminastrative state is is up It is  a passive interface Cost: 10 IP Interface has no authentication Transmit Delay is 1 sec Priority 1 Hello Interval  is 10  sec, Dead Interval is 40 sec, Retransmit Interval is 5 sec Designated Router (ID) 192.168.9.10, Interface address 192.168.25.20 Backup Designated router (ID) 192.168.25.10, Interface address 192.168.25.10 Transmit Delay is 1 sec Number of LSAs 120, Checksum 0x11029BEB Neighbor Count is 3, Adjacent neighbor count is 0 Internet Address 192.168.250.202/24, Area 0 Interface VLAN 10, BROADCAST is up, IP Interface is up, OSPF on interface is down It is  a passive interface Cost: 10 IP Interface has no authentication Transmit Delay is 1 sec Priority 1 Hello Interval  is 10  sec, Dead Interval is 40 sec, Retransmit Interval is 5 sec Internet Address 192.168.250.202/24, Area 0 Interface VLAN 10, BROADCAST is up, IP Interface is down, OSPF Adminastrative state is up   Cost: 10 IP Interface has no authentication Transmit Delay is 1 sec Priority 1 Hello Interval  is 10  sec, Dead Interval is 40 sec, Retransmit Interval is 5 sec Internet Address 192.168.50.202/24, Area 0 Interface VLAN 10, BROADCAST is down, IP Interface is down, OSPF Adminastrative state is up   Cost: 10 IP Interface has no authentication Transmit Delay is 1 sec Priority 1 Hello Interval  is 10  sec, Dead Interval is 40 sec, Retransmit Interval is 5 sec

Example 2. The following sample output from the show ip ospf interface brief command shows a summary of information:

switchxxxxxx# show ip ospf interface brief IP Interface          Process ID Area ID             Cost   Auth Type OSPF Oper St  Passive ----------------------  ------------- ---------------------- -------- -------------  ------------------- ----------- 172.116.211.116                1 172.116.211.116       10 digest              up               Yes 1.1.2.1                               1                1.1.2.0        35                        down 1.1.3.1                               1                        20       55                         up

show ip ospf neighbor

To display Open Shortest Path First (OSPF) neighbor information on a per-interface basis, use the show ip ospf neighbor command in privileged EXEC mode.

Syntax

show ip ospf [process-id] neighbor [interface ip-address] [neighbor-id] [detail]

Parameters

  • process-id—Process ID number. If this argument is included, only information for the specified routing process is included. Range is from 1 to 65535.
  • interface ip-address—Interface IP address.
  • neighbor-id—Neighbor hostname or IP address in A.B.C.D format.
  • detail—Displays all neighbors given in detail (lists all neighbors).

Command Mode

Privileged EXEC mode

Example

Example 1. The following is sample output from the show ip ospf neighbor command showing a single line of summary information for each neighbor:

switchxxxxxx# show ip ospf neighbor Neighbor Addr          Neighbor ID      PID    IP Interface       Pri  State         Dead Time   ------------------------ ----------------------  ----- ----------------------- ---  -------- ------ ---------------  192.199.1199.137 100.199.199.137     1 192.199.199.100 100 Exch/OTH    00:00:31  2.1.1.1                   1.1.1.1                     2 2.2.2.12                100 TwoW/OTH 00:01:31 3.1.1.1                   30.1.1.1                   3 2.2.2.12                100 ExSt/OTH    00:01:31 4.1.1.12                 40.1.1.1                   2 4.2.2.12                100 Exch/OTH 00:01:31 5.1.1.1                   50.1.1.1                   2 5.2.2.12                100 Load/OTH 00:01:31 6.1.1.1                   6.1.1.1                     2 6.2.2.12                100 Load/BDR 00:01:31 7.1.1.1                   7.1.1.1                     2 7.2.2.12                100 Load/DR   00:01:31

Example 2. The following is sample output showing summary information about the neighbor that matches the neighbor ID:

switchxxxxxx# show ip ospf neighbor 10.199.199.137 Neighbor 10.199.199.137, interface address 192.168.80.37 Process ID 1, Area 0.0.0.0, Interface 10.199.80.1 Neighbor priority is 1, State is FULL Options 2 Dead timer due in 0:00:32 Link State retransmission due in 0:00:04 Neighbor 10.199.199.137, interface address 172.16.48.189 Process ID 1, Area 0.0.0.0, Interface 172.16.50.19 Neighbor priority is 5, State is FULL Options 2 Dead timer due in 0:00:32 Link State retransmission due in 0:00:03

Example 3. If you specify the interface along with the neighbor ID, the system displays the neighbors that match the neighbor ID on the interface, as in the following sample display:

switchxxxxxx# show ip ospf neighbor interface 192.168.80.100 10.199.199.137 Neighbor 10.199.199.137, interface address 192.168.80.37 Process ID 1, Area 0.0.0.0, Interface 192.168.80.100 Neighbor priority is 1, State is FULL Options 2 Dead timer due in 0:00:37 Link State retransmission due in 0:00:04

Example 4. You can also specify the interface without the neighbor ID to show all neighbors on the specified interface, as in the following sample display:

interface, as in the following sample display:
switchxxxxxx# show ip ospf neighbor interface 172.16.50.1 Neighbor Addr          Neighbor ID      PID    IP Interface       Pri  State         Dead Time   ------------------------ ----------------------  ----- ----------------------- ---  -------- ------ ---------------  172.16.50.2           100.199.199.137     1 172.16.50.1          100 Exch/OTH   00:00:31 172.16.50.3           1.1.1.1                     1 172.16.50.1            10 TwoW/OTH 00:01:31 172.16.50.4           30.1.1.1                   1 172.16.50.1          120 ExSt/OTH    00:01:31

Example 5.The following is sample output from the show ip ospf neighbor detail command :

switchxxxxxx# show ip ospf neighbor 192.168.5.2 detail Neighbor 192.168.5.2, interface address 10.225.200.28 Process ID 1, Area 0.0.0.0, Interface 10.199.80.1 Neighbor priority is 1, State is FULL, 6 state changes DR is 10.225.200.28 BDR is 10.225.200.30 Options is 0x42 LLS Options is 0x1 (LR), last OOB-Resync 00:03:08 ago Dead timer due in 00:00:36 Number requested LSAs 0 Retransmission queue length 0

show ip ospf router-id

To display OSPF process router-id, use the show ip ospf router-id command in user EXEC or privileged EXEC mode.

Syntax

show ipv6 ospf [process-id] router-id

Parameters

n process-id—Internal identification. It is locally assigned and can be any positive integer. The number used here is the number assigned administratively when the OSPF routing process is enabled.

Default Configuration

Command Mode User EXEC mode

Privileged EXEC mode

User Guidelines

The process-id argument can be entered as a decimal number or as an IPv6 address format.

Example

The following is sample output from the show ip ospf router-id command:

switchxxxxxx# show ip ospf router-id Process-ID        Current Router-ID         Next Router-ID after Restart Value                    Type       Value                Type --------------     -------------------      ---------   -------------------    --------               1    1.1.1.192              default   1.1.1.1                  default 1.1.192 default   100.100.100.100  manual2.2.2 manual  2.2.2.2                  default               4    10.10.10.10          manual  1.1.1.1                  default 5    10.10.10.10          manual   2.2.2.2                 manual

show ip ospf snmp

To display OSPF snmp configuration, use the show ip ospf snmp command in user EXEC or privileged EXEC mode.

Syntax show ip ospf snmp

Command Mode User EXEC mode

Privileged EXEC mode

User Guidelines

Use the show ipv6 ospf snmp command to display the OSPF snmp configuration.

Example

The following is sample output from the show ip ospf snmp command:

switchxxxxxx# show ip ospf snmp The standard OSPF MIB is mapped to OSPF process 2 SNMP notifications for OSPF are enabled SNMP notifications Rate Limit: 10 seconds and 7 notifications during the window time Authentication Failure Notifications are enabled Bad Packet Notifications are disabled Configuration Error Notifications are enabled Virtual Link Authentication-failure Notifications are disabled Virtual Link Bad Packet Notifications are enabled Virtual Link Configuration Error Notifications are enabled SNMP LSA Notifications are disabled SNMP Packet Retransmission Notifications are disabled SNMP Virtual Packet Retransmission Notifications are disabled SNMP IF State Change Notifications are enabled SNMP Neighbor State Change Notifications are enabled SNMP Virtual IF State Change Notifications are enabled SNMP Virtual Neighbor State Change Notifications are enabled

show ip ospf virtual-links

To display parameters and the current state of Open Shortest Path First (OSPF) virtual links, use the show ip ospf virtual-links command in EXEC mode.

Syntax

show ip ospf virtual-links [process-id]

n process-id—Process ID. If this argument is included, only information for the specified routing process is included.

Command Mode User EXEC mode

The information displayed by the show ip ospf virtual-links command is useful in debugging OSPF routing operations.

The following is sample output from the show ip ospf virtual-links command:

switchxxxxxx# show ip ospf virtual-links OSPF Routing Process 4 with ID 10.10.24.4 Virtual Link to router 192.168.101.2,  Transit area 0.0.0.1 Virtual Link State is UP Virtual Link  Cost is 100 Virtual Link has message digest authentication, key chain name is chain1 Hello Interval  is 10  sec, Dead Interval is 40 sec, Retransmit Interval is 5 sec Transmit Delay is 1 sec Virtual Link to router 192.16.10.2, Transit area 10.0.0.1 Virtual Link State DOWN Virtual Link has no authentication Hello Interval  is 10  sec, Dead Interval is 40 sec, Retransmit Interval is 5 sec Transmit Delay is 1 sec

shutdown (OSPF)

To initiate a graceful shutdown of the Open Shortest Path First (OSPF) protocol under the current instance, use the shutdown command in router configuration mode. To restart the OSPF protocol, use the no form of this command.

Syntax shutdown no shutdown

Parameters

N/A

Default Configuration

OSPF stays active under the current instance.

Command Mode

Router RIP Configuration mode

User Guidelines

Use the shutdown command in router configuration mode to temporarily shut down a protocol in the least disruptive manner and to notify its neighbors that it is going away. All traffic that has another path through the network will be directed to that alternate path.

The no shutdown command changes the OSPF process router-id if it was reconfigured by the user else if the current used router-id has the default value the command runs the router-id re-election algorithm.

Example

The following example shows how to enable a graceful shutdown of the OSPF protocol:

switchxxxxxx(config)# router ospf 1
switchxxxxxx(config-ospf)# shutdown
switchxxxxxx(config-ospf)# exit

snmp-process ospf

To specify an OSPF process accessed via the standard OSPF MIB, use the snmp-process ospf command in global configuration mode. To return to the default, use the no form of this command.

Syntax

snmp-process ospf process-id no snmp-process [process-id]

Parameters

n process-id—OSPF process ID.

Default Configuration

The minimal existed OSPF process.

Command Mode

Global Configuration mode

User Guidelines

The standard MIB do not include the OSPF process-ID and by default is mapped to the minimal OSPF process. Use the snmp-process command to change the mapping.

Example

The following example maps the standard MIBs to OSPF process 100:

switchxxxxxx(config)# snmp-process ospf 100

snmp-server enable traps ospf

To enable all Simple Network Management Protocol (SNMP) notifications for Open Shortest Path First (OSPF), use the snmp-server enable traps ospf command in global configuration mode. To disable all SNMP notifications for OSPF, use the no form of this command.

Syntax

snmp-server enable traps ospf no snmp-server enable traps ospf

Parameters

N/A

Default Configuration

SNMP notifications for OSPF are disabled.

Command Mode

Global Configuration mode

User Guidelines

If you wish to enable or disable specific OSPF SNMP notifications, enter one or more of the following commands of the following commands: [no] snmp-server enable traps ospf errors

[no] snmp-server enable traps ospf lsa

[no] snmp-server enable traps ospf retransmit

[no] snmp-server enable traps ospf state-change

Example

The following exampleglobally enables SNMP notifications for OSPF:

switchxxxxxx(config)# snmp-server enable traps ospf

snmp-server enable traps ospf errors

To enable Simple Network Management Protocol (SNMP) notifications for Open Shortest Path First (OSPF) errors, use the snmp-server enable traps ospf errors command in global configuration mode. To disable SNMP notifications for OSPF errors, use the no form of this command.

Syntax

snmp-server enable traps ospf errors [authentication-failure][bad-packet] [config-error]

[virt-authentication-failure] [virt-bad-packet] [virt-config-error]

no snmp-server enable traps ospf errors [authentication-failure][bad-packet] [config-error] [virt-authentication-failure] [virt-bad-packet] [virt-config-error]

Parameters

  • authentication-failure—Enables only the ospfIfFailure trap. Allows SNMP notifications to be sent when a packet has been received on a nonvirtual interface from a neighbor router whose authentication key or authentication type conflicts with the authentication key or authentication type of this router.
  • bad-packet—Enables only the ospfIfRxBadPacket trap. Allows SNMP notifications to be sent when an OSPF packet that has not been parsed has been received on a nonvirtual interface.
  • config-error—Enables only the ospfIfConfigError trap. Sends SNMP notifications when a packet has been received in a nonvirtual interface from a neighbor router whose configuration parameters conflict with the configuration parameters of this router.
  • virt-authentication-failure—Enables only the ospfVirtIfFailure trap. Allows SNMP notifications to be sent when a packet has been received on a virtual interface from a neighbor router whose authentication key or authentication type conflicts with the authentication key or authentication type of this router.
  • virt-bad-packet—Enables only the ospfVirtIfRxBadPacket trap. Allows SNMP notifications to be sent when an OSPF packet that has not been parsed has been received on a virtual interface.
  • virt-config-error—Enables only the ospfVirtIfConfigError trap. Sends SNMP notifications when a packet has been received in a virtual interface from a neighbor router whose configuration parameters conflict with the configuration parameters of this router.

Default Configuration

SNMP notifications for OSPF errors are disabled.

Command Mode

Global Configuration mode

User Guidelines

When you enter the snmp-server enable traps ospf errors command without any optional keywords, all OSPF error traps will be enabled. To enable only one or more OSPF error traps, enter one or more of the optional keywords.

Example

The following example enables the router to send all OSPF error notifications:

switchxxxxxx(config)# snmp-server enable traps ospf errors

snmp-server enable traps ospf lsa

To enable Simple Network Management Protocol (SNMP) notifications for Open Shortest Path First (OSPF) link-state advertisements (LSAs), use the snmp-server enable traps ospf lsa command in global configuration mode. To disable SNMP notifications for OSPF LSAs, use the no form of this command.

Syntax

snmp-server enable traps ospf lsa [lsa-maxage] [lsa-originate]

no snmp-server enable traps ospf lsa [lsa-maxage] [lsa-originate]

Parameters

  • lsa-maxage—Enables the ospfMaxAgeLsa trap
  • lsa-originate—Enables the ospfOriginateLsa trap

Default Configuration

SNMP notifications for OSPF LSAs are disabled.

Command Mode

Global Configuration mode

User Guidelines

The snmp-server enable traps ospf lsa command enables the traps for standard LSAs that are defined by the OSPF-MIB. To enable the ospfMaxAgeLsa trap, enter the snmp-server enable traps ospf lsa command with the lsa-maxage keyword. To enable the ospfOriginateLsa trap, enter the snmp-server enable traps ospf lsa command with the lsa-originate keyword. When the ospfOriginateLsa trap is enabled, it will not be invoked for simple LSA refreshes that take place every 30 minutes or when an LSA has reached its maximum age and is being flushed. When you enter the snmp-server enable traps ospf lsa command without either keyword, both traps will be enabled.

Example

The following example enables the router to send SNMP notifications when new LSAs are originated by the router as a result of a topology change:

switchxxxxxx(config)# snmp-server enable traps ospf lsa lsa-originate

snmp-server enable traps ospf rate-limit

To limit the number of Open Shortest Path First (OSPF) traps that are sent during a specified number of seconds, use the snmp-server enable traps ospf rate-limit command in global configuration mode. To disable the limit placed on the number of OSPF traps sent during a specified number of seconds, use the no form of this command.

Syntax

snmp-server enable traps ospf rate-limit seconds trap-number no snmp-server enable traps ospf rate-limit seconds trap-number

Parameters

  • seconds—Sets the rate limit window size, in seconds. A number from 2 to 60. The default value is 10.
  • trap-number—Sets the maximum number of traps sent during the window time. A number from 0 to 300. The default number is 7.

Default Configuration

No limit is placed on the number of OSPF traps sent.

Command Mode

Global Configuration mode

User Guidelines

There is a possibility that a router sends trap bursts, which can drain network resources in a small interval of time. It is recommended that you enter the snmp-server enable traps ospf rate-limit command to configure a sliding window mechanism that will limit the number of traps that are sent within a specified number of seconds

Example

he following example sets the trap rate limit window so that during a 40-second window of time, no more that 50 traps are sent:

switchxxxxxx(config)# snmp-server enable traps ospf rate-limit 40 50

snmp-server enable traps ospf retransmit

To enable Simple Network Management Protocol (SNMP) notifications when packets are re-sent in an Open Shortest Path First (OSPF) network, use the snmp-server enable traps ospf retransmit command in global configuration mode. To disable SNMP notifications, use the no form of this command.

Syntax

snmp-server enable traps ospf retransmit [packets] [virt-packets] no snmp-server enable traps ospf retransmit [packets] [virt-packets]

Parameters

  • packets—Enables only the ospfTxRetransmit trap. Allows SNMP notifications to be sent when an OSPF packet has been re-sent on a nonvirtual interface.
  • virt-packets—Enables only the ospfVirtTxRetransmit trap. Allows SNMP notifications to be sent when an OSPF packet has been re-sent on a virtual interface.

Default Configuration

SNMP notifications are disabled.

Command Mode

Global Configuration mode

User Guidelines

To enable the ospfTXRetransmit trap so that SNMP notifications are sent only when packets from nonvirtual interfaces are re-sent, enter the snmp-server enable traps ospf retransmit command with the packets keyword. To enable the ospfTxRetransmit trap so that SNMP notifications are sent only when packets from virtual interfaces are re-sent, enter the snmp-server enable traps ospf retransmit command with the virt-packets keyword. When you enter the snmp-server enable traps ospf retransmit command without either keyword, both traps will be enabled.

Example

The following example enables the router to send SNMP notifications when packets are re-sent by virtual interfaces:

switchxxxxxx(config)# snmp-server enable traps ospf retransmit virt-packets

snmp-server enable traps ospf state-change

To enable Simple Network Management Protocol (SNMP) notifications for Open Shortest Path First (OSPF) transition state changes, use the snmp-server enable traps ospf state-change command in global configuration mode. To disable SNMP notifications for OSPF transition state changes, use the no form of this command.

Syntax

snmp-server enable traps ospf state-change [if-state-change] [neighbor-state-change]

[virtif-state-change] [virtneighbor-state-change] no snmp-server enable traps ospf state-change [if-state-change] [neighbor-state-change] [virtif-state-change] [virtneighbor-state-change]

Parameters

  • if-state-change—Enables only the ospfIfStateChange trap. Sends SNMP notifications when there has been a change in the state of a nonvirtual OSPF interface.
  • neighbor-state-change—Enables only the ospfNbrStateChange trap. Sends SNMP notifications when there has been a change in the state of a nonvirtual OSPF neighbor.
  • virtif-state-change—Enables only the ospfVirtIfStateChange trap. Sends SNMP notifications when there has been a change in the state of a virtual OSPF interface.
  • virtneighbor-state-change—Enables only the ospfVirtNbrStateChange trap. Sends SNMP notifications when there has been a change in the state of a virtual OSPF neighbor.

Default Configuration

SNMP notifications for OSPF transition state changes are disabled.

Command Mode

Global Configuration mode

User Guidelines

To enable all traps for transition state changes, enter the snmp-server enable traps ospf state-change command without of the optional keywords.

Example

The following example enables the router to send SNMP notifications for transition state changes for virtual interfaces and virtual neighbors:

switchxxxxxx(config)# snmp-server enable traps ospf state-change virtif-state-change virtneighbor-state-change

summary-address

To create aggregate addresses for Open Shortest Path First (OSPF), use the summary-address command in router configuration mode. To restore the default, use the no form of this command.

Syntax

summary-address {ip-address mask | ip-address/mask-length} [not-advertise] [nssa-only] no summary-address summary-address {ip-address mask | ip-address/mask-length} [not-advertise] [nssa-only]

Parameters

  • ip-address mask—Summary address range designated for a range of addresses in format ip address and ip mask.
  • ip-address/mask-length—Summary address range designated for a range of addresses in forma ip address and mask’s length.
  • not-advertise—Suppresses routes that match the specified prefix/mask pair. This keyword applies to OSPF only.
  • nssa-only—Sets the nssa-only attribute for the summary route (if any) generated for the specified prefix, which limits the summary to not-so-stubby-area (NSSA) areas.

Default Configuration

This command behavior is disabled by default.

Command Mode

Router RIP Configuration mode

User Guidelines

Routes learned from other routing protocols can be summarized. The metric used to advertise the summary is the lowest metric of all the more specific routes. This command helps reduce the size of the routing table.

Using this command for OSPF causes an OSPF Autonomous System Boundary Router (ASBR) to advertise one external route as an aggregate for all redistributed routes that are covered by the address. For OSPF, this command summarizes only routes from other routing protocols that are being redistributed into OSPF. Use the area range command for route summarization between OSPF areas.

OSPF does not support the summary-address 0.0.0.0 0.0.0.0 command.

Example

In the following 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 link-state advertisement:

switchxxxxxx(config)# router ospf 1
switchxxxxxx(config-ospf)# summary-address 10.1.0.0 255.255.0.0
switchxxxxxx(config-ospf)# exit

timers lsa arrival

To set the minimum interval at which the software accepts the same link-state advertisement (LSA) from OSPF neighbors, use the timers lsa arrival command in router configuration mode. To restore the default value, use the no form of this command.

Syntax

timers lsa arrival milliseconds no timers lsa arrival

Parameters

n milliseconds—Minimum delay in milliseconds that must pass between acceptance of the same LSA arriving from neighbors. The range is 0 to 600,000 milliseconds. The default is 1000 milliseconds.

Default Configuration 1000 milliseconds

Command Mode

Router RIP Configuration mode

User Guidelines

The timers lsa arrival command controls the minimum interval for accepting the same LSA. The “same LSA” is defined as an LSA instance that contains the same LSA ID number, LSA type, and advertising router ID. If an instance of the same LSA arrives sooner than the interval that is set, the LSA is dropped.

We suggest you keep the milliseconds value of the timers lsa arrival command less than or equal to the neighbors’ hold-interval value of the timers throttle lsa all command.

Example

The following example sets the minimum interval for accepting the same LSA at 2000 milliseconds:

switchxxxxxx(config)# router ospf 1
switchxxxxxx(config-ospf)# log-adjacency-changes
switchxxxxxx(config-ospf)# timers throttle lsa all 200 10000 45000
switchxxxxxx(config-ospf)# timers lsa arrival 2000
switchxxxxxx(config-ospf)# network 10.10.4.1  area 24
switchxxxxxx(config-ospf)# network 10.10.24.4 area 24
switchxxxxxx(config-ospf)# exit

Was this article helpful?

Related Articles

Leave A Comment?