beautypg.com

Using regular expressions – Brocade FastIron Ethernet Switch Layer 3 Routing Configuration Guide User Manual

Page 438

background image

The software interprets the entries in an AS-path list in numerical order, beginning with the lowest
sequence number.

The deny and permit parameters specify the action the software takes if the AS-path list for a route
matches a match clause in this ACL. To configure the AS-path match clauses in a route map, use the
match as-path command.

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

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

Using regular expressions

Use a regular expression for the as-path 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.

You can also 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 as-path parameter. For
example, to filter on AS-paths that contain the letter "z", enter the following command:

device(config-bgp-router)# ip as-path access-list acl1 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.

device(config-bgp-router)# ip as-path access-list acl1 permit [xyz]

BGP4 Special characters

When you enter a single-character expression or a list of characters, you also can use the special
characters listed in "Using regular expressions." The description for each character includes an
example. Some special characters must be placed in front of the characters they control and others
must be placed after the characters they control. The examples show where to place the special
character.

BGP4 special characters for regular expressions

TABLE 91

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*

Using regular expressions

438

FastIron Ethernet Switch Layer 3 Routing Configuration Guide

53-1003087-04