Refer to the exhibit.
Which AS paths are matched by this access list?
A.
The origin AS 64496 only
B.
The origin AS 64496 and any ASs after AS 64496
C.
The directly attached AS 64496 and any ASs directly attached to AS 64496
D.
The directly attached AS 64496 and any longer AS paths
If you want AS 1 to get networks originated from AS 4 and all directly attached ASs of AS 4, apply
the following inbound filter on Router 1.
ip as-path access-list 1 permit ^4_[0-9]*$ router bgp 1 neighbor 4.4.4.4 remote-as 4 neighbor
4.4.4.4 route-map foo in route-map foo permit 10 match as-path 1
In the ip as-path access-list command, the carat (^) starts the input string and designates “AS”.
The underscore (_) means there is a a null string in the string that follows “AS 4”. The [0-9]*
specifies that any connected AS with a valid AS number can pass the filter. The advantage of
using the [0-9]* syntax is that it gives you the flexibility to add any number of ASs without
modifying this command string.
Reference: http://www.cisco.com/c/en/us/support/docs/ip/border-gateway-protocol-bgp/13754-26.html