This section describes how to configure routing policies on a BGP route sender.
The system view is displayed.
To configure a basic ACL:
A basic ACL is created and the view of the basic ACL is displayed.
A rule for the basic ACL is configured.
The system view is displayed.
The node of a routing policy is created, and the view of the routing policy is displayed.
To match an ACL, run the if-match acl { acl-number | acl-name } command.
Only rules of ACLs 2000 to 2999 can be configured as matching rules in the routing policy.
To match an AS_Path list, run the if-match as-path-filter { as-path-filter-number | as-path-filter-name } &<1-16> command.
To match the community attribute list, run the if-match community-filter { basic-comm-filter-num [ whole-match ] | adv-comm-filter-num }* &<1-16> or if-match community-filter comm-filter-name [ whole-match ] command.
To match a route cost, run the if-match cost cost command.
To match an IP prefix list, run the if-match ip-prefix ip-prefix command.
To set an AS_Path attribute, run the apply as-path as-number &<1-128> [ additive ] command.
To set a community attribute, run the apply community { [ community-number | aa:nn ] &<1-32> | internet | no-advertise | no-export | no-export-subconfed } * [ additive ] command.
To set a route cost, run the apply cost { [ + | - ] cost | inherit } command.
You can set one BGP attribute, such as the AS_Path, community attribute, or extended community attribute, for the matched BGP routes as required.
The system view is displayed.
The BGP view is displayed.
The routing policy is applied to the routes that are to be advertised to the peer.
Ensure that BGP peer relationships have been set up before the routing policy is applied.
The community attribute is advertised to the peer.
The configuration is committed.