BGP Attributes
Routes learn through BGP has some properties. These properties can be used to determine best route to destination when there are multiple routes to same destination. These properties are attributes.
BGP attributes list
- Weight
- Local Preference
- Multi-exit discriminator
- Origin
- AS_Path
- Next Hop
- Community
Weight
Weight attribute is Cisco defined attribute. It is local to a router. The weight attribute is not advertise to a neighboring router.If the router learns about more than one routes to same destination, the route with the highest weight will be preferred.
Router A is receiving advertisement for Network 172.16.1.0 from router B and C. When router A receives advertisement for network 172.16.1.0 from router B, weight is set to 50. When router A receives advertisement for network 172.16.1.0 from router C, weight is set to 100. Both paths will be in BGP routing table with their respective weight. The route with highest weight will be installed in IP routing table.
Local Preference
Local preference attributes used to prefer exit point from local AS(Autonomous System).Local preference can be propagate through local AS.

AS 100 receiving two advertisement for network 172.16.1.0 from AS200. When router A receives advertisement for network 172.16.1.0 from AS 200, local preference is set to 50 and when router B receives advertisement for network 172.16.1.0 from AS200 , local preference is set to 100. Routers A and B will exchange local preference values. Router B has highest local preference value. Router B will be used as exit point from AS 100 to reach network 172.16.1.0 in AS 200.
When a route advertisement passes through an AS, AS number is prepended to that update.

AS 100 receiving two advertisement for network 172.16.1.0 from AS200. When router A receives advertisement for network 172.16.1.0 from AS 200, local preference is set to 50 and when router B receives advertisement for network 172.16.1.0 from AS200 , local preference is set to 100. Routers A and B will exchange local preference values. Router B has highest local preference value. Router B will be used as exit point from AS 100 to reach network 172.16.1.0 in AS 200.
AS_PATH Attribute
When a route advertisement passes through an AS, AS number is prepended to that update.
An AS_Path attribute is actually a list of AS that a route has passed in order to reach destination.
In the example, RTB advertises network 190.10.0.0. When that update reaches AS 300, RTC will append its own AS number to that update. SO when 190.10.0.0 reaches RTA, it has two AS number attached 200 and 300. For RTA to reach network 190.10.0.0, the path would be AS 300 and AS 200.
BGP Backdoor

In this network diagram RTC and RTA runs ebgp. RTA and RTC runs ebgp. RTA and RTB runs IGP protocol such as IGRP, RIP or EGIRP.
RTA would be getting two routes update for 160.0.0.0 network from RTB and RTC.
RTA will choose ebgp updates because it has less AD value 20 which is less than IGP protocol.
If we want RTA to learn update from RTB we have two option
Increase ebgp distance or
Decrease IGP distance
Instead of modfying cost, we can use BGP backdoor.
BGP backdoor makes IGP rote preferred route.
In this network diagram RTC and RTA runs ebgp. RTA and RTC runs ebgp. RTA and RTB runs IGP protocol such as IGRP, RIP or EGIRP.
RTA would be getting two routes update for 160.0.0.0 network from RTB and RTC.
RTA will choose ebgp updates because it has less AD value 20 which is less than IGP protocol.
If we want RTA to learn update from RTB we have two option
Increase ebgp distance or
Decrease IGP distance
Instead of modfying cost, we can use BGP backdoor.
BGP backdoor makes IGP rote preferred route.
RTA# router eigrp 10 network 150.10.0.0 router bgp 100 neighbor 2.2.2.1 remote-as 300 network 160.10.0.0 backdoor