11-17
Ethernet Card Software Feature and Configuration Guide, R7.2
January 2009
Chapter 11 Configuring Networking Protocols
Configuring OSPF
Domain Name Server (DNS) names for use in all OSPF show privileged EXEC command displays
make it easier to identify a router than displaying it by r outer 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 de fault,
and bandwidth (bw) is determined 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—This 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 r ating. An administrative
distance of 255 means that the routing information source cannot be trusted at all and should be
ignored. OSPF uses three different administrative distances: routes within an area (intra-area),
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 rep resent 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 iden tify 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. You can also configure
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.
Beginning in privileged EXEC mode, follow this procedure to configure these OSPF parameters:
Command Purpose
Step 1 Router# configure terminal Enters global configuration mode.
Step 2 Router(config)# router ospf
process-id
Enables OSPF routing, and enters router configuration
mode.
Step 3 Router(config)# summary-address
address-mask
(Optional) Specifies an address and IP subnet mask for
redistributed routes so that only one summary route is
advertised.
Step 4 Router(config)# area
area-id
virtual-link
router-id
[hello-interval
seconds
] [retransmit-interval
seconds
]
[trans] {[authentication-key
key
] |
[message-digest-key
key-id
md5
key
]}
(Optional) Establishes a virtual link and set its
parameters. See the “OSPF Interface Parameters”
section on page 11-13 for parameter definitions and
Table 11-2 on page 11-10 for virtual link defaults.
Step 5 Router(config)# default-information
originate [always] [metric
metric-value
] [metric-type
type-value
]
[route-map
map-name
]
(Optional) Forces the ASBR to generate a default route
into the OSPF routing domain. Parameters are all
optional.
Step 6 Router(config)# ip ospf name-lookup (Optional) Configures DNS name lookup. The default
is disabled.
Step 7 Router(config)# ip auto-cost
reference-bandwidth
ref-bw
(Optional) Specifies an address range for which a
single route will be advertised. Use this command only
with area border routers.
Step 8 Router(config)# distance ospf
{[inter-area
dist1
] | [inter-area
dist2
] | [external
dist3
]}
(Optional) Changes the OSPF distance values. The
default distance for each type of route is 110. The range
is 1 to 255.