cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Bookmark
|
Subscribe
|
915
Views
0
Helpful
0
Replies

BGP - neighbor default-originate route-map matching communities

leon.lejon
Level 1
Level 1

Hello,

 

Does anyone have any experience using the default-originate route-map to a neighbor and having the route-map match a community?

 

I have a design specific requirement to advertise and originate a default route to a specific neighbor only and when a default route exists in the bgp/routing table. I am receiving a couple of default routes on my router, therefore I would like to set a specific metric based on a tag, hence I would like to match a community. Also, in the case of a route not existing in the bgp/routing table, I would not like to advertise anything.

 

I do not want to use the other well known methods to distribute a default route in BGP as this would have an effect on other neighbors.

 

Here is a sample config of what I want to configure, to me it seems like it should work, but I have only checked it on a simulator, and it does not work, so I am not sure if it's because of the simulator. I am in fact receiving the default route tagged as I need it, and in a separate test, if  I match to a prefix list matching the default route, I am able to not advertise if the route is not in the bgp/routing table.

 

ip bgp-community new-format

!

ip community-list 1 permit 1111:2222

ip community-list 2 permit 3333:4444

!

route-map DEFAULT-ORIGINATE-OUT permit 10

 match community 1

 set metric 25

!

route-map DEFAULT-ORIGINATE-OUT permit 20

 match community 2

 set metric 20

!

router bgp 5555

 neighbor 1.1.1.1 default-originate route-map DEFAULT-ORIGINATE-OUT 

 

 

Thank you!

0 Replies 0