cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
2937
Views
0
Helpful
3
Replies

BGP filter question

Roel Reyes
Level 1
Level 1

Any help to understand this config, how does the router run the BGP on this sequence of config, correct me if im wrong but the prefix-list "Upstream-1" permits to advertise anything and then the "filter-list 1" permits to advertise routes local to this Router ASN right? is the prefix list necessary?  did i understand the filters correctly? 

neighbor 192.168.1.1 activate
neighbor 192.168.1.1soft-reconfiguration inbound
neighbor 192.168.1.1prefix-list Upstream-1 out
neighbor 192.168.1.1filter-list 10 in
neighbor 192.168.1.1filter-list 1 out

ip prefix-list Upstream-1description Prefix Advertise to Upstream-1 
ip prefix-list Upstream-1 seq 100 permit 0.0.0.0/0 le 32

ip as-path access-list 1 permit ^$
ip as-path access-list 10 permit .*

2 Accepted Solutions

Accepted Solutions

Julio E. Moisa
VIP Alumni
VIP Alumni

Hi Roel,

Yes, you are right.

This line represents = Advertise every prefix to the neighbor 192.168.1.1

neighbor 192.168.1.1prefix-list Upstream-1 out

This line represents = Receive everything from the neighbor 192.168.1.1

neighbor 192.168.1.1filter-list 10 in

This line represents = Advertise everything originated with the local AS

neighbor 192.168.1.1filter-list 1 out

If you are protecting your BGP domain in order to advertise to the neighbor the prefixes originated into the local AS only, the line related to the prefix list could be removed because it could generate issues advertising the prefixes to the neighbor, in few words the BGP will not able to advertise nothing to the neighbor.

Hope it is useful

:-)




>> Marcar como útil o contestado, si la respuesta resolvió la duda, esto ayuda a futuras consultas de otros miembros de la comunidad. <<

View solution in original post

The result of these two filters on outbound advertisement to neighbor 192.168.1.1 is that you will advertise all locally originated routes to the neighbor and you will advertise only locally originated routes to the neighbor.

I would suggest that prefix-list Upstream-1 out is not needed. It does no harm to have it in the config (and the config might seem more complete with it in) but if you remove it the routes advertised to the neighbor would not change.

HTH

Rick

HTH

Rick

View solution in original post

3 Replies 3

Julio E. Moisa
VIP Alumni
VIP Alumni

Hi Roel,

Yes, you are right.

This line represents = Advertise every prefix to the neighbor 192.168.1.1

neighbor 192.168.1.1prefix-list Upstream-1 out

This line represents = Receive everything from the neighbor 192.168.1.1

neighbor 192.168.1.1filter-list 10 in

This line represents = Advertise everything originated with the local AS

neighbor 192.168.1.1filter-list 1 out

If you are protecting your BGP domain in order to advertise to the neighbor the prefixes originated into the local AS only, the line related to the prefix list could be removed because it could generate issues advertising the prefixes to the neighbor, in few words the BGP will not able to advertise nothing to the neighbor.

Hope it is useful

:-)




>> Marcar como útil o contestado, si la respuesta resolvió la duda, esto ayuda a futuras consultas de otros miembros de la comunidad. <<

hi sir, 

But how will the filters work? permit anything first since i got this config "neighbor 192.168.1.1prefix-list Upstream-1 out" 

then 

filter anything other than my local AS routes ? "neighbor 192.168.1.1filter-list 1 out" 

The result of these two filters on outbound advertisement to neighbor 192.168.1.1 is that you will advertise all locally originated routes to the neighbor and you will advertise only locally originated routes to the neighbor.

I would suggest that prefix-list Upstream-1 out is not needed. It does no harm to have it in the config (and the config might seem more complete with it in) but if you remove it the routes advertised to the neighbor would not change.

HTH

Rick

HTH

Rick