Cisco Support Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Announcements

Welcome to Cisco Support Community. We would love to have your feedback.

For an introduction to the new site, click here. And see here for current known issues.

New Member

BGP question. How to advertise some routes with as-path prepend ans some without/

I am trying to configure a scenario where we are BGP peering with the same provider in two locations, our main location and our DRC.  We want to advertise

10.10.10.0/26 out of our HQ and

10.10.10.128/26 out of our DRC.

At the same time we want to ensure failover by advertising

10.10.10.128/26 out of our HQ with an as-path prepend and

10.10.10.0/26 out of the DRC with an as-path prepend.

How can I make that happen?  I can only choose one route-map for out going advertisements, so if I use a as-path prepend it applies it to all advertisements.

Is there a way to make this possible?

Thanks

Joerg

1 ACCEPTED SOLUTION

Accepted Solutions
Hall of Fame Super Silver

Re: BGP question. How to advertise some routes with as-path pre

Hello Jeorg,

route-maps can be made of multiple blocks each with its own match and set commands so this is the way to go

route-map toISP permit 10

match ip address 10

set as-path-prepend MyAS MYAS

route-map toISP permit 20

match ip asddress 11

! no set action is allowed

even an empty final block can be used

you can use an ACL or a prefix-list for each block

Hope to help

Giuseppe

3 REPLIES
VIP Super Bronze

Re: BGP question. How to advertise some routes with as-path pre

Hello Joerg,

Have a look at this paper for some config examples

https://www.cisco.com/en/US/tech/tk365/technologies_configuration_example09186a00800945bf.shtml#conf5

HTH

Reza

Hall of Fame Super Silver

Re: BGP question. How to advertise some routes with as-path pre

Hello Jeorg,

route-maps can be made of multiple blocks each with its own match and set commands so this is the way to go

route-map toISP permit 10

match ip address 10

set as-path-prepend MyAS MYAS

route-map toISP permit 20

match ip asddress 11

! no set action is allowed

even an empty final block can be used

you can use an ACL or a prefix-list for each block

Hope to help

Giuseppe

New Member

Re: BGP question. How to advertise some routes with as-path pre

Yep.  that works.

Thanks a lot.

Now I need to figure out how to get these kinds of routes injected into either eigrp or ibgp and to retain the weights...

I'll go and play.  Will let you guys know if I need some more pointers.

Thanks

Joerg

435
Views
0
Helpful
3
Replies