Configuring apply clauses

Except for the apply commands used for setting the next hop for IPv4 and IPv6 routes, all apply commands are the same for IPv4 and IPv6 routing.

To configure apply clauses:

Step

Command

Remarks

1. Enter system view.

system-view

N/A

2. Enter routing policy node view.

route-policy route-policy-name { deny | permit } node node-number

N/A

3. Set the AS_PATH attribute for BGP routes.

apply as-path as-number&<1-32> [ replace ]

By default, no AS_PATH attribute is set for BGP routes.

4. Delete the specified COMMUNITY attribute for BGP routes.

apply comm-list { comm-list-number | comm-list-name } delete

By default, no COMMUNITY attribute is deleted for BGP routes.

5. Set the specified COMMUNITY attribute for BGP routes.

apply community { none | additive | { community-number&<1-32> | aa:nn&<1-32> | internet | no-advertise | no-export | no-export-subconfed } * [ additive ] }

By default, no community attribute is set for BGP routes.

6. Set a cost for routes.

apply cost [ + | - ] cost-value

By default, no cost is set for routes.

7. Set a cost type for routes.

apply cost-type { external | internal | type-1 | type-2 }

By default, no cost type is set for routes.

8. Set the extended community attribute for BGP routes.

apply extcommunity { rt route-target }&<1-32> [ additive ]

By default, no extended community attribute is set for BGP routes.

9. Set the next hop for routes.

  • Set the next hop for IPv4 routes:apply ip-address next-hop ip-address [ public | vpn-instance vpn-instance-name ]

  • Set the next hop for IPv6 routes:apply ipv6 next-hop ipv6-address

By default, no next hop is set for IPv4 or IPv6 routes.

The apply ip-address next-hop and apply ipv6 next-hop commands do not apply to redistributed IPv4 and IPv6 routes.

10. Set an IP precedence for matching routes.

apply ip-precedence { value | clear }

By default, no IP precedence is set.

11. Redistribute routes to the specified IS-IS level.

apply isis { level-1 | level-1-2 | level-2 }

By default, routes are not redistributed into the specified IS-IS level.

12. Set a local preference for BGP routes.

apply local-preference preference

By default, no local preference is set for BGP routes.

13. Set MPLS labels.

apply mpls-label

By default, no MPLS label is set.

14. Set the ORIGIN attribute for BGP routes.

apply origin { egp as-number | igp | incomplete }

By default, no ORIGIN attribute is set for BGP routes.

15. Set a preference.

apply preference preference

By default, no preference is set.

16. Set a preferred value for BGP routes.

apply preferred-value preferred-value

By default, no preferred value is set for BGP routes.

17. Set a prefix priority.

apply prefix-priority { critical | high | medium }

By default, no prefix priority is set, which means the prefix priority is low.

18. Set a local QoS ID for matching routes.

apply qos-local-id { local-id-value | clear }

By default, no local QoS ID is set.

19. Set a tag value for IGP routes.

apply tag tag-value

By default, no tag value is set for IGP routes.

20. Set a traffic index for BGP routes.

apply traffic-index { value | clear }

By default, no traffic index is set for BGP routes.

21. Set a backup link for fast reroute (FRR).

  • Set an IPv4 backup link for FRR:apply fast-reroute { backup-interface interface-type interface-number [ backup-nexthop ip-address ] | backup-nexthop ip-address }

  • Set an IPv6 backup link for FRR:apply ipv6 fast-reroute { backup-interface interface-type interface-number [ backup-nexthop ipv6-address ] | backup-nexthop ipv6-address }

By default, no backup link is set for FRR.