R0106-HP MSR Router Series Layer 3 - IP Routing Command Reference(V7)

608
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
apply cost-type
Use apply cost-type to set a cost type for routes.
Use undo apply cost-type to restore the default.
Syntax
apply cost-type { external | internal | type-1 | type-2 }
undo apply cost-type
Default
No cost type is set for routes.
Views
Routing policy node view
Predefined user roles
network-admin
Parameters
external: Sets the cost type to IS-IS external route.
internal: Sets the cost type to IS-IS internal route, or sets the MED value for a matching BGP route to the
IGP metric of the route's next hop.
type-1: Sets the cost type to OSPF Type-1 external route.
type-2: Sets the cost type to OSPF Type-2 external route.
Usage guidelines
For IS-IS, the apply cost-type internal command sets the cost type for a matching IS-IS route to IS-IS
internal route.
For BGP, the apply cost-type internal command sets the MED for a matching BGP route learned from an
IBGP peer to the IGP metric of the route's next hop. The MED is modified before BGP advertises the route
to an EBGP peer.
Examples
# Configure node 10 in permit mode for routing policy policy1 to set the cost type for routes that have a
tag of 8 to IS-IS internal route.
<Sysname> system-view
[Sysname] route-policy policy1 permit node 10
[Sysname-route-policy-policy1-10] if-match tag 8
[Sysname-route-policy-policy1-10] apply cost-type internal