BGP Prepending

Unanswered Question
Jul 15th, 2008

As an ISP I have 5 BGP sessions, one of my main AS paths is having major issues on a reg basis so I want to change the load to be "stronger" on another path. Is this just a matter of going from below ....

route-map ATT_Test permit 5

match as-path 17

set local-preference 100

To This?

** New

route-map ATT_Test permit 5

match as-path 17

set local-preference 100 100 100 100

I have this problem too.
0 votes
  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 0 (0 ratings)
Loading.
royalblues Tue, 07/15/2008 - 10:40

The set statement should be

set as-path prepend 100 100 100 100

route-map ATT_Test permit 5

match as-path 17

set as-path prepend 100 100 100 100

clear ip bgp

Narayan

cozyk1515 Tue, 07/15/2008 - 10:47

So I need to make sure I take the Local Pref out? set local-preference 100 and change to set as-path prepend?

Thanks

Gabrielle

royalblues Tue, 07/15/2008 - 11:00

It would depend...

Local preference has a higher preference in the BGP best path algorithm. If all the routes are using the default Local pref, the above config would do the trick

If the local preferences are different, then make sure that it is configured to be lesser than on the preferred exit

Narayan

sdoremus33 Tue, 07/15/2008 - 11:29

Exactly accordingto BGP bestpath

Local Pref = 3

AS Path Prepending =4

I beleive, anyway as mentioned befor is the local pref value is equal for both peers that inclusing the AS-Path prepend in the route map

Ex: route map asprepath

set as-path prepend = x.y.z wher it is read as the following is a route traverses say as 100 the 200 the as path under show ip bgp "route" 100-100-200.HTH

cozyk1515 Tue, 07/15/2008 - 11:37

show ip bgp "route" 100-100-200.HTH

I don't get anything with this command or 100-100-100 ? The route that I showed above is the one I was to be prefered path.

However I think I see the issue. I will make changes according.

route-map ATT_Test permit 5

match as-path 17

set local-preference 100

route-map localonly permit 30

match ip address 30

set as-path prepend 32390 32390 32390

Change To

route-map ATT_Test permit 5

match as-path 17

set as-path prepend 7018 7018 7018

route-map localonly permit 30

match ip address 30

set as-path prepend 32390

Does this look alright?

tdrais Tue, 07/15/2008 - 12:03

I think you can only prepend your own as number so you would have to choose 7018 or 32390. Even if you can prepend another I wouldn't do it since this is fundamental to bgp loop prevention.

Your other issue is that local preference was only affecting the outbound traffic and if you apply the prepend inbound it will also only affect outbound traffic. If you really have a issue with a ISP you do not want your return traffic to pass over them either. In this case you can prepend the as-path outbound and it should cause everyone in the internet to not use that ISP... well mostly since you can only do so much.

cozyk1515 Tue, 07/15/2008 - 12:11

I guess I wasn't very clear. I am the ISP - these other AS numbers are ATT and INOC who give us each 2 45 meg pipes. I am trying to shut another BGP session off a different route off due to pricing. In the current

route-map ATT_Test permit 5

match as-path 17

set local-preference 100

and

route-map localonly permit 30

match ip address 30

set as-path prepend 32390 32390 32390

I noticed that the 32390 connection was being having issues because in NYC Quest was having issues about 5 hops in - I want to use more of the ATT connection.

route-map ATT_Test permit 5

match as-path 17

set local-preference 100

Giuseppe Larosa Tue, 07/15/2008 - 13:16

hello Gabrielle,

if you want to use more of ATT use a local preference value greater then 100 that is the default value.

At the same time you can prepend your AS number in advertisements to AS 32390 in order to have that link not used on the return path.

Hope to help

Giuseppe

Actions

This Discussion