BGP Local-pref

Unanswered Question
May 29th, 2007


I am trying to change the local prefrence of my prefix advertising to my ISP AS100 to 150.when I check on my router it showing me LF150 on default route which I am recieving from ISP, instead of on my prefix ,is this is correct or my config below is incorrect?router bgp 200

no synchronization

bgp log-neighbor-changes

network mask

neighbor remote-as 100

neighbor route-map LOCAL_PREF in

no auto-summary


ip classless

ip route Null0

ip http server


ip as-path access-list 10 permit ^$


ip access-list standard PREF



route-map LOCAL_PREF permit 10

match ip address name PREF

set local-preference 150


route-map LOCAL_PREF permit 20



3750#sh ip bgp

BGP table version is 3, local router ID is

Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,

r RIB-failure, S Stale

Origin codes: i - IGP, e - EGP, ? - incomplete

Network Next Hop Metric LocPrf Weight Path

*> 0 150 0 100 i

*> 0 32768 i


I have this problem too.
0 votes
  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 5 (1 ratings)
Richard Burts Tue, 05/29/2007 - 08:39


The IOS is doing exactly what you have asked it to do: it is assigning local pref of 150 to routes received from that neighbor. Note that the route map which is assigning local pref is assigned as "in" which is routes that you receive from the neighbor. An "out" route map would control what you advertise TO the neighbor.

Unfortunately you can not do what you apparently want to do: you can not set the local preference on routes that you advertise to your external neighbor. Local preference is used in deciding which routes that you have learned are the routes that you will prefer to use. Local pref is set by the router that is receiving the routes and can not be set on routes that you are sending to an external neighbor.



mohammedrafiq Tue, 05/29/2007 - 08:47

Hi Rick,

is this mean, if I advertise the same prefix to my 2nd ISP with LF of 100, then outbound traffic will be taking the path through my 1st ISP with LF150?


Richard Burts Tue, 05/29/2007 - 09:04


When you say LF is that supposed to be local preference?

Perhaps you did not understand my first post: you do not advertise local preference to external peers.

Let me try to explain it slightly differently: Local preference is assigned by you to routes that you learn from neighbors. Local preference will help to control how you send outbound traffic.

What you advertise to external neighbors will control how traffic is sent to you (your inbound traffic). The neighbor may assign local preference to your routes, but they do the assignment and you do not advertise local preference to them.

So remember this: routes that you learn from a neighbor will control how you send outbound traffic. Routes that you advertise to an neighbor will help to control inbound traffic.



Richard Burts Wed, 05/30/2007 - 03:32


I am glad that my explanation was helpful. The forum is a very useful place to ask questions and to clarify concepts. I encourage you to continue your participation in the forum.




This Discussion