5000 Series Layer 2/3 Managed Data Center Switch CLI Reference Guide
1140
To create an AS-PATH access list, use the
ip as-path access-list
command in Global Configuration
mode. An AS-PATH access list filters BGP routes on the AS-PATH attribute of a BGP route. The AS-
PATH attribute is a list of the autonomous system numbers along the path to the destination. An AS-
PATH access list is an ordered sequence of statements. Each statement specifies a regular expression
and a permit or deny action. If the regular expression matches the AS-PATH of the route expressed as an
ASCII string, the route is considered a match and the statement’s action is taken. An AS-PATH list has an
implicit deny statement at the end. If a path does not match any of the statements in an AS-PATH list, the
action is considered to be deny.
Once you have created an AS-PATH list, you cannot delete an individual statement. If you want to
remove an individual statement, you must delete the AS-PATH list and recreate it without the statement
to be deleted.
Statements are applied in the order in which they are created. New statements are added to the end of
the list. The statement with the first matching regular expression is applied.
D-LINK OS allows configuration of up to 128 AS-PATH access lists, with up to 64 statements each.
To enter the question mark within a regular expression, you must first enter
CTRL-V
to prevent the CLI
from interpreting the question mark as a request for help.
for a listing of AS-PATH list regular expression syntax.
Use the
no
command to delete an AS-PATH access list.
{permit | deny} regexp
no ip as-path access-list as-path-list-number
Parameters
as-path-list-number
A number from 1 to 500 uniquely identifying the list. All AS-PATH
access list commands with the same as-path-list-number are considered
part of the same list.
permit
(Optional) Permit routes whose AS-PATH attribute matches the regular
expression.
deny
(Optional) Deny routes whose AS-PATH attribute matches the regular
expression.
regexp
A regular expression used to match the AS-PATH attribute of a BGP
path where the AS-PATH is treated as an ASCII string.
Table 13: AS-PATH Regular Expression Syntax
Special Character
Symbol
Behavior
asterisk
*
Matches zero or more sequences of the pattern.
brackets
[]
Designates a range of single-character patterns.
caret
^
Matches the beginning of the input string.
dollar sign
$
Matches the end of the input string.
hyphen
–
Separates the end points of a range.
period
.
Matches any single character, including white space.
Содержание 5000 Series
Страница 1: ...Draft 1 2 1 ...
Страница 141: ...5000 Series Layer 2 3 Managed Data Center Switch CLI Reference Guide 135 ...