BGP Path Attributes – Weight

bgp-path-attribute-weight-ipcisco

BGP Path Attributes – Weight

Weight Attribute is a Cisco proprietary BGP Path Attribute that is the first step in the BGP Best Path Selection Algorithm. In Cisco devices, BGP firstly check the Weight Attribute value and prefer the Highest Weight Attribute value. Then BGP Best Path selection continues with Local Preference and so on. If the device is not Cisco, BGP Weight Attribute is not important for you. You will start directly with Local Preference Attribute. value to select the BGP Best Path in all other vendor products.

During BGP Weight Attribute Configuration, different interfaces of the router are assigned different Weight values. The interface with the highest Weight value is selected and the traffic goes through this interface. Weight value is local on a router that it is configured and it does not exchanged between routers.

The highest Weight value is selected always as BGP Best Path or Best Route, if there are multiple routes to the same destination.

Weight value can be between 0 and 65535. By default the learned routes has a Weight value 0. This default value is 32768 for locally injected routes.

BGP Weight Attribute can be assigned in three ways:

• By neighbor command
• By AS-Path Access-Lists
• By Route Maps

Let’s give an example for each of these ways. As a reference topology, we will use the below basic topology:

bgp path attribute, weight
 

BGP Path Attribute, Weight

Think about that, you will assign the Cisco proprietary BGP Path Attribute Weight value 100 towards a neighbour, Weight value 200 towards other neighbour and Weight value 300 towards another neighbour.

By neighbour command, you can assign Weigh Attribute values like below:

RouterA(config)# router bgp 10
RouterA(config-router)# neighbor 10.10.10.10 weight 100
RouterA(config-router)# neighbor 20.20.20.20 weight 200
RouterA(config-router)# neighbor 30.30.30.30 weight 300

Here, the ip addresses is not showed in picture, because this is not our main concentrated point.

By doing this, you are saying to the RouterA that, Best BGP Path is through RouterD. “Go through Router D”.

You can also configure the same properties by using AS-Path Access-Lists. The AS-Path Access-Lists configuration of the same weight configuration is like below:

RouterA(config)# router bgp 10
RouterA(config-router)# neighbour 10.10.10.10 remote-as 10
RouterA(config-router)# neighbour 10.10.10.10 filter-list 1 weight 100
RouterA(config-router)# neighbour 20.20.20.20 remote-as 20
RouterA(config-router)# neighbour 20.20.20.20 filter-list 2 weight 200
RouterA(config-router)# neighbour 30.30.30.30 remote-as 30
RouterA(config-router)# neighbor 30.30.30.30 filter-list 3 weight 300
RouterA(config-router)# exit
RouterA(config)# ip as-path access-list 2 permit ^10$
RouterA(config)# ip as-path access-list 2 permit ^20$
RouterA(config)# ip as-path access-list 3 permit ^30$

We're Sorry!

Full Access is for only IPCisco Crew...

With IPCisco Membership, You Can Access:

• All Certification Courses (Cisco, Juniper, Nokia and Huawei),
• Thousands of Questions (Lesson Quizes and Special Quiz Section),
• Carieer Consultancy, CV/Resume Check, Career Advice Meeting,
• Cheat Sheets, Job Interview Trainings, Network Tools,
You will be Member of a Big IPCisco Community,
You will Learn Network Lessons with Always,
New And Different Learning Styles!
We are waiting for you!

Lesson tags: BGP, path attributes, weight
Back to: CCNP Route > BGP

Comments are closed.




CCNP Route