OSPF

Refer to the Catalyst 1300X Admin Guide for more information on OSPF feature in Catalyst 1300X series switches.

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

Default Configuration

Type 0 authentication (no authentication).

Command Mode

Router OSPF 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 simple password authentication (type 1), you must configure a password using the ip ospf authentication-key interface command for an IP interface. If a password has not been defined for an IP interface, then OSPF packets are not sent on the interface and received IP interface packets are dropped.

If you configure this command with the message-digest keyword, MD5 authentication is enabled on the IP interfaces (unless it is overridden by the interface level command). in this case a key with a password must be configured using the commmand ip ospf message-digest-key key-id md5. If a md5 digest key has not been defined for an IP interface, then 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.0.0.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.0.0.0
switchxxxxxx(config-ospf)# exit
switchxxxxxx(config)# interface ip 192.168.251.201
switchxxxxxx(config-ip)# ip ospf authentication-key 12345678
switchxxxxxx(config-ip)# exit
switchxxxxxx(config)# interface ip 10.56.0.201
switchxxxxxx(config-ip)# ip ospf authentication-key abcdefgh
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 OSPF 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 OSPF 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.0.0.0 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.0.0.0 nssa
switchxxxxxx(config-ospf)# exit

area range

To consolidate and summarize routes at an area boundary, use the area range command in router 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 OSPF 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.0.0.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.0.0.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

  • 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 OSPF 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 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 OSPF 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 ninternal 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

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

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

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

no ip ospf authentication

Parameters

  • key-chain name-of-chain - use the ip ospf authentication key-chain command to specify a key-chain that will be used for authentication. The authentication algorithm type is set using the cryptographic-algorithm command in Key Chain Key Configuration mod.

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

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 type is assumed.

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

If you enable the MD5 authentication, you must configure a key for MD5 authentication using the ip ospf message-digest-key md5 IP interface command. If a key is not defined for the IP interface then OSPF packets are not sent on the IP interface and OSPF packets received on the IP interface are dropped.

If you enable the key-chain option, and the key chain that was specified does not exist, then OSPF packets are not sent on the IP interface and OSPF packets received on the IP interface are dropped.

The authentication algorithm is configured using the cryptographic-algorithm command in Key Chain Key Configuration mode. For more guidelines on cryptographic algorithm key configuration see the user guidelines of the cryptographic-algorithm.

Example

The following example overrides the area default authentication for the 10.56.0.201, 10.10.1.1 and 20.20.1.1 IP interfaces, and keeps the default authentication setting for interface 10.2.1.1:

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 20.20.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 message-digest-key 1 md5 key1
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 20.20.1.1
switchxxxxxx(config-ip)# ip ospf authentication key-chain chain1
switchxxxxxx(config-ip)# exit
switchxxxxxx(config)# interface ip 10.2.1.1
switchxxxxxx(config-ip)# ip ospf authentication-key Ases12@@
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-keypassword

no ip ospf authentication-key

Parameters

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

  • 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| minimal hello multiplier multiplier}

no ip ospf dead-interval

Parameters

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

  • minimal — Sets the dead interval to 1 second. Using this keyword requires that the hello-multiplier keyword and multiplier argument are also configured

  • hello-multiplier multiplier— the number of hello packets sent during 1 second (range: 3-20)

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

  • 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 message-digest-key md5

To specify the key to be used to generate MD5 digest authentication for the OSPF packets, use the ip ospf message-digest-key command in IP interface configuration mode. To remove a key, use the no form of this command.

Syntax

ip ospf message-digest-key key-id md5 key-string

no ip ospf message-digest-key key-id

Parameters

  • key-id—A key identifier in the range of 1-255.

  • key-string - Specifies the authentication string. The string can contain from 1 to 16 characters

Default Configuration

No key exists

Command Mode

Ip Configuration mode

User Guidelines

The key created by this command is used as a “key” to generate the MD5 authentication digest which is then sent in the OSPF packets. A separate key can be assigned to each subnetwork. All neighboring routers on the same subnetwork must have the same key to be able to exchange OSPF information. Only 1 key can be configured per interface.

Use the no form of the command to remove a key.

To update an existing key (of an existing key-id), first remove the existing key using the no form of the command and only then configure the new key.

Example

The following example shows how to enable MD5 authentication on an interface and configure 2 keys which will be used to generate the MD5 digest:

switchxxxxxx(config)# interface ip 1.1.1.1
switchxxxxxx(config-ip)# ip ospf authentication message-digest
switchxxxxxx(config-ip)# ip ospf message-digest-key 1 md5 key1
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.0.0.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

ip ospf prefix-suppression

To prevent OSPF from advertising the interface IP prefix, use the ip ospf prefix-suppression command in IP interface configuration mode. To remove the per-interface configuration from the interface and allow the interface to inherit the IP prefix suppression setting from the router configuration, use the no form of this command

Syntax

ip ospf prefix-suppression [disable]

no ip ospf prefix-suppression

Parameters

  • disable—Specifies that OSPF will advertise the interface IP prefix, regardless of the router mode configuration for IP prefix suppression

Default Configuration

Routing updates are sent on the interface.

Command Mode

IP Configuration mode

User Guidelines

Use this command to suppress prefix advertisements for the specified IP interface. This command can also be used to suppress prefixes of passive and Loopback interfaces.

