Administrator Guide

Allowing an AS Number to Appear in its Own AS Path
This command allows you to set the number of times a particular AS number can occur in the AS path.
The allow-as feature permits a BGP speaker to allow the ASN to be present for a specified number of times in the update
received from the peer, even if that ASN matches its own. The AS-PATH loop is detected if the local ASN is present more than
the specified number of times in the command.
Allow this neighbor ID to use the AS path the specified number of times.
CONFIG-ROUTER-BGP mode
neighbor {IP address | peer-group-name} allowas-in number
Peer Group Name: 16 characters.
Number: 1 through 10.
Format: IP Address: A.B.C.D.
You must Configure Peer Groups before assigning it to an AS.
The lines shown in bold are the number of times ASN 65123 can appear in the AS path (allowsin 9).
To disable this feature, use the no neighbor allow-as in number command in CONFIGURATION ROUTER BGP mode.
R2(conf-router_bgp)#show conf
!
router bgp 65123
bgp router-id 192.168.10.2
network 10.10.21.0/24
network 10.10.32.0/24
network 100.10.92.0/24
network 192.168.10.0/24
bgp four-octet-as-support
neighbor 10.10.21.1 remote-as 65123
neighbor 10.10.21.1 filter-list Laura in
neighbor 10.10.21.1 no shutdown
neighbor 10.10.32.3 remote-as 65123
neighbor 10.10.32.3 no shutdown
neighbor 100.10.92.9 remote-as 65192
neighbor 100.10.92.9 local-as 6500
neighbor 100.10.92.9 no shutdown
neighbor 192.168.10.1 remote-as 65123
neighbor 192.168.10.1 update-source Loopback 0
neighbor 192.168.10.1 no shutdown
neighbor 192.168.12.2 remote-as 65123
neighbor 192.168.12.2 allowas-in 9
neighbor 192.168.12.2 update-source Loopback 0
neighbor 192.168.12.2 no shutdown
R2(conf-router_bgp)#R2(conf-router_bgp)#
Filtering on an AS-Path Attribute
You can use the BGP attribute, AS_PATH, to manipulate routing policies.
The AS_PATH attribute contains a sequence of AS numbers representing the routes path. As the route traverses an AS, the
ASN is prepended to the route. You can manipulate routes based on their AS_PATH to affect interdomain routing. By identifying
certain ASN in the AS_PATH, you can permit or deny routes based on the number in its AS_PATH.
AS-PATH ACLs use regular expressions to search AS_PATH values. AS-PATH ACLs have an implicit deny. This means that
routes that do not meet a deny or match filter are dropped.
To configure an AS-PATH ACL to filter a specific AS_PATH value, use these commands in the following sequence.
1. Assign a name to a AS-PATH ACL and enter AS-PATH ACL mode.
CONFIGURATION mode
ip as-path access-list as-path-name
2. Enter the parameter to match BGP AS-PATH for filtering.
CONFIG-AS-PATH mode
190
Border Gateway Protocol IPv4 (BGPv4)