cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1248
Views
0
Helpful
10
Replies

BGP Prepending

cozyk1515
Level 1
Level 1

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

10 Replies 10

royalblues
Level 10
Level 10

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

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

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

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

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?

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.

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

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

empty 1

empty

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:

Innovations in Cisco Full Stack Observability - A new webinar from Cisco