Examples
# Configure node 10 in permit mode of routing policy policy1: set a cost of 120 for routing information
whose outbound interface is Vlan-interface 20.
<Sysname> system-view
[Sysname] route-policy policy1 permit node 10
[Sysname-route-policy] if-match interface Vlan-interface 20
[Sysname-route-policy] apply cost 120
apply cost-type
Syntax
apply cost-type { internal | type-1 | type-2 }
undo apply cost-type
View
Routing policy view
Default level
2: System level
Parameters
internal: Sets the MED value for a matching BGP route as the IGP metric to the route's next hop.
type-1: Sets the cost type to Type- 1 external route of OSPF.
type-2: Sets the cost type to Type-2 external route of OSPF.
Description
Use apply cost-type to set a cost type for routing information.
Use undo apply cost-type to remove the clause configuration.
No cost type is set for routing information by default.
Use for BGP, the apply cost-type internal command sets the MED of a matching BGP route learned from
an iBGP peer as the IGP metric to the route's next hop before BGP advertises the route to an eBGP peer.
Examples
# Create node 10 in permit mode of routing policy policy1: If a route has a tag of 8, set the cost type for
the route to OSPF Type- 1 external route.
<Sysname> system-view
[Sysname] route-policy policy1 permit node 10
[Sysname-route-policy] if-match tag 8
[Sysname-route-policy] apply cost-type type-1
apply extcommunity
Syntax
apply extcommunity { { rt route-target }&<1- 1 6> [ additive ] }
undo apply extcommunity
337