96 CHAPTER 5: IP ROUTING PROTOCOL OPERATION
The external type-1 routes refer to imported IGP routes (such as static route and
RIP). Since these routes are more reliable, the calculated cost of the external routes
is the same as the cost of routes within the AS. Also, this route cost and the route
cost of the OSPF itself are comparable. That is, the cost to reach the external route
type 1 equals the cost to reach the corresponding ASBR from the local router plus
the cost to reach the destination address of the route from the ASBR.
The external type-2 routes refer to imported EGP routes. Since these routes have
lower credibility, OSPF assumes that the cost from the ASBR to reach the
destinations beyond the AS is higher than the cost from within the AS to the
ASBR. So in route cost calculation, the cost to reach the external type 2 route
equals the cost to the destination address of the route from the ASBR. If the two
values are equal, then the cost of the router to the corresponding ASBR is
considered.
Perform the following configuration in OSPF view.
By default, OSPF does not import the routing information of other protocols.
The protocol variable specifies a source routing protocol that can be imported,
such as direct, static, RIP, or BGP.
Configuring Parameters for OSPF to Import External Routes
When OSPF imports the routing information discovered by other routing protocols
in the autonomous system, some additional parameters need configuring, such as
the default route cost and the default tag of route distribution. Route ID can be
used to identify the protocol-related information. For example, OSPF can use it to
identify the AS number when receiving BGP.
Perform the following configuration in OSPF view.
Table 43 Configuring OSPF to Import the Routes of Other Protocols
Operation Command
Enable OSPF to import routes of other
protocols
import-route protocol [ cost value | type
value | tag value | route-policy
route-policy-name ]
Disable importing routing information of
other protocols
undo import-route protocol
Table 44 Configuring Parameters for OSPF to Import External Routes
Operation Command
Configure the minimum interval for OSPF to
import the external routes
default interval seconds
Restore the default value of the minimum
interval for OSPF to import the external routes
undo default interval
Configure the upper limit to the routes that
OSPF import each time
default limit routes
Restore the default upper limit to the external
routes that can be imported at a time
undo default limit
Configure the default cost for the OSPF to
import external routes
default cost value
Restore the default cost for the OSPF to
import external routes
undo default cost