- What's New
- Function Overview
- Service Overview
- Billing
- Getting Started
-
User Guide
- Permissions Management
- Enterprise Routers
- Attachments
- Route Tables
- Associations
- Propagations
- Routes
-
Routing Control
-
Route Policies
- Route Policy Overview
- Creating a Route Policy
- Associating a Route Policy with an Enterprise Router
- Changing the Route Policy Associated with an Enterprise Router
- Disassociating a Route Policy from an Enterprise Router
- Modifying a Route Policy
- Viewing a Route Policy
- Deleting a Route Policy
- Adding a Policy Node to a Route Policy
- Modifying a Policy Node in a Route Policy
- Exporting Policy Nodes in a Route Policy
- Viewing a Policy Node in a Route Policy
- Deleting a Policy Node from a Route Policy
-
IP Prefix Lists
- IP Prefix List Overview
- Creating an IP Prefix List
- Modifying the Name of an IP Prefix List
- Viewing an IP Prefix List
- Deleting an IP Prefix List
- Adding a Prefix Rule to an IP Address Prefix List
- Modifying an IP Prefix Rule in an IP Prefix List
- Exporting Prefix Rules in an IP Prefix List
- Viewing a Prefix Rule in an IP Prefix List
- Deleting a Prefix Rule from an IP Prefix List
-
AS_Path Lists
- AS_Path List Overview
- Creating an AS_Path List
- Modifying the Name of an AS_Path List
- Viewing an AS_Path List
- Deleting an AS_Path List
- Adding an AS_Path Filter to an AS_Path List
- Exporting AS_Path Filters in an AS_Path List
- Viewing an AS_Path Filter in an AS_Path List
- Deleting an AS_Path Filter from an AS_Path List
-
Route Policies
- Sharing
- Flow Logs
- Monitoring and Auditing
- Tags
- Quotas
-
Best Practices
- Summary on Enterprise Router Best Practices
- Connecting VPCs Across Regions Using Enterprise Router and Central Network
- Using Enterprise Router to Isolate VPCs in the Same Region
- Using a Third-Party Firewall to Protect VPCs Connected by Enterprise Routers
- Enabling an On-Premises Data Center to Access Service VPCs Using an Enterprise Router and Transit VPC
- Setting Up a Hybrid Cloud Network Using Enterprise Router and Direct Connect Global DC Gateway
-
Setting Up a Hybrid Cloud Network Using Enterprise Router and a Pair of Direct Connect Connections (Global DC Gateway)
- Overview
- Network and Resource Planning
- Process of Setting Up a Hybrid Cloud Network Using Enterprise Router and a Pair of Direct Connect Connections (Global DC Gateway)
- Procedure for Setting Up a Hybrid Cloud Network Using Enterprise Router and a Pair of Direct Connect Connections (Global DC Gateway)
-
Setting Up a Hybrid Cloud Network Using Enterprise Router and a Pair of Active/Standby Direct Connect Connections (Global DC Gateway)
- Overview
- Network and Resource Planning
- Process of Setting Up a Hybrid Cloud Network Using Enterprise Router and a Pair of Active/Standby Direct Connect Connections (Global DC Gateway)
- Procedure for Setting Up a Hybrid Cloud Network Using Enterprise Router and a Pair of Active/Standby Direct Connect Connections (Global DC Gateway)
- Setting Up a Hybrid Cloud Network Using Enterprise Router, VPN, and Direct Connect (Global DC Gateway)
- Setting Up a Hybrid Cloud Network Using Enterprise Router and Direct Connect (Virtual Gateway)
- Setting Up a Hybrid Cloud Network Using Enterprise Router and a Pair of Direct Connect Connections (Virtual Gateway)
- Setting Up a Hybrid Cloud Network Using Enterprise Router, VPN, and Direct Connect (Virtual Gateway)
- Allowing VPCs to Share an EIP to Access the Internet Using Enterprise Router and NAT Gateway
- Using Enterprise Router to Migrate the Network Set Up Through VPC Peering
- Using Enterprise Router to Migrate the Network Set Up Through Direct Connect (Global DC Gateway)
- Using Enterprise Router and Central Network to Migrate the Network Set Up Through a Cloud Connection
- API Reference
- FAQs
-
More Documents
-
User Guide (ME-Abu Dhabi Region)
- Service Overview
- Getting Started
- Enterprise Routers
- Attachments
- Route Tables
- Associations
- Propagations
- Routes
- Sharing
- Flow Logs
- Monitoring
- Interconnecting with CTS
- Permissions Management
- Tags
- Quotas
- FAQ
- Change History
-
User Guide (Ankara Region)
- Service Overview
- Getting Started
- Permissions Management
- Enterprise Routers
- Attachments
- Route Tables
- Associations
- Propagations
- Routes
- Sharing
- Flow Logs
- Monitoring
- Quotas
- FAQ
- Change History
- API Reference (Ankara Region)
-
User Guide (ME-Abu Dhabi Region)
- General Reference
Copied.
AS_Path List Overview
Introduction
An AS_Path list is a collection of filters that are used to filter BGP routes based on AS_Path attributes contained in BGP routes. AS_Path attributes record the number of each AS that BGP routes pass through from the source to the destination in distance-vector order.
If two AS_Paths both can enable communications, the AS_Path with a smaller ASN is preferred because it uses a shorter path.
AS_Path attributes are private attributes of BGP and AS_Path filters take effect only on BGP routes.
Match Rules
An AS_Path attribute can be regarded as a string containing spaces and is used to match routes through a regular expression.
In Figure 1, the ASN of ER-A is 100. If a BGP route from the peer passes through ER-A, the ASN 100 of ER-A is automatically added to the left of AS_Path.
A regular expression is a string that describes a characteristic and verifies whether another string conforms to this characteristic. An AS_Path filter defines an AS_Path regular expression to match AS_Path attributes of BGP routes for filtering BGP routes.
- If a route matches an AS_Path filter with Action set to Allow, the route is allowed. If the AS_Path filter has Action set to Deny, the route is denied.
- If a route does not match any AS_Path filter in an AS_Path list, the route is denied.
An AS_Path list filters routes by sequential match, unique match, or deny by default.
- Sequential match: An AS_Path filter with a smaller number is matched first. AS_Path filters in an AS_Path list can be sorted by sequence number in different orders, leading to different filtering results.
- Unique match: If a route matches an AS_Path filter, it no longer tries to match other AS_Path filters.
- Deny by default: By default, routes that do not match any AS_Path filter in an AS_Path list are denied. If an AS_Path list has one or more deny filters, you need to create an AS_Path filter to allow all other routes.
AS_Path Regular Expressions
An AS_Path filter is essentially a regular expression. The content of a regular expression is complex. The following describes the AS_Path filter.
An AS_Path filter uses a regular expression to define matching rules. A regular expression consists of the following parts:
- Metacharacter: defines matching rules.
- General character: defines match objects.
Table 1 lists the metacharacters supported by BGP AS_Path regular expressions.
Metacharacter |
Description |
Example |
---|---|---|
. |
Matches AS_Paths with any single character except "\n", including spaces. |
.* matches any AS_Path or route. If an AS_Path list has one or more deny filters, you need to create an AS_Path filter to allow all other routes. |
* |
Matches AS_Paths with 0 or more sequences of the character before the asterisk "*". |
See the preceding example. |
+ |
Matches AS_Paths with 1 or more sequences of the character before the plus sign "+". |
65+ matches AS_Paths that begin with 6 and include one 5 or consecutive 5.
|
| |
Matches any AS_Path with characters on either side of the vertical bar "|". |
100|65002|65003 matches 100, 65002, or 65003.
AS_Path examples that 100|65002|65003 matches:
|
^ |
Matches AS_Paths beginning with the characters that follow the caret "^". |
^65 matches AS_Paths beginning with 65.
|
$ |
Matches AS_Paths ending with the characters before the dollar sign "$". |
65$ matches AS_Paths ending with 65.
^$ matches null character strings (null AS_Path) and can be used to match the locally originated routes. |
( ) |
Defines a subexpression. Both the expression and the subexpression must match. |
100(200)+ matches AS_Paths that begin with 100 and include one 200 or consecutive 200.
AS_Path examples that 100(200)+ matches:
|
[ ] |
Matches AS_Paths with any character in the brackets "[ ]". |
The characters in the brackets "[ ]" can only be numbers 0 to 9. To match AS_Paths within the range of 735 to 907, use (73[5-9]|7[4-9][0-9]|8[0-9][0-9]|90[0-7]). |
[^ ] |
Matches AS_Paths without any character within the range specified in the brackets "[ ]". |
|
_ |
Matches AS_Paths with a sign, such as a comma ",", left brace "{", right brace "}", left parenthesis "(", right parenthesis ")", or space. An underscore "_" can be used at the beginning of a regular expression with the same function as the caret "^" or at the end of a regular expression with the same function as the dollar sign "$". |
|
\ |
Indicates an escape character. |
A backslash "\" is used to disable special functions of signs in regular expressions, such as the left parenthesis "(" and right parenthesis ")" in an AS_Confed_Sequence, the left bracket "[" and right bracket "]" in an AS_Confed_Set, and the left brace "{" and right brace "}" in an AS_Set.
|
Notes and Constraints
- By default, an account can have up to five AS_Path lists.
- By default, each AS_Path list can have up to 100 AS_Path filters.
- Changing an AS_Path list will also change the associated routes and traffic routing. To reduce the impact on network performance, an AS_Path list can only be changed once within 40 seconds.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot