Configuring OSPF

Information About OSPF

OSPF is an Interior Gateway Protocol (IGP) designed expressly for IP networks, supporting IP subnetting and tagging of externally derived routing information. OSPF also allows packet authentication and uses IP multicast when sending and receiving packets. The Cisco implementation supports RFC 1253, OSPF management information base (MIB).

The Cisco implementation conforms to the OSPF Version 2 specifications with these key features:

  • Definition of stub areas is supported.

  • Routes learned through any IP routing protocol can be redistributed into another IP routing protocol. At the intradomain level, this means that OSPF can import routes learned through EIGRP and RIP. OSPF routes can also be exported into RIP.

  • Plain text and MD5 authentication among neighboring routers within an area is supported.

  • Configurable routing interface parameters include interface output cost, retransmission interval, interface transmit delay, router priority, router dead and hello intervals, and authentication key.

  • Virtual links are supported.

  • Not-so-stubby-areas (NSSAs) per RFC 1587are supported.

OSPF typically requires coordination among many internal routers, area border routers (ABRs) connected to multiple areas, and autonomous system boundary routers (ASBRs). The minimum configuration would use all default parameter values, no authentication, and interfaces assigned to areas. If you customize your environment, you must ensure coordinated configuration of all routers.

OSPF for IPv6

The switch supports Open Shortest Path First (OSPF) for IPv6, a link-state protocol for IP.

For configuring OSPF for IPv6, see the Configuring OSPF for IPv6 section.

For more information, see Cisco IOS IPv6 Configuration Library on Cisco.com.

OSPF Nonstop Forwarding

The switch or switch stack supports two levels of nonstop forwarding (NSF):

OSPF NSF Awareness

The Network Advantage license supports OSPF NSF Awareness for IPv4. When the neighboring router is NSF-capable, the Layer 3 device continues to forward packets from the neighboring router during the interval between the primary Route Processor (RP) in a router crashing and the backup RP taking over, or while the primary RP is manually reloaded for a non-disruptive software upgrade.

This feature cannot be disabled.

OSPF NSF Capability

The Network Advantage license supports the OSPFv2 NSF IETF format in addition to the OSPFv2 NSF Cisco format that is supported in earlier releases. For information about this feature, see : NSF—OSPF (RFC 3623 OSPF Graceful Restart).

The Network Advantage license also supports OSPF NSF-capable routing for IPv4 for better convergence and lower traffic loss following a stack's active switch change.

When an active switch change occurs in an OSPF NSF-capable stack, the new active switch must do two things to resynchronize its link-state database with its OSPF neighbors:

  • Release the available OSPF neighbors on the network without resetting the neighbor relationship.

  • Reacquire the contents of the link-state database for the network.

After an active switch change, the new active switch sends an OSPF NSF signal to neighboring NSF-aware devices. A device recognizes this signal to mean that it should not reset the neighbor relationship with the stack. As the NSF-capable active switch receives signals from other routes on the network, it begins to rebuild its neighbor list.

When the neighbor relationships are reestablished, the NSF-capable active switch resynchronizes its database with its NSF-aware neighbors, and routing information is exchanged between the OSPF neighbors. The new active switch uses this routing information to remove stale routes, to update the routing information database (RIB), and to update the forwarding information base (FIB) with the new information. The OSPF protocols then fully converge.


Note


OSPF NSF requires that all neighbor networking devices be NSF-aware. If an NSF-capable router discovers non-NSF aware neighbors on a network segment, it disables NSF capabilities for that segment. Other network segments where all devices are NSF-aware or NSF-capable continue to provide NSF capabilities.


Use the nsf OSPF routing configuration command to enable OSPF NSF routing. Use the show ip ospf privileged EXEC command to verify that it is enabled.

OSPF Area Parameters

You can optionally configure several OSPF area parameters. These parameters include authentication for password-based protection against unauthorized access to an area, stub areas, and not-so-stubby-areas (NSSAs). Stub areas are areas into which information on external routes is not sent. Instead, the area border router (ABR) generates a default external route into the stub area for destinations outside the autonomous system (AS). An NSSA does not flood all LSAs from the core into the area, but can import AS external routes within the area by redistribution.

