cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
379
Views
0
Helpful
4
Replies

BGP-EBGP TO EBGP BLOCK

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

4 REPLIES 4
Harold Ritter
Cisco Employee

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,

Harold Ritter
Sr Technical Leader
CCIE 4168 (R&S, SP)
harold@cisco.com
México móvil: +52 1 55 8312 4915
Cisco México
Paseo de la Reforma 222
Piso 19
Cuauhtémoc, Juárez
Ciudad de México, 06600
México

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

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,

Harold Ritter
Sr Technical Leader
CCIE 4168 (R&S, SP)
harold@cisco.com
México móvil: +52 1 55 8312 4915
Cisco México
Paseo de la Reforma 222
Piso 19
Cuauhtémoc, Juárez
Ciudad de México, 06600
México
Georg Pauwen
VIP Expert

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