cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1698
Views
8
Helpful
10
Replies

BGP (Path & Metrics) Question

Mohamed Sobair
Level 7
Level 7

Hi All,

I would like to know how BGP is going to select its best As Path?

also what is the advantage of using metrics value on the route-Map attribute?

Appreciate any feedback,

10 Replies 10

aalhousani
Level 1
Level 1

Hi,

There are Ten BGP Path selection process, I will list them down here:-

Notes: If the ties happen go to the next process.

1) Can the BGP reach the next hop?

2) prefer the highest local pref.

3) prefer the shortest AS path length.

4) prefer the lowest origin value.

5) prefer the lowest MED value.

6) prefre path learned via EBGP over routes leaned via IBGP.

7) prefer paths with the lowest IGP metric.

8) prefer paths with the shortest cluster list length.

9) prefer paths from the peer with lowest RID

10) prefre paths from the peer with the lowest peer ID

Hi

If its a cisco router then it would always prefer the route with the highest weight. so the selection process will be

1 Can the BGP reach the next hop?

2 Prefer the route with the highest weight

3 prefer the highest local pref.

4 prefer the shortest AS path length.

5 prefer the lowest origin value.

6 prefer the lowest MED value.

7 prefre path learned via EBGP over routes leaned via IBGP.

8 prefer paths with the lowest IGP metric.

9 prefer paths with the shortest cluster list length.

10 prefer paths from the peer with lowest RID

HTH

Narayan

Guys,

thanks for the great info,

actually all my concern now about implementing BGP load Sharing in a multihomed environment.

The point is not only Best Path Selection, I am thinking to load balance traffic with 4 upstream providers. We already has the backup/failover feature in the BGP as well as we had it on our sestem.

One selection is to spilitate the Subnets by the attributes (metrics, weight) and the prepending.

Do you have any ideas?

Hi Medo,

You cannot do loadbalancing with BGP, but only load sharing. Just split your subnets and advertise them to ur ISPs adjusting the metrics. Attached is a sample configuration for multihoming to 2 ISPs with splitted subnet.

Router bgp

Network 200.200.200.0 mask 255.255.255.0

Network 200.200.201.0 mask 255.255.255.0

Neighbor remote-as

Neighbor route-map ISP-A-local-routes out

Neighbor route-map ISP-A-Acceptroutes in

Neighbor ebgp-multihop

Neighbor remove-private-as

Neighbor remote-as

Neighbor route-map ISP-B-local-routes out

Neighbor route-map ISP-B-Acceptroutes in

Neighbor remove-private-as

Neighbor ebgp-multihop

access-list 1 permit 200.200.200.0 0.0.0.255

access-list 2 permit 200.200.201.0 0.0.0.255

access-list 3 permit 0.0.0.0

Route-map ISP-A-local-routes permit 10

Match ip address 1

Set as-path prepend

Route-map ISP-A-local-routes permit 20

Match ip address 2

Route-map ISP-B-local-routes permit 10

Match ip address 2

Set as-path prepend

Route-map ISP-B-local-routes permit 20

Match ip address 1

Route-map ISP-A-Acceptroutes permit 20

Match ip address 3

Set Local-preference 300

Route-map ISP-B-Acceptroutes permit 20

Match ip address 3

Set Local-preference 100

route-map browsing-traffic permit 10

match ip address 1

set ip next-hop

interface ethernet 0/1

ip address 100.100.100.1 255.255.255.224

ip policy route-map browsing-traffic

Rate if it does help

Narayan

Hi Narayan,

yes this helps, but one thing I want to add here, I am not going to establish private AS's with the ISP's. Actually in my case we are providing the ISP's Internet links as well as we will be having 4 Bandwidth upstream providers?

Do you get the point? also could the above scenario changes your previous posts??

Appreciate your feedback on this,

Thanks,

The command remove-private-as removes any private AS which could have been learned from your customer before sending them to their upstream. Its just a policy genrally defined to reject the private AS circulation in the ISP cloud.

And since you are going to act as an ISP yourself, you should not use the policy map aplied on the ethernet interface but rather use the above metric manipulation and send them to your downstream neighbors

HTH

Narayan

Hi Narayan,

Appreciate if you could post me another example based on my requirement in order to make sure that I am not mistaken since I already knew what you mean?

Thanks for your prompt action,

it would be great if you could send me a diagram of the connections you wish to do and i would be happy to provide you with the example

Narayan

Hi Narayan,

Sorry for the delay, I was away for some time,

Actually I dont have a diagram but I will explain the scenario bellow:

Here is the new scenario:

ISP's different (AS's) ------ My cloud (AS's) 2 routers running (IBGP) ----- 4 providers (different AS's).

so simply I have 2 routers running IBGP, one of them is directly connected to our providers (4) & the other one is connecting the ISP's .....

Hope you get the point..

Let me know about your ideas,

Thanks in advance.

Review Cisco Networking products for a $25 gift card