DGS-6604
ip as-path access-list
CLI Reference Guide
244
ip as-path access-list
Use this command to define a BGP Autonomous System (AS) path access list.
Use the
no
form of this command to disable use of the access list.
ip as-path access-list
ACCESS-LIST-NAME
{permit | deny}
REGEXP
no ip as-path access-list
ACCESS-LIST-NAME
Default
None
Command Mode
Global configuration
Usage Guideline
The named community access list is a filter based on regular expressions. If the
regular expression matches the specified string representing the AS path of the
route, then the
permit
or
deny
condition applies. Use this command to define the
BGP access list globally, use the neighbor filter-list command in the router
configuration mode to apply a specific access list.
Multiple commands can be applied to a list name.
Example
This example shows how to define an AS path access list named “mylist” to deny
access to the neighbor with AS number 65535:
Verify the settings by entering the
show ip as-path access-list
command.
Syntax Description
ACCESS-LIST-NAME
Specifies the name of the access list.
permit
Permits access to matching conditions.
deny
Denies access to matching conditions.
REGEXP
Specifies a regular expression to match the BGP AS paths.
Switch(config)# ip as-path access-list mylist deny ^65535$
Switch(config)# ip as-path access-list mylist permit .*