apply cost

Use apply cost to set a cost for routes.

Use undo apply cost to restore the default.

Syntax

apply cost [ + | - ] cost-value

undo apply cost

Default

No cost is set for routes.

Views

Routing policy node view

Predefined user roles

network-admin

Parameters

+: Increases a cost value.

-: Decreases a cost value.

cost-value: Specifies a cost in the range of 0 to 4294967295.

Examples

# Configure node 10 in permit mode for routing policy policy1 to set a cost of 120 for OSPF external routes.

<Sysname> system-view
[Sysname] route-policy policy1 permit node 10
[Sysname-route-policy-policy1-10] if-match route-type external-type1or2
[Sysname-route-policy-policy1-10] apply cost 120