By default, prefix suppression is not configured on an interface. In this case the IP interface will inherit the behavior set by the prefix-suppression router configuration mode command set for the OSPF process. Entering the ip ospf prefix-suppression command will override the prefix-suppression router configuration mode command. Use the command with the disable option to disable all prefix suppression - regardless of the router configuration mode setting.

Example

The following example enables ip prefix suppression on an IP interface:

switchxxxxxx(config)# interface ip 1.1.1.1
switchxxxxxx(config-ip)# ip ospf prefix-suppression
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

  • 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

  • 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

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

  • 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

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

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

Default Configuration

Enabled

Command Mode

Router OSPF 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 detailed
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 argument.

  • shutdown—OSPF is enabled on the interface in the shutdown state

Default Configuration

This command is disabled by default.

Command Mode

Router OSPF Configuration mode

User Gyuidelines

OSPF can be defined only on manually configured IP interfaces, meaning that OSPF 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 OSPF 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.0.0.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.0.0.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

  • 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 OSPF 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. It also removes all of the networks that were associated to that area (network ip-address area area-id).

Example

The following example removes area 1:

switchxxxxxx(config)# router ospf 1
switchxxxxxx(config-ospf)# no area 0.0.0.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 OSPF 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 ip ospf passive-interface disable 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.0.0.0
switchxxxxxx(config-ospf)# passive-interface
switchxxxxxx(config-ospf)# exit
switchxxxxxx(config)# interface ip 1.1.1.1
switchxxxxxx(config-ip)# ip ospf passive-interface disable
switchxxxxxx(config-ip)# exit

prefix-suppression

To prevent OSPF from advertising all IP prefixes for a specific OSPF process except for prefixes that are associated with loopback and passive interfaces, use the prefix-suppression command in router configuration mode. To advertise all IP prefixes, use the no form of this command.

Syntax

prefix-suppression

no prefix-suppression

Parameters

N/A

Default Configuration

All IP prefixes are advertised.

Command Mode

Router OSPF Configuration mode

User Guidelines

Use the prefix-suppression router configuration mode command to globally suppress advertisement of all IP prefixes (except for prefixes that are associated with loopbacks and passive interfaces) for an entire OSPF process.You can also suppress a specific IP prefix by using the ip ospf prefix-suppression command in IP interface configuration mode. When the ip ospf prefix-suppression command is configured, it takes precedence over the prefix-suppression router configuration command

Example

The following example globally suppresses all IP prefixes or OSPF process 613 except for prefixes that are associated with loopbacks and passive interfaces:

switchxxxxxx(config)# router ospf 613
switchxxxxxx(config-ospf)# network 1.1.1.1 area 0.0.0.0
switchxxxxxx(config-ospf)# prefix-suppression
switchxxxxxx(config-ospf)# 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}] [route-map map-tag] [subnets] [nssa-only]

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

Parameters

  • 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 metric-value—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 argument

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

    • type-1 - Type 1 external route

    • type-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 OSPF 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.0.0.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.0.0.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

  • 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 shutdown command (OSPF Router mode) 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

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

Default Configuration

The minimum IPv4 address configured on the router.

Command Mode

Router OSPF 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

  • 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

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
route-map name is alpha
with subnets
nssa only
Connected:
metric value is default metric
metric type is external 2
route-map name is alpha
with subnets
nssa only
static:
metric value is 50
metric type is external 1
no route-map
without subnets
OSPF 109:
internal:
internal metric value is preserved, metric type is external 1
metric value is preserved, metric type is external 1
route-map name is alp
with subnets
exteranl 1
metric value is 100, metric type is external 1
no route-map
with subnets
exteranl 2
metric is value 100, metric type is external 2
no route-map
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
no route-map
with subnets
exteranl 1: metric value is default metric, metric type is external 2
metric value is default metric, metric type is external 2
no route-map
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 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 database router

show ip ospf database network

show ip ospf database summary

show ip ospf database as-summary

show ip ospf database as-summary

show ip ospf database as-external

show ip ospf database nssa-external

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.

  • network—Displays information only about the network LSAs.

  • router—Displays information only about the router LSAs.

  • nssa-external—Displays information only about the NSSA external LSAs.

  • as-external—Displays information only about the external LSAs.

  • as-summary—Displays information only about the ASBR 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
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
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
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
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
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
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
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
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.0.0.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
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 specifiedrouting 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 IP interface 192.168.254.202 is specified

switchxxxxxx# show ip ospf interface 192.168.254.202
OSPF Routing Process 1 with ID 192.168.0.0
Internet Address 192.168.254.202/24, Area 0.0.0.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 id is 1
Prefix-suppression is enabled (global)
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
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.0.0.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
Neighbor Count is 3, Adjacent neighbor count is 0
Internet Address 192.168.250.202/24, Area 0.0.0.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.0.0.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.0.0.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 [detail | interface-id interface-idneighbor-id neighbor-id] [detail] | neighbor-id neighbor-id [interface-id interface-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.

  • interfaceinterface-ip—Interface IP address.

  • neighbor-id—Neighbor router ID in A.B.C.D format.

  • detail—Displays all neighbors information in detail.

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 ip ospf [process-id] router-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 the OSPF routing process is enabled.

Command Mode

User EXEC mode

Privileged EXEC mode

User Guidelines

N/A

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
2 1.1.1.192 default 100.100.100.100 manual
3 2.2.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 ipv 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

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 OSPF 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

Parameters

  • 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 example globally 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 Isa

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

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

The 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