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
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Easy, flexible multimedia distribution & control

Coming soon!  Ideal for large-scale A/V applications, ATEN's VM3200 Modular Matrix Switch is an all-in-one solution that simplifies video wall integration. Easily customize display layouts to see what you want, how you want it in 4k.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Building small business network 4 119
How to configure AT&T Netgate with Sonicwall Firewall 24 97
What network switches should I use for Fiber WAN project 4 36
Price for Fiber 13 91
There are times where you would like to have access to information that is only available from a different network. This network could be down the hall, or across country. If each of the network sites have access to the internet, you can create a ne…
Security is one of the biggest concerns when moving and migrating your data from your on-premise location to the Public Cloud.  Where is your data? Who can access it? Will it be safe from accidental deletion?  All of these questions and more are imp…
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…

732 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