bgp AS prepend or local-preference

Posted on 2011-09-16
Last Modified: 2012-05-12
is there any advantage to using AS prepend over modifying local-preference.  Why would one use one over the other?  I have been using local-preference for incoming bgp routes and wondering if it's worth looking into AS prepend method.

Question by:FREDARCE
  • 3
  • 2
LVL 32

Accepted Solution

harbor235 earned 500 total points
ID: 36554259

AS prepend is used to influence how "your routes" appear on the outside of your AS, hence they effect how traffic flows "TOWARDS" your AS.

Local pref is set on incoming routes received from EBGP neighbors typically, thus local pref effects traffic flow towards external ASs.

The difference is the effects on the direction of the traffic flow, one is inbound the other is outbound,

harbor235 ;|

Author Comment

ID: 36556608
Ok.  but isn't the result the same?  What I don't understand is why you would use one method over the other?

LVL 32

Expert Comment

ID: 36559419

Traffic is bidirectional, BGP allows you to control both directions, in and out of your AS.
One effects inbound the other effects outbound, the result is control over both directions of your traffic flow. changing only one of the two only effects one direction of your traffic flow.

harbor235 ;}

Author Comment

ID: 36569577
Ok.  but can't you use LP and apply it to both in and out?


   neighbor x.x.x.x route-map LP500 ?

in Apply map to incoming routes
out Apply map to outbound routes
LVL 32

Expert Comment

ID: 36570124

local pref and MEDs (outbound metric) are two seperate BGP route attributes and are treated separately
when received by a BGP speaker. So the answer is no you cannot set LP inbound and outbound.

you set LP in a route map like this:

set local-pref 200

you set outbound MEDs like this:

set metric 200

harbor235 ;}

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Set up a small 6 user network 7 48
P2V to esxi Free process -- See ****NOW The QUESTION*** 3 61
How often can a passive RFID be polled? 10 92
Cisco RSTP portfast 3 53
Auditors face some challenges when reviewing router and firewall configurations.  I'm going to discuss a few of them in this article.  My assumption is that there is a device hardening standard in place, which points out the key elements of configur…
This article is focussed on erradicating the confusion with slash notations. This article will help you identify and understand the purpose and use of slash notations. A deep understanding of this will help you identify networks quicker especially w…
After creating this article (, I decided to make a video (no audio) to show you how to configure the routers and run some trace routes and pings between the 7 sites…
After creating this article (, I decided to make a video (no audio) to show you how to configure the routers and run some trace routes and pings between the 7 sites…

867 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

24 Experts available now in Live!

Get 1:1 Help Now