Route summarization is the consolidation of advertised addresses into a single summary route to be advertised by other areas. If network numbers are contiguous, you can use the area range router configuration command to configure the ABR to advertise a summary route that covers all networks in the range.

Other OSPF Parameters

You can optionally configure other OSPF parameters in router configuration mode.

  • Route summarization: When redistributing routes from other protocols. Each route is advertised individually in an external LSA. To help decrease the size of the OSPF link state database, you can use the summary-address router configuration command to advertise a single router for all the redistributed routes included in a specified network address and mask.

  • Virtual links: In OSPF, all areas must be connected to a backbone area. You can establish a virtual link in case of a backbone-continuity break by configuring two Area Border Routers as endpoints of a virtual link. Configuration information includes the identity of the other virtual endpoint (the other ABR) and the nonbackbone link that the two routers have in common (the transit area). Virtual links cannot be configured through a stub area.

  • Default route: When you specifically configure redistribution of routes into an OSPF routing domain, the route automatically becomes an autonomous system boundary router (ASBR). You can force the ASBR to generate a default route into the OSPF routing domain.

  • Domain Name Server (DNS) names for use in all OSPF show privileged EXEC command displays makes it easier to identify a router than displaying it by router ID or neighbor ID.

  • Default Metrics: OSPF calculates the OSPF metric for an interface according to the bandwidth of the interface. The metric is calculated as ref-bw divided by bandwidth, where ref is 10 by default, and bandwidth (bw ) is specified by the bandwidth interface configuration command. For multiple links with high bandwidth, you can specify a larger number to differentiate the cost on those links.

  • Administrative distance is a rating of the trustworthiness of a routing information source, an integer between 0 and 255, with a higher value meaning a lower trust rating. An administrative distance of 255 means the routing information source cannot be trusted at all and should be ignored. OSPF uses three different administrative distances: routes within an area (interarea), routes to another area (interarea), and routes from another routing domain learned through redistribution (external). You can change any of the distance values.

  • Passive interfaces: Because interfaces between two devices on an Ethernet represent only one network segment, to prevent OSPF from sending hello packets for the sending interface, you must configure the sending device to be a passive interface. Both devices can identify each other through the hello packet for the receiving interface.

  • Route calculation timers: You can configure the delay time between when OSPF receives a topology change and when it starts the shortest path first (SPF) calculation and the hold time between two SPF calculations.

  • Log neighbor changes: You can configure the router to send a syslog message when an OSPF neighbor state changes, providing a high-level view of changes in the router.

LSA Group Pacing

The OSPF LSA group pacing feature allows the router to group OSPF LSAs and pace the refreshing, check-summing, and aging functions for more efficient router use. This feature is enabled by default with a 4-minute default pacing interval, and you will not usually need to modify this parameter. The optimum group pacing interval is inversely proportional to the number of LSAs the router is refreshing, check-summing, and aging. For example, if you have approximately 10,000 LSAs in the database, decreasing the pacing interval would benefit you. If you have a very small database (40 to 100 LSAs), increasing the pacing interval to 10 to 20 minutes might benefit you slightly.

Loopback Interfaces

OSPF uses the highest IP address configured on the interfaces as its router ID. If this interface is down or removed, the OSPF process must recalculate a new router ID and resend all its routing information out its interfaces. If a loopback interface is configured with an IP address, OSPF uses this IP address as its router ID, even if other interfaces have higher IP addresses. Because loopback interfaces never fail, this provides greater stability. OSPF automatically prefers a loopback interface over other interfaces, and it chooses the highest IP address among all loopback interfaces.

How to Configure OSPF

Default OSPF Configuration

Table 1. Default OSPF Configuration

Feature

Default Setting

Interface parameters

Cost:

Retransmit interval: 5 seconds.

