12-01-2020 09:09 AM
Hello Community ,
i want to Block Routes distribution in BGP .
1. I have Local AS no. 12345 and i have 2 EBGP peers to this as no. when i receive any routes from peer 123 i dont want that routes should go to peer 321 .
How can i achieve this any docs or suggestions would be helpful
12-01-2020 09:48 AM - edited 12-01-2020 09:53 AM
If what you want to do is make sure you AS does not become a transits AS between 123 and 321 and only want to advertise locally originated routes to both of these ASes, you can add a route filter to only allow the local routes. As these routes are local and therefore have an empty AS Path, the following configuration can be used to achieve your goal.
router bgp 12345
neighbor x.x.x.x remote-as 123
neighbor x.x.x.x filter-list 1 out
neighbor y.y.y.y remote-as 321
neighbor y.y.y.y filter-list 1 out
!
ip as-path access-list 1 permit ^$
Regards,
12-02-2020 09:03 AM
Dear Harold ,
thanks for your Reply and your valuable time ,
i found one more way that i can configure Route-map which match Community no-export and can add that route-map in neighbor in side .
I want to achieve the goal by not allowing some particular routes .
Ex :- from neighbor 123 i receive 10.10.10.0/24,20.20.20.1/24 , i want to advertise 10.10.10.0/24 to another neighbor and block another prefix .
Would be helpful if any ways to do this .
Thanks& Regards ,
Mahender Vyas
12-02-2020 09:14 AM
Hi Mahender,
There is many ways to achieve your goal. If you only have one peering router, the easiest would be to build a prefix list with all the prefixes you want to allow (or deny) from one eBGP to the other.
Regards,
12-01-2020 09:53 AM
Hello,
a simple AS_PATH filter is probably the easiest solution. Let's say your eBGP neighbor with AS 321 has IP address 192.168.32.1, you would configure the below on your AS 12345 router, in order to ensure that only locally originated (and nothing from AS 123) gets advertised:
ip as-path access-list 1 permit ^$
!
neighbor 192.168.32.1 filter-list 1 out
This
Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: