To set the local-preference of a VPNv4 route with the community attribute being 1000:1 on plane 1 to 100 and set the local-preference of a VPNv4 route with the community attribute being 1000:2 on plane 2 to 200, you need to configure the following policy:
ip community-filter 1 permit 1000:1 ip community-filter 2 permit 1000:2
bgp 65000 ipv4-family vpnv4 policy vpn-target peer 10.10.4.13 enable peer 10.10.4.13 route-policy planechoice importAfter the policy is configured, the VPNv4 routes that do not match the two if-match clauses are discarded.
When configuring the policy, you must check whether a null node needs to be configured. Otherwise, you intend to modify the attributes of routes if the routes meet certain conditions and do not modify the attributes of the routes if the routes do not meet the conditions, but the attributes of routes are modified if the routes meet the conditions and are denied if the routes do not meet the conditions after the configuration. When the route-policy plane choice permit node 30 command is run after the policy is modified, the routes that do not match the two if-match clauses continue to be matched with the next node, and pass the policy on node 30.
Notice: To protect the legitimate rights and interests of you, the community, and third parties, do not release content that may bring legal risks to all parties, including but are not limited to the following:
Politically sensitive content
Content concerning pornography, gambling, and drug abuse
Content that may disclose or infringe upon others ' commercial secrets, intellectual properties, including trade marks, copyrights, and patents, and personal privacy
Do not share your account and password with others. All operations performed using your account will be regarded as your own actions and all consequences arising therefrom will be borne by you. For details, see " User Agreement."