The default command configures default parameters for OSPF-imported external routes. The parameters include the cost, type (Type 1 or Type 2), tag, and number of imported routes.
The undo default command restores the default setting.
By default, the default cost of the imported external routes is 1; the upper limit of the imported external routes is 2147483647; the type of the imported external routes is Type 2; the default tag value is 1.
default { cost { cost-value | inherit-metric } | limit limit | tag tag | type type } *
undo default { cost | limit | tag | type } *
Parameter | Description | Value |
---|---|---|
cost cost-value | Specifies the default cost of the external routes imported by OSPF. | The value is an integer ranging from 0 to 16777214. By default, it is 1. |
inherit-metric | Indicates that the cost of the imported route is the cost that the route itself carries. If no cost is specified, the default cost set using the default command is used. | - |
limit limit | Specifies the default upper limit of the external routes to be imported within a given period. | The value is an integer ranging from 1 to 2147483647. |
tag tag | Specifies the tag of the external routes. | The value is an integer ranging from 0 to 4294967295. By default, it is 1. |
type type | Specifies the type of the external routes. | The value is an integer ranging from 1 to 2. By
default, it is 2.
|
Usage Scenario
The imported external routes carry various parameters that can change the priorities and next hops of those routes in the OSPF routing table.
By setting default parameters for OSPF-imported external routes, you can change OSPF routing policies.
The route tag is used to identify protocol-related information. For example, it can be used to differentiate AS numbers when OSPF receives BGP routes. It also allows you to apply OSPF routing policies to tagged routes.
Follow-up Procedure
The priority of the default (OSPF) command is the lowest. Thus, ensure that no other commands are configured when configuring this command. Otherwise, this command cannot take effect.
Precautions