beautypg.com

Using regular expressions – Brocade TurboIron 24X Series Configuration Guide User Manual

Page 739

background image

Brocade TurboIron 24X Series Configuration Guide

705

53-1003053-01

Filtering

The seq parameter is optional and specifies the AS-path list sequence number. You
can configure up to 199 entries in an AS-path list. If you do not specify a sequence number, the
software numbers them in increments of 5, beginning with number 5. The software interprets the
entries in an AS-path list in numerical order, beginning with the lowest sequence number.

The deny | permit parameter specifies the action the software takes if a route AS-path list matches
a match statement in this ACL. To configure the AS-path match statements in a route map, use the
match as-path command. Refer to

“Matching based on AS-path ACL”

on page 714.

The parameter specifies the AS path information you want to permit or deny
to routes that match any of the match statements within the ACL. You can enter a specific AS
number or use a regular expression. For the regular expression syntax, refer to

“Using regular

expressions”

on page 705.

The neighbor command uses the filter-list parameter to apply the AS-path ACL to the neighbor.
Refer to

“Adding BGP4 neighbors”

on page 671.

Using regular expressions

You use a regular expression for the parameter to specify a single character or multiple
characters as a filter pattern. If the AS-path matches the pattern specified in the regular
expression, the filter evaluation is true; otherwise, the evaluation is false.

In addition, you can include special characters that influence the way the software matches the
AS-path against the filter value.

To filter on a specific single-character value, enter the character for the parameter. For
example, to filter on AS-paths that contain the letter “z”, enter the following command.

TurboIron(config-bgp-router)#as-path-filter 1 permit z

To filter on a string of multiple characters, enter the characters in brackets. For example, to filter on
AS-paths that contain “x”, “y”, or “z”, enter the following command.

TurboIron(config-bgp-router)#as-path-filter 1 permit [xyz

]

Special characters
When you enter as single-character expression or a list of characters, you also can use the
following special characters.

Table 103

on page 705 lists the special characters. The description

for each special character includes an example. Notice that you place some special characters in
front of the characters they control but you place other special characters after the characters they
control. In each case, the examples show where to place the special character.

TABLE 103

BGP4 special characters for regular expressions

Character

Operation

.

The period matches on any single character, including a blank space. For example, the
following regular expression matches for “aa”, “ab”, “ac”, and so on, but not just “a”.
a.

*

The asterisk matches on zero or more sequences of a pattern. For example, the following
regular expression matches on an AS-path that contains the string “1111” followed by any
value:
1111*