The default command configures the default parameters for importing external routes. The default parameters include the cost, type, tag, and number of imported routes.
The undo default command restores the default setting.
By default, the default cost of the external routes is 1; the type of the imported external routes is Type 2; the default tag value is 1; the upper limit of the imported external routes is 2147483647.
default { cost { cost | inherit-metric } | limit limit | tag tag | type type } *
undo default { cost | limit | tag | type } *
| Parameter | Description | Value |
|---|---|---|
| cost cost | Specifies the default cost of the imported route. |
The value is an integer ranging from 0 to 16777214. |
| inherit-metric | Indicates that the cost of the imported route is the cost carried in the route. If no cost is specified, you can use the default command to set the default cost. |
- |
| 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 route. |
The value is an integer ranging from 0 to 4294967295. By default, it is 1. |
| type type | Specifies the type of the external route. |
The value is an integer ranging from 1 to 2.
By default, it is 2. |
Usage Scenario
Imported external routes carry parameters, which affect the priority and next hops of these routes in the OSPF routing table. By configuring default parameters for imported external routes, you can change OSPF routing.
A route tag is used to identify protocol-related information. For example, it can be used to differentiate AS numbers carried in BGP routes imported by OSPF. You can also apply the route-policy to the routes with tags.
Precautions
You can run one of the following commands to set the cost of the imported route. The following commands are listed in descending priority order.
The default command has the lowest priority among the preceding commands. Therefore, ensure that the other two commands are not configured. Otherwise, this command will not take effect.
The cost configured using the default command does not take effect on the BGP routes imported by PEs.