Transmit delay: 1 second.

Priority: 1.

Hello interval: 10 seconds.

Dead interval: 4 times the hello interval.

No authentication.

No password specified.

MD5 authentication disabled.

Area

Authentication type: 0 (no authentication).

Default cost: 1.

Range: Disabled.

Stub: No stub area defined.

NSSA: No NSSA area defined.

Auto cost

100 Mb/s.

Default-information originate

Disabled. When enabled, the default metric setting is 10, and the external route type default is Type 2.

Default metric

Built-in, automatic metric translation, as appropriate for each routing protocol.

Distance OSPF

dist1 (all routes within an area): 110.
dist2 (all routes from one area to another): 110.
and dist3 (routes from other routing domains): 110.

OSPF database filter

Disabled. All outgoing link-state advertisements (LSAs) are flooded to the interface.

IP OSPF name lookup

Disabled.

Log adjacency changes

Enabled.

Neighbor

None specified.

Neighbor database filter

Disabled. All outgoing LSAs are flooded to the neighbor.

Network area

Disabled.

Nonstop Forwarding (NSF) awareness

Enabled. Allows Layer 3 switches to continue forwarding packets from a neighboring NSF-capable router during hardware or software changes.

Router ID

No OSPF routing process defined.

Summary address

Disabled.

Timers LSA group pacing

240 seconds.

Timers shortest path first (spf)

spf delay: 50 miliseconds; spf-holdtime: 200 miliseconds.

Virtual link

No area ID or router ID defined.

Hello interval: 10 seconds.

Retransmit interval: 5 seconds.

Transmit delay: 1 second.

Dead interval: 40 seconds.

Authentication key: no key predefined.

Message-digest key (MD5): no key predefined.

Configuring Basic OSPF Parameters

To enable OSPF, create an OSPF routing process, specify the range of IP addresses to associate with the routing process, and assign area IDs to be associated with that range. For switches running the Network Essentialsimage, you can configure either the Cisco OSPFv2 NSF format or the IETF OSPFv2 NSF format.

Procedure

  Command or Action Purpose

Step 1

enable

Example:


Device>enable

Enables privileged EXEC mode.

  • Enter your password if prompted.

Step 2

configure terminal

Example:


Device#configure terminal

Enters global configuration mode.

Step 3

router ospf process-id

Example:


Device(config)#router ospf 15

Enables OSPF routing, and enter router configuration mode. The process ID is an internally used identification parameter that is locally assigned and can be any positive integer. Each OSPF routing process has a unique value.

Note

 

OSPF for Routed Access supports only one OSPFv2 and one OSPFv3 instance with a maximum number of 1000 dynamically learned routes.

Step 4

nsf cisco [enforce global]

Example:


Device(config)#nsf cisco enforce global

(Optional) Enables Cisco NSF operations for OSPF. The enforce global keyword cancels NSF restart when non-NSF-aware neighboring networking devices are detected.

Note

 

Enter the command in Step 3 or Step 4, and go to Step 5.

Step 5

nsf ietf [restart-interval seconds]

Example:


Device(config)#nsf ietf restart-interval 60

(Optional) Enables IETF NSF operations for OSPF. The restart-interval keyword specifies the length of the graceful restart interval, in seconds. The range is from 1 to 1800. The default is 120.

Note

 

Enter the command in Step 3 or Step 4, and go to Step 5.

Step 6

network address wildcard-mask area area-id

Example:


Device(config)#network 10.1.1.1 255.240.0.0 area 20

Define an interface on which OSPF runs and the area ID for that interface. You can use the wildcard-mask to use a single command to define one or more multiple interfaces to be associated with a specific OSPF area. The area ID can be a decimal value or an IP address.

Step 7

end

Example:


Device(config)#end

Returns to privileged EXEC mode.

Step 8

show ip protocols

Example:


Device#show ip protocols

Verifies your entries.

Step 9

copy running-config startup-config

Example:


Device#copy running-config startup-config 

(Optional) Saves your entries in the configuration file.

