Quick Reference Guide
790 PowerConnect B-Series TI24X Configuration Guide
53-1002269-02
Filtering
25
Filtering AS-paths
You can filter updates received from BGP4 neighbors based on the contents of the AS-path list
accompanying the updates. For example, if you want to deny routes that have the AS 4.3.2.1 in the
AS-path from entering the BGP4 route table, you can define a filter to deny such routes.
The Layer 3 Switch provides the following methods for filtering on AS-path information:
• AS-path filters
• AS-path ACLs
NOTE
The Layer 3 Switch cannot actively support AS-path filters and AS-path ACLs at the same time. Use
one method or the other but do not mix methods.
NOTE
Once you define a filter or ACL, the default action for updates that do not match a filter is “deny”. To
change the default action to “permit”, configure the last filter or ACL as “permit any any”.
AS-path filters or AS-path ACLs can be referred to by a BGP neighbor's filter list number as well as
by match statements in a route map.
Defining an AS-path filter
To define AS-path filter 4 to permit AS 2500, enter the following command.
PowerConnect(config-bgp-router)# as-path-filter 4 permit 2500
Syntax: as-path-filter <num> permit | deny <as-path>
The <num> parameter identifies the filter position in the AS-path filter list and can be from 1 – 100.
Thus, the AS-path filter list can contain up to 100 filters. The Layer 3 Switch applies the filters in
numerical order, beginning with the lowest-numbered filter. When a filter match is true, the Layer 3
Switch stops and does not continue applying filters from the list.
NOTE
If the filter is referred to by a route map match statement, the filter is applied in the order in which
the filter is listed in the match statement.
The permit | deny parameter indicates the action the router takes if the filter match is true.
• If you specify permit, the router permits the route into the BGP4 table if the filter match is true.
• If you specify deny, the router denies the route from entering the BGP4 table if the filter match
is true.
The <as-path> parameter indicates the AS-path information. You can enter an exact AS-path string
if you want to filter for a specific value. You also can use regular expressions in the filter string.
Defining an AS-path ACL
To configure an AS-path list that uses ACL 1, enter a command such as the following.
PowerConnect(config)# ip as-path access-list 1 permit 100
PowerConnect(config)# router bgp
PowerConnect(config-bgp-router)# neighbor 10.10.10.1 filter-list 1 in