AS_Path sets apply only to BGP and are used to match the AS_Path attribute of BGP routes. This section describes how to configure AS_Path sets.
If only paragraph editing is used as an example, the corresponding line editing is similar. To use the line editing mode, perform the operations described in paragraph editing.
For detailed set and route-filter configuration steps, see Configuration Procedures of Sets and Route-Filters Using the Paragraph Editing Mode. For details about XPL clauses, see XPL Paragraph Editing Clauses.
Objective |
Configure an AS_Path set to match the routes received from AS 100, the routes that pass through AS 200, and the routes that originate from AS 300. |
Configuration Example |
<HUAWEI> edit xpl as-path-list aaa
xpl as-path-list aaa
regular ^100_,
regular _200_,
regular _300$
end-list
The AS_Path set aaa includes three elements and matches the routes received from AS 100, the routes that pass through AS 200, and the routes that originate from AS 300. |
Objective |
Configure a route-filter to deny the routes received from AS 100, the routes that pass through AS 200, and the routes that originate from AS 300. |
Reference Example |
<HUAWEI> edit xpl route-filter r1 xpl route-filter r1 if as-path in aaa then refuse else approve endif end-filter The route-filter r1 references AS_Path set aaa, denies the routes that match aaa, and permits all other routes. |