Configuring OSPF for IPv6

For more information about configuring OSPF routing for IPv6, see the “Implementing OSPF for IPv6” chapter in the Cisco IOS IPv6 Configuration Library on Cisco.com.

To configure OSPF routing for IPv6, perform this procedure:

Before you begin

You can customize OSPF for IPv6 for your network. However, the defaults for OSPF in IPv6 are set to meet the requirements of most customers and features.

Follow these guidelines:

  • Be careful when changing the defaults for IPv6 commands. Changing the defaults might adversely affect OSPF for the IPv6 network.

  • Before you enable IPv6 OSPF on an interface, you must enable routing by using the ip routing command in global configuration mode, enable the forwarding of IPv6 packets by using the ipv6 unicast-routing command in global configuration mode, and enable IPv6 on Layer 3 interfaces on which you are enabling IPv6 OSPF.

Procedure

  Command or Action Purpose

Step 1

enable

Example:

Device> enable 

Enables privileged EXEC mode.

Enter your password if prompted.

Step 2

configure terminal

Example:

Device# configure terminal

Enters global configuration mode.

Step 3

ipv6 router ospf process-id

Example:

Device(config)# ipv6 router ospf 21

Enables OSPF router configuration mode for the process. The process ID is the number assigned administratively when enabling the OSPF for IPv6 routing process. It is locally assigned and can be a positive integer from 1 to 65535.

Step 4

area area-id range {ipv6-prefix/prefix length} [advertise | not-advertise] [cost cost]

Example:

Device(config)# area .3 range 2001:0DB8::/32 not-advertise

(Optional) Consolidates and summarizes routes at an area boundary.

  • area-id —Identifier of the area about which routes are to be summarized. It can be specified as either a decimal value or as an IPv6 prefix.

  • ipv6-prefix/prefix length —The destination IPv6 network and a decimal value that shows how many of the high-order contiguous bits of the address comprise the prefix (the network portion of the address). A slash mark (/) must precede the decimal value.

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

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

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

Step 5

maximum paths number-paths

Example:

Device(config)# maximum paths 16

(Optional) Defines the maximum number of equal-cost routes to the same destination that IPv6 OSPF should enter in the routing table. The range is from 1 to 32, and the default is 16 paths.

Step 6

exit

Example:

Device(config-if)# exit

Returns to global configuration mode.

Step 7

interface interface-id

Example:

Device(config)# interface gigabitethernet 1/0/1

Enters interface configuration mode, and specifies the Layer 3 interface to configure.

Step 8

ipv6 ospf process-id area area-id [instance instance-id]

Example:

Device(config-if)# ipv6 ospf 21 area .3

Enables OSPF for IPv6 on the interface.

  • instance instance-id —(Optional) Instance identifier.

Step 9

end

Example:

Device(config-if)# end

Returns to privileged EXEC mode.

Step 10

Use one of the following:

  • show ipv6 ospf [ process-id ] [ area-id ] interface [ interface-id ]
  • show ipv6 ospf [ process-id ] [ area-id ]

Example:

Device# show ipv6 ospf 21 interface gigabitethernet2/0/1

or

Device# show ipv6 ospf 21
  • Displays information about OSPF interfaces.

  • Displays general information about OSPF routing processes.

Step 11

copy running-config startup-config

Example:

Device# copy running-config startup-config

(Optional) Saves your entries in the configuration file.

Configuring OSPF Interfaces

You can use the ip ospf interface configuration commands to modify interface-specific OSPF parameters. You are not required to modify any of these parameters, but some interface parameters (hello interval, dead interval, and authentication key) must be consistent across all routers in an attached network. If you modify these parameters, be sure all routers in the network have compatible values.


Note


The ip ospf interface configuration commands are all optional.


Procedure

  Command or Action Purpose

Step 1

enable

Example:


Device> enable

Enables privileged EXEC mode.

  • Enter your password if prompted.

Step 2

configure terminal

Example:


Device#configure terminal

