cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
6882
Views
5
Helpful
4
Replies

Meaning of "as-path prepend" after "local-preference"?

news2010a
Level 3
Level 3

Hi, imagine I have a Cat 3750 switch which is connected to RouterB-Internet and RouterC-Internet. In case of failure of RouterB, I want switch to direct traffic (inbound/outbound) from RouterC instead.

Therefore I understand I can use local-preference attribute for this as presented by noble members of this forum.

My question is, I have seen some examples as shown below where "as-path prepend <AS#> is being used after the 'local-preference attribute'.

Can someone clarify what the Autonmous System(AS 100) below means? In which scenario I should use and how can I benefit of such 'as-prepend AS' information after doing my local-preference entry? I read the documentation on this but it is not very clear on how I can take advantage of this in my situation.

(...)

route-map FROM_MYWAN permit 20

match ip address prefix-list MYSITE

set local-preference 115

set as-path prepend 100

(...)

2 Accepted Solutions

Accepted Solutions

Richard Burts
Hall of Fame
Hall of Fame

Marlon

I believe that the first thing to understand here is that local-preference and path prepend are achieving different functions. local-preference influences route we receive from our neighbor and therefore influences how we will send traffic out. path prepend influences what we advertise to our neighbors and therefore influences how the Internet sends to us. So local-preference controls how we send and path prepend controls how we receive.

The other part of your question was what does AS 100 mean. AS 100 would be your AS number. In normal operation you put your AS number into the outgoing advertisement once. With path prepend you put your AS number into the path more than once. The effect of path prepend is to make the AS path longer and therefore less desirable.

The use of path prepend does not have much to do with failover but has to do with having a preferred path and a backup path during normal operation. When there is a failure of one of the external BGP neighbors you should get failover and it does not matter whether you are doing path prepend or not.

HTH

Rick

HTH

Rick

View solution in original post

bjornarsb
Level 4
Level 4

Hi,

In Best Path Algorithm

local pref is number 2 and as-path is number 4.

See this link:

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

As the name indicates local preference is an attribute that routers exchange in the same AS.

As-path on the other hand is "global" i.e kept on ebgp sessions.

So if you have a multimomed environment with 2 isp and your own IP scope (PI) as-prepend is more usefull to get redundans.

Local pref is used when you are multihomed but use the same ISP at both exit points.

Hope this was clarifying :)

Check the scroll-bar at the bottom right :)

BR,

Bjornarsb

View solution in original post

4 Replies 4

Richard Burts
Hall of Fame
Hall of Fame

Marlon

I believe that the first thing to understand here is that local-preference and path prepend are achieving different functions. local-preference influences route we receive from our neighbor and therefore influences how we will send traffic out. path prepend influences what we advertise to our neighbors and therefore influences how the Internet sends to us. So local-preference controls how we send and path prepend controls how we receive.

The other part of your question was what does AS 100 mean. AS 100 would be your AS number. In normal operation you put your AS number into the outgoing advertisement once. With path prepend you put your AS number into the path more than once. The effect of path prepend is to make the AS path longer and therefore less desirable.

The use of path prepend does not have much to do with failover but has to do with having a preferred path and a backup path during normal operation. When there is a failure of one of the external BGP neighbors you should get failover and it does not matter whether you are doing path prepend or not.

HTH

Rick

HTH

Rick

Guys, you are the best! Thanks.

hello Richard Burts

Please can you give me example with small lab . i am getting more confuse between Local Preferene Vs As-Path Vs Med .

Please share

bjornarsb
Level 4
Level 4

Hi,

In Best Path Algorithm

local pref is number 2 and as-path is number 4.

See this link:

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

As the name indicates local preference is an attribute that routers exchange in the same AS.

As-path on the other hand is "global" i.e kept on ebgp sessions.

So if you have a multimomed environment with 2 isp and your own IP scope (PI) as-prepend is more usefull to get redundans.

Local pref is used when you are multihomed but use the same ISP at both exit points.

Hope this was clarifying :)

Check the scroll-bar at the bottom right :)

BR,

Bjornarsb

Review Cisco Networking products for a $25 gift card