# How to Configure BGP Local Preference Attribute

**URL:** <https://forum.networklessons.com/t/how-to-configure-bgp-local-preference-attribute/953>\
**Category:** Lessons Discussion\
**Created:** [December 24, 2016, 6:34pm UTC](https://forum.networklessons.com/t/how-to-configure-bgp-local-preference-attribute/953 "2016-12-24T18:34:24Z")\
**Posts on this page:** 3\
**Page:** 8

<div class="post-metadata">

**Author:** ![lagapidis](https://cdn-forum.networklessons.com/user_avatar/forum.networklessons.com/lagapidis/32/4949_2.png) [@lagapidis](https://forum.networklessons.com/u/lagapidis)\
**Post date:** [February 19, 2025, 8:04am UTC](https://forum.networklessons.com/t/how-to-configure-bgp-local-preference-attribute/953/145 "2025-02-19T08:04:26Z")

</div>

Hello Daniel

Indeed it is the `next-hop-self` feature that makes the difference in your specific problem. To learn why, and to learn more about this feature, take a look at this lesson:

> **[BGP Next Hop Self](https://networklessons.com/bgp/bgp-next-hop-self)**
>
> When you advertise something in iBGP then the next hop IP address doesn't change. We can change this with the next-hop-self command.

If you have further questions, please let us know!

I hope this has been helpful!

Laz

---

<div class="post-metadata">

**Author:** ![jorgemtz16](https://cdn-forum.networklessons.com/letter_avatar_proxy/v4/letter/j/3ab097/32.png) [@jorgemtz16](https://forum.networklessons.com/u/jorgemtz16)\
**Post date:** [August 15, 2025, 7:57pm UTC](https://forum.networklessons.com/t/how-to-configure-bgp-local-preference-attribute/953/146 "2025-08-15T19:57:11Z")

</div>

This is interesting. How is it that we have the same result by either:

- Sending the LP route-map in the “out” direction via the “neighbor” command to our iBGP neighbor, or
- Using the “in” direction from the eBGP neighbor direction.

Thank you

---

<div class="post-metadata">

**Author:** ![lagapidis](https://cdn-forum.networklessons.com/user_avatar/forum.networklessons.com/lagapidis/32/4949_2.png) [@lagapidis](https://forum.networklessons.com/u/lagapidis)\
**Post date:** [August 16, 2025, 7:13am UTC](https://forum.networklessons.com/t/how-to-configure-bgp-local-preference-attribute/953/147 "2025-08-16T07:13:55Z")

</div>

Hell Jorge

The key here is **where** the route map is applied, and in **which direction**. Remember, these route maps act upon BGP UPDATEs, and not on actual traffic. The direction has to do with [the direction that the BGP UPDATE is sent in](https://notes.networklessons.com/bgp-attributes-route-map-direction).

In the first case that you mention, we have a route map applied in an outbound direction on an iBGP neighbor command. This will cause the local preference to be modified in the UPDATE before it is sent to its neighbor. This works because local preference is included in updates between iBGP routers. So when the neighbor receives it, the local preference for the route in question is modified. (The original sending router does not have this change in its own BGP table because the change was made only in the BGP UPDATE as it exits the router.) In this scenario, the change is made on one router but impacts the neighbor.

You can also change the local preference in an inbound direction, which is your second scenario. Unlike your previous scenario, this can act upon BGP UPDATEs received from either iBGP or eBGP neighbors. This is because the change is internal to the local router. eBGP peers don’t send a local preference, but a router can modify the attribute on an incoming UPDATE before it processes it for its BGP table. It is never transmitted, but it is applied after receiving the UPDATE.

So you can change the local preference in an UPDATE as it leaves your local router to go to an iBGP neighbor, or you can change it in an UPDATE as it is received on your local router, from either an eBGP or iBGP neighbor, before it is processed and applied to the BGP table.

Which you will use depends on several factors, including which routers you have direct control over. Does that make sense?

I hope this has been helpful!

Laz

[Previous page](https://forum.networklessons.com/t/how-to-configure-bgp-local-preference-attribute/953.md?page=7)