Enters global configuration mode.

Step 3

interface interface-id

Example:


Device(config)#interface gigabitethernet 1/0/1

Enters interface configuration mode, and specifies the Layer 3 interface to configure.

Step 4

ip ospf cost cost

Example:


Device(config-if)#ip ospf cost 8

(Optional) Explicitly specifies the cost of sending a packet on the interface.

Step 5

ip ospf retransmit-interval seconds

Example:


Device(config-if)#ip ospf transmit-interval 10

(Optional) Specifies the number of seconds between link state advertisement transmissions. The range is 1 to 65535 seconds. The default is 5 seconds.

Step 6

ip ospf transmit-delay seconds

Example:


Device(config-if)#ip ospf transmit-delay 2

(Optional) Sets the estimated number of seconds to wait before sending a link state update packet. The range is 1 to 65535 seconds. The default is 1 second.

Step 7

ip ospf priority number

Example:


Device(config-if)#ip ospf priority 5

(Optional) Sets priority to help find the OSPF designated router for a network. The range is from 0 to 255. The default is 1.

Step 8

ip ospf hello-interval seconds

Example:


Device(config-if)#ip ospf hello-interval 12

(Optional) Sets the number of seconds between hello packets sent on an OSPF interface. The value must be the same for all nodes on a network. The range is 1 to 65535 seconds. The default is 10 seconds.

Step 9

ip ospf dead-interval seconds

Example:


Device(config-if)#ip ospf dead-interval 8

(Optional) Sets the number of seconds after the last device hello packet was seen before its neighbors declare the OSPF router to be down. The value must be the same for all nodes on a network. The range is 1 to 65535 seconds. The default is 4 times the hello interval.

Step 10

ip ospf authentication-key key

Example:


Device(config-if)#ip ospf authentication-key password

(Optional) Assign a password to be used by neighboring OSPF routers. The password can be any string of keyboard-entered characters up to 8 bytes in length. All neighboring routers on the same network must have the same password to exchange OSPF information.

Step 11

ip ospf message digest-key keyid md5 key

Example:


Device(config-if)#ip ospf message digest-key 16 md5 your1pass

(Optional) Enables MDS authentication.

  • keyid —An identifier from 1 to 255.

  • key —An alphanumeric password of up to 16 bytes.

Step 12

ip ospf database-filter all out

Example:


Device(config-if)#ip ospf database-filter all out

(Optional) Block flooding of OSPF LSA packets to the interface. By default, OSPF floods new LSAs over all interfaces in the same area, except the interface on which the LSA arrives.

Step 13

end

Example:


Device(config)#end

Returns to privileged EXEC mode.

Step 14

show ip ospf interface [interface-name]

Example:


Device#show ip ospf interface

Displays OSPF-related interface information.

Step 15

show ip ospf neighbor detail

Example:


Device#show ip ospf neighbor detail

Displays NSF awareness status of neighbor switch. The output matches one of these examples:

  • Options is 0x52

    LLS Options is 0x1 (LR)

    When both of these lines appear, the neighbor switch is NSF aware.

  • Options is 0x42 —This means the neighbor switch is not NSF aware.

Step 16

copy running-config startup-config

Example:


Device#copy running-config startup-config 

(Optional) Saves your entries in the configuration file.

Configuring OSPF Area Parameters

Before you begin


Note


The OSPF area router configuration commands are all optional.


Procedure

  Command or Action Purpose

Step 1

enable

Example:


Device>enable

Enables privileged EXEC mode.

  • Enter your password if prompted.

Step 2

configure terminal

Example:


Device#configure terminal

Enters global configuration mode.

Step 3

router ospf process-id

Example:


Device(config)#router ospf 109

Enables OSPF routing, and enter router configuration mode.

Step 4

area area-id authentication

Example:


Device(config-router)#area 1 authentication

(Optional) Allow password-based protection against unauthorized access to the identified area. The identifier can be either a decimal value or an IP address.

Step 5

area area-id authentication message-digest

