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
In Best Path Algorithm
local pref is number 2 and as-path is number 4.
See this link:
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 :)
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.