cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
516
Views
0
Helpful
2
Replies

Coverting BGP learnt route to locally originated

yasir.ilyas
Level 1
Level 1

Hi,

 

scenario is  I have few ebgp  learnt  routes  coming  in on one  interface on my router from a provider that i  want  to advertise  back to the same  provider   via other  interface ( for a reason).

so i came  to know searching that it  is  only possible  if  i make  that EBGP  learnt  route a  locally originated  route.

 

i  labbed  it  up what i found  network  command with  matching  mask  does not  work but aggregate  command  does but  I have  to summarize  it. 

 

Question is  it  expected  behavior network  command wont convert a  EBGP  learnt route  to localy orignate?

 

Other do  I have  other  better  option in my  scenario other  than "haveto" summarize those prefixes.

 

 

Thanks

2 Replies 2

willwetherman
Spotlight
Spotlight

Hi,

 

I believe that the issue that you are having is with the BGP loop prevention mechanism whereby if a BGP routers detects its own AS is the AS Path attribute, it will drop the prefix and will not continue to advertise it. In your scenario, when you receive the routes via one interface and send the routes back out to the same provider via the second interface, the provider will drop the routes as they will contain is own AS in the AS path attribute.

  

The behaviour that you are seeing with the BGP network statement is normal and expected as the network statement will only advertise connected, static or IGP routes into BGP and not routes that have already been learnt by BGP.

 

The reason that this works when you use aggregation is because your router generates and advertises the summary with only its local AS in the AS path and suppresses the original route received from the provider. The provider will accept the summary as it doesn't contain is AS in the AS path.

 

The only ways to resolve this that I can think of:

 

1) Generate a local BGP aggregate as you have already successfully attempted

 

2) Configure static routes that match the BGP received routes so that they take precedence in the routing table and then advertise the static routes into BGP using the network statement. 

 

3) Ask the provider to configure their router to accept routes that contain their own AS using the 'neighbor x.x.x.x allowas-in' command (assuming that they are using Cisco gear)

 

Obviously you need to be careful with all of these options so that you dont end up creating a routing loop.

 

I hope that this helps

 

 

The original poster asks this question

Question is  it  expected  behavior network  command wont convert a  EBGP  learnt route  to localy originate?

 

The answer is that yes this is an expected behavior.

 

The purpose of the network command in BGP is not to create a route. The purpose of the network command in BGP is to say that if BGP finds entries in the routing table that match the network statement then BGP can advertise those routes.

 

HTH

 

Rick

HTH

Rick
Getting Started

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:

Review Cisco Networking products for a $25 gift card