BGP AS-PATH Filtering Examples

For example, a common use case is to prevent router from becoming a transit router (between ISPs), but ensuring that we will only advertise locally originated prefixes.

MyRouter(config)#ip as-path access-list 10 permit ^$

MyRouter(config-router)#neighbor 10.50.2.2 filter-list 10 out

MyRouter(config-router)#neighbor 10.60.2.2 filter-list 10 outCode language: PHP (php)


Another, example, you can restricts the acceptance of certain prefixes only from specific ASNs.

We will not accept any routes going through ASN 100:

MyRouter(config)#ip as-path access-list 10 deny _100_

MyRouter(config-router)#neighbor 10.50.2.2 filter-list 10 in

MyRouter(config-router)#neighbor 10.60.2.2 filter-list 10 inCode language: CSS (css)

Bilel Ameur

Enthusiastic Network Engineer specializing in Cisco ACI, passionate about solving challenges. A lifelong learner who loves gaining and sharing knowledge. Profile: https://www.linkedin.com/in/bilel-ameur-71116b2b5
0 0 votes
Article Rating
Subscribe
Notify of
guest
0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x