By using BGP filters, you can filter routes to be advertised.
An ACL is a series of sequential rules composed of permit and deny clauses. These rules specify source addresses, destination addresses, or port numbers of packets. ACL rules are used to classify packets. After ACL rules are applied to a router, the router uses the ACL rules to permit or deny packets.
For details on ACL configurations, see the HUAWEI NetEngine 8000 F SeriesRouter Configuration Guide-IP Services.
An ACL can be used as a filtering condition of a route-policy or used in the filter-policy { acl-number | acl-name acl-name } export [ direct | isis process-id | ospf process-id | rip process-id | static ] or peer { group-name | ipv4-address } filter-policy { acl-number | acl-name acl-name } export command.
An IP prefix list is a type of filter used to filter routes based on destination addresses. An IP prefix list is identified by its name. An IP prefix list can be used flexibly to implement accurate filtering. For example, it can be used to filter a route or routes to a network segment. If a large number of routes with different prefixes need to be filtered, configuring an IP prefix list to filter the routes is very complex.
An IP prefix list can be used as a matching rule of a route-policy or used in the filter-policy ip-prefix ip-prefix-name export [ direct | isis process-id | ospf process-id | rip process-id | static ] or peer { group-name | ipv4-address } ip-prefix ip-prefix-name export command.
An AS_Path filter is used to filter BGP routes based on the AS_Path attributes contained in the BGP routes. If you do not want traffic to pass through an AS, configure an AS_Path filter to filter out the traffic carrying the AS number. If the BGP routing table of each device on a network is large, configuring an ACL or an IP prefix list to filter BGP routes is complex and complicates maintenance of new routes.
If the AS_Path information of a summarized route is lost, the AS_Path filter cannot be used to filter the summarized route, but can still be used to filter the specific routes from which the summarized route is derived.
An AS_Path filter can be used as a filtering condition of a route-policy or be used in the peer as-path-filter command.
A BGP community attribute is used to identify a group of routes with the same properties. Routes can be classified through the community attribute, which facilitates route management.
Some AS internal routes may not need to be advertised to any other AS, whereas AS external routes need to be advertised to other ASs. These AS external routes have different prefixes (as a result, an IP prefix list is inapplicable) and may come from different ASs (as a result, an AS_Path filter is inapplicable). You can set a community attribute value for these AS internal routes and another community attribute value for these AS external routes on an ASBR to control and filter these routes.
The Large-Community attribute can completely represent a 2-byte or 4-byte Autonomous System Number (ASN), and has two 4-byte LocalData IDs. The administrator can therefore apply route-policies more flexibly. The Large-Community attribute extends and can be used together with a community attribute.
Similar to a BGP community filter, a BGP extcommunity filter is used to filter private network routes.
A route-policy is used to match routes or route attributes, and to change route attributes when specific conditions are met. As the preceding filters can be used as matching conditions of a route-policy, the route-policy is powerful in functions and can be used flexibly.
Before configuring a conditional BGP route advertisement policy, you need to create an IP address list.