apply cost-type
Function
The apply cost-type command sets the action for changing the cost type of routes in a routing policy.
The undo apply cost-type command restores the default setting.
By default, the action for changing the cost type of routes is not set in a routing policy.
Parameters
Parameter | Description | Value |
---|---|---|
external | Sets the cost type of IS-IS external routes. | - |
internal | Sets the cost type of IS-IS internal routes or sets the MED value of BGP routes as the IGP cost of the next hop. | - |
type-1 | Sets Type 1 external routes of OSPF. | - |
type-2 | Sets Type 2 external routes of OSPF. | - |
Usage Guidelines
Usage Scenario
To change the cost type of routes for selecting the optimal route, you can apply a routing policy containing the apply cost-type command.
Prerequisites
The apply cost-type command can be used only after the route-policy command is used.
Precautions
The priority of the apply cost-type clause is higher than that of the apply cost clause, which affects route selection when a routing policy takes effect.
Precautions
Different operations are performed when the apply cost-type internal command is applied to IS-IS routes and BGP routes:
When the apply cost-type internal command is applied to IS-IS routes:
Routes are configured as IS-IS internal routes.
When the apply cost-type internal command is applied to BGP routes:
When a wireless access controller advertises a route learned from an IBGP peer to an EBGP peer, if the apply cost-type internal command is run, the wireless access controller sets the MED value of the route to be advertised to the EBGP peer as the IGP cost of the next hop of the route.