How to Configure BGP Weight Attribute

(Rene Molenaar) #1

This topic is to discuss the following lesson:

0 Likes

(system) #2

In AS 2 you have named but nowwhere you have configured jim…you have configured JACK …in the second Diagram consisting of 3 routers you have named them James , jim , john…should i assume jim as Jack?..Excellent explanation by the way …

0 Likes

(system) #3

Thanks Master.

0 Likes

(Hamood R) #4

Rene,
Great lesson however, I have questions if we have two ISPs and we would like to route traffic out through ISP-1. It means we need to set up a higher weight on the ISP-1 peering with us and setup a lower weight on the second ISP-2?
How can we make sure traffic goes out ISP-1 and comes back in using ISP-2?
Thanks

Hamood

0 Likes

(Rene Molenaar) #5

Hi Hamood,

That’s right, you can use weight to select the path but this is only for the local router. If you want to influence your entire AS then you’ll have to use local preference:

To influence how traffic enters our AS we have a couple of methods, the first one is MED:

This is only useful when you are multihomed to a single ISP. These two methods will help if you are multihomed to different ISPs:

Hope this helps!

Rene

0 Likes

(Brian M) #6

Hi Renee,
Great lesson but I would like to make one suggestion. I find it easier to follow when you name routers R1, R2, R3 instead of using name like Jack, Jon, James etc. I find names harder to keep straight in my head. Just my opinion.

Thanks for all the cool Lessons.

0 Likes

(Rene Molenaar) #7

Hi Brian,

I totally agree, this was one of my older articles. Nowadays I always use numbers for devices…R1,R2, SW1,SW2, ASA1, ASA2, etc.

Rene

0 Likes

(Muhammad Arslan U) #8

Dear Rene,

By using Weight, we are telling traffic to go out from our specified local router, but what about the traffic that will come in towards our local router? Will it use that same path i.e. a path with higher weight for our inbound traffic ?

Also explain what attribute should be used for Inbound/Outbound traffic and both.

Thx

0 Likes

(Rene Molenaar) #9

Hi Muhammad,

Weight is only for the local router, for traffic that enters our AS we use MED and for traffic that exits our AS we use local preference. Take a look at these posts:

Rene

0 Likes

(Ajith A) #10

Second picture and configuration given below it seems to have problem with the router naming convention

0 Likes

(Rene Molenaar) #11

Hi Ajith,

I just changed the pictures and names of the routers, it should be correct now.

Rene

0 Likes

(Jie C) #12

Hi Rene,
I have seen some articles regarding to how bgp attributes influence the traffic. There is a table for summary.
For influence the traffic out of the AS we use local preference inbound, is it possible for you to summary which attribute should be inbound and which should be outbound?
I assume the table should be like this? Correct me if I am wrong
attribute inbound(config) influencetraffic
local preference inbound outbound
Med outbound inbound
As prepend outbound inbound
and so on

0 Likes

(Rene Molenaar) #13

Hi Jie,

Let me give you an overview:

  • Local preference: is propagated throughout the local AS so typically used inbound when we receive eBGP prefixes.
  • MED: sent to neighbor ASes so used outbound.
  • AS Path prepend: normally sent to neighbor ASes so used outbound.

Rene

0 Likes

(Zeeshan Y) #14

Hi Rene,

Off topic, I don’t see topic conditional advertisement. Will you be adding this in future?

thanks in advance.

KR
Zeeshan

0 Likes

(Rene Molenaar) #15

Hi Zeeshan,

For sure, I’ll add it to my list.

Rene

0 Likes

(Andrew P) #17

Nicholas,
I don’t think this is possible. By default, Weight has a value of 0. Additionally, it is significant only to the local router. This means that a non-zero weight has to be set explicitly on the router in question, so its a little odd to have Cisco then ignore this value. This is why I suspect this isn’t possible.

It might be possible to write a Route-Map that considers the AS-Path and then assigns a weight based on that, but strictly speaking that isn’t what you are asking since Weight is still determining the best path.

0 Likes

(Venus D) #18

Hi Rene , To influence outgoing route we are using Weight and Local Preference . Aside from the fact that Weight is Cisco proprietary , what else would weight differ to local preference in terms of route propagation within the Autonomous System?

0 Likes

(Andrew P) #19

Venus,
One key difference between Weight and Local Preference is that Weight is only locally significant to the router. This means that its value is not carried within advertisements to any other neighbor. For this reason, it is rarely used in practice.

Local Preference is shared among all other routers within the same AS, so it is much more useful for outbound path selection (you only have to configured once–at the route’s ingress point to your AS).

0 Likes

(William K) #20

Just to be clear, longest path still wins right? I assume this only comes into play if we have two paths to the exact same prefix.

0 Likes

(Rene Molenaar) #21

Hi William,

Weight is the first attribute that is used to determine the best path. Here’s a nice way to remember the attributes, something I found on a blog a long time ago:

“We Love Oranges AS Oranges Mean Pure Refreshment”

W Weight (Highest)
L LOCAL_PREF (Highest)
O Originate (local) routes that are advertise through the “network” command or redistributed from an IGP.
AS AS_PATH (shortest)
O ORIGIN Code (IGP > EGP > Incomplete)
M MED (lowest)
P Paths (External > Internal)
R RID (lowest)

Rene

0 Likes