Example:


Device(config-router)#area 1 authentication message-digest

(Optional) Enables MD5 authentication on the area.

Step 6

area area-id stub [no-summary]

Example:


Device(config-router)#area 1 stub

(Optional) Define an area as a stub area. The no-summary keyword prevents an ABR from sending summary link advertisements into the stub area.

Step 7

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

Example:


Device(config-router)#area 1 nssa default-information-originate

(Optional) Defines an area as a not-so-stubby-area. Every router within the same area must agree that the area is NSSA. Select one of these keywords:

  • no-redistribution —Select when the router is an NSSA ABR and you want the redistribute command to import routes into normal areas, but not into the NSSA.

  • default-information-originate —Select on an ABR to allow importing type 7 LSAs into the NSSA.

  • no-redistribution —Select to not send summary LSAs into the NSSA.

Step 8

area area-id range address mask

Example:


Device(config-router)#area 1 range 255.240.0.0

(Optional) Specifies an address range for which a single route is advertised. Use this command only with area border routers.

Step 9

end

Example:


Device(config)#end

Returns to privileged EXEC mode.

Step 10

show ip ospf [process-id]

Example:


Device#show ip ospf

Displays information about the OSPF routing process in general or for a specific process ID to verify configuration.

Step 11

show ip ospf [process-id [area-id]] database

Example:


Device#show ip osfp database

Displays lists of information related to the OSPF database for a specific router.

Step 12

copy running-config startup-config

Example:


Device#copy running-config startup-config 

(Optional) Saves your entries in the configuration file.

Configuring Other OSPF Parameters

Procedure

  Command or Action Purpose

Step 1

enable

Example:

Device>enable

Enables privileged EXEC mode.

  • Enter your password if prompted.

Step 2

configure terminal

Example:

Device#configure terminal

Enters global configuration mode.

Step 3

router ospf process-id

Example:


Device(config)#router ospf 10

Enables OSPF routing, and enter router configuration mode.

Step 4

summary-address address mask

Example:


Device(config)#summary-address 10.1.1.1 255.255.255.0

(Optional) Specifies an address and IP subnet mask for redistributed routes so that only one summary route is advertised.

Step 5

area area-id virtual-link router-id [hello-interval seconds] [retransmit-interval seconds] [trans] [[authentication-key key] | message-digest-key keyid md5 key]]

Example:


Device(config)#area 2 virtual-link 192.168.255.1 hello-interval 5

(Optional) Establishes a virtual link and set its parameters.

Step 6

default-information originate [always] [metric metric-value] [metric-type type-value] [route-map map-name]

Example:


Device(config)#default-information originate metric 100 metric-type 1

(Optional) Forces the ASBR to generate a default route into the OSPF routing domain. Parameters are all optional.

Step 7

ip ospf name-lookup

Example:


Device(config)#ip ospf name-lookup

(Optional) Configures DNS name lookup. The default is disabled.

Step 8

ip auto-cost reference-bandwidth ref-bw

Example:


Device(config)#ip auto-cost reference-bandwidth 5

(Optional) Specifies an address range for which a single route will be advertised. Use this command only with area border routers.

Step 9

distance ospf {[inter-area dist1] [inter-area dist2] [external dist3]}

Example:


Device(config)#distance ospf inter-area 150

(Optional) Changes the OSPF distance values. The default distance for each type of route is 110. The range is 1 to 255.

Step 10

passive-interface type number

Example:


Device(config)#passive-interface gigabitethernet 1/0/6

(Optional) Suppresses the sending of hello packets through the specified interface.

Step 11

timers throttle spf spf-delay spf-holdtime spf-wait

Example:


Device(config)#timers throttle spf 200 100 100

(Optional) Configures route calculation timers.

  • spf-delay —Delay between receiving a change to SPF calculation. The range is from 1 to 600000 miliseconds.

  • spf-holdtime —Delay between first and second SPF calculation. The range is from 1 to 600000 in milliseconds.

  • spf-wait —Maximum wait time in milliseconds for SPF calculations. The range is from 1 to 600000 in milliseconds.

