11-19
Ethernet Card Software Feature and Configuration Guide, R7.2
January 2009
Chapter 11 Configuring Networking Protocols
Configuring OSPF
Loopback Interface
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 of 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 loopbac k 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.
Beginning in privileged EXEC mode, follow this procedure to configure a loopback interface:
Use the no interface loopback 0 global configuration command to disable the loopback interface.
Monitoring OSPF
You can display specific statistics such as the contents of IP routing tables, caches, and databases.
Table 11-3 lists some of the privileged EXEC commands for displaying statistics. For more show ip ospf
database privileged EXEC command options and for explanations of fields in the resulting display, refer
to the Cisco IOS IP and IP Routing Command Reference.
Command Purpose
Step 1 Router# configure terminal Enters global configuration mode.
Step 2 Router(config)# interface loopback
0
Creates a loopback interface, and enters interface
configuration mode.
Step 3 Router(config)# ip address
address
mask
Assigns an IP address to this interface.
Step 4 Router(config)# end Returns to privileged EXEC mode.
Step 5 Router# show ip interface Verifies your entries.
Step 6 Router# copy running-config
startup-config
(Optional) Saves your entries in the configuration file.
Table 11-3 Show IP OSPF Statistics Commands
Command Purpose
Router(config)# show ip ospf [
process-id
]Displays general information about OSPF routing
processes.
Router(config)# show ip ospf [
process-id
] database [router]
[
link-state-id
]
Displays lists of information related to the OSPF
database.
Router(config)# show ip ospf border-routes Displays the internal OSPF routing ABR and
ASBR table entries.
Router(config)# show ip ospf interface [
interface-name
]Displays OSPF-related interface information.
Router(config)# show ip ospf neighbor [
interface-name
]
[
neighbor-id
] detail
Displays OSPF interface neighbor information.
Router(config)# show ip ospf virtual-links Displays OSPF-related virtual links information.