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

set as-path prepend last-as doesn't work ?

kschafer
Level 1
Level 1

I'm trying to use this statement on a route-map to an IBGP peer in order to make a particular AS-PATH to appear longer but it doesn't seem to be working.

Here's my route-map, which is applied inbound from the neighbor I want to pad. It seems so logical yet it isn't working.

Any ideas would be welcomed.

= K

route-map Groom_Cogent permit 100

match as-path 174

set as-path prepend last-as 2

!

ip as-path access-list 174 permit ^174_

4 Replies 4

ruwhite
Level 7
Level 7

From looking through the code for CSCdw11721, which added this functionality, it won't work on iBGP peers. I'm not certain why you wouldn't use local pref, or some other mechanism (cost community) to do this anyway? Can you explain your connection setup, and what you are trying to do, a little more?

:-)

Russ.W

I want EBGP routes from a particular IBGP peer to appear longer (by 1 AS hop).

The two routers in question are 2000 miles apart and each one has an EBGP peer. I'd like to avoid some of my cross-country traffic.

To use local-pref I'd have to pick candidate routes to tag, and I don't want to affect my entire local AS with a local-pref. Its just these two particular routers that have a unique relationship.

Being able to pad the last AS onto the end of each route would be perfect. (if it worked)

= K

If you look at the BGP decision process:

http://www.cisco.com/en/US/tech/tk365/tk80/technologies_tech_note09186a0080094431.shtml#bestpath

You'll see that one of the steps is the IGP metric (step 8). So, if all other factors are equal up to the IGP metric, and it sounds like they are, as long as the IGP cost to reach the next hop along one path is shorter in one direction, that direction will be chosen. It seems to me that setting the IGP metrics so the one path is chosen over the other one is the thing to do here, if you don't want to use local pref.

It's also possible to use a cost community within your AS to inject a new "cost" into the decision algorithm.

http://www.cisco.com/en/US/products/sw/iosswrel/ps1829/products_feature_guide09186a00801bbad4.html

The current insertion point is just after the IGP metric, which sounds perfect for what you are doing, if the IGP metrics are all the same.

Hope that helps...

:-)

Russ

I64605-1(config)#route-map prepend-3-times permit 10

I64605-1(config-route-map)#set as-path prepend last-as 3

I applied this route map to a eBGP neighbor with out direction, but the neighbor is not seeing the prepending.

On the other hand

I64605-1(config-route-map)#set as-path prepend 64605 64605 64605

works as expected.

Is there something special with last-as parameter?

last-as does not work in either in or out direction.