Step 12

ospf log-adj-changes

Example:


Device(config)#ospf log-adj-changes

(Optional) Sends syslog message when a neighbor state changes.

Step 13

end

Example:


Device(config)#end

Returns to privileged EXEC mode.

Step 14

show ip ospf [process-id [area-id]] database

Example:


Device#show ip ospf database

Displays lists of information related to the OSPF database for a specific router.

Step 15

copy running-config startup-config

Example:


Device#copy running-config startup-config 

(Optional) Saves your entries in the configuration file.

Changing LSA Group Pacing

Procedure

  Command or Action Purpose

Step 1

enable

Example:


Device>enable

Enables privileged EXEC mode.

  • Enter your password if prompted.

Step 2

configure terminal

Example:


Device#configure terminal

Enters global configuration mode.

Step 3

router ospf process-id

Example:


Device(config)#router ospf 25

Enables OSPF routing, and enter router configuration mode.

Step 4

timers lsa-group-pacing seconds

Example:


Device(config-router)#timers lsa-group-pacing 15

Changes the group pacing of LSAs.

Step 5

end

Example:


Device(config)#end

Returns to privileged EXEC mode.

Step 6

show running-config

Example:


Device#show running-config 

Verifies your entries.

Step 7

copy running-config startup-config

Example:


Device#copy running-config startup-config 

(Optional) Saves your entries in the configuration file.

Configuring a Loopback Interface

Procedure

  Command or Action Purpose

Step 1

enable

Example:


Device>enable

Enables privileged EXEC mode.

  • Enter your password if prompted.

Step 2

configure terminal

Example:


Device#configure terminal

Enters global configuration mode.

Step 3

interface loopback 0

Example:


Device(config)#interface loopback 0

Creates a loopback interface, and enter interface configuration mode.

Step 4

ip address address mask

Example:


Device(config-if)#ip address 10.1.1.5 255.255.240.0

Assign an IP address to this interface.

Step 5

end

Example:


Device(config)#end

Returns to privileged EXEC mode.

Step 6

show ip interface

Example:


Device#show ip interface

Verifies your entries.

Step 7

copy running-config startup-config

Example:


Device#copy running-config startup-config 

(Optional) Saves your entries in the configuration file.

Monitoring OSPF

You can display specific statistics such as the contents of IP routing tables, caches, and databases.

Table 2. Show IP OSPF Statistics Commands

Command

Purpose

show ip ospf [process-id]

Displays general information about OSPF routing processes.

show ip ospf [process-id] database [router] [link-state-id]

show ip ospf [process-id] database [router] [self-originate]

show ip ospf [process-id] database [router] [adv-router [ip-address]]

show ip ospf [process-id] database [network] [link-state-id]

show ip ospf [process-id] database [summary] [link-state-id]

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

show ip ospf [process-id] database [external] [link-state-id]

show ip ospf [process-id area-id] database [database-summary]

Displays lists of information related to the OSPF database.

show ip ospf border-routes

Displays the internal OSPF routing ABR and ASBR table entries.

show ip ospf interface [interface-name]

Displays OSPF-related interface information.

show ip ospf neighbor [interface-name] [neighbor-id] detail

Displays OSPF interface neighbor information.

show ip ospf virtual-links

Displays OSPF-related virtual links information.

Configuration Examples for OSPF

Example: Configuring Basic OSPF Parameters

This example shows how to configure an OSPF routing process and assign it a process number of 109:


Device(config)#router ospf 109
Device(config-router)#network 131.108.0.0 255.255.255.0 area 24

Feature Information for OSPF

The following table provides release information about the feature or features described in this module. This table lists only the software release that introduced support for a given feature in a given software release train. Unless noted otherwise, subsequent releases of that software release train also support that feature.

Table 3. Feature Information for OSPF

Release

Feature Information

Cisco IOS XE Everest 16.5.1a

This feature was introduced