Routing
Highlighted
Routing

BGP Load balance export prefixes

‎09-23-2017 02:37 AM

Hi everyone!

 

I have the following topology:

 

R1 _____ ISP1-R1

  |_______ ISP1-R2

 

I export prefixes to this bgp group of 2 neighbours with the same AS with multipath and load balanced per packet. The upstream is balancing between them but what I really need is to do the same with the downstream; I need to export just the half of prefixes to one neighbor and the othe half to other neighbor.

 

This is possible with policy-statemens? How?

 

Thank you!

5 REPLIES 5
Highlighted
Routing

Re: BGP Load balance export prefixes

‎09-23-2017 03:14 AM

You can almost do anything with the policies in BGP.

 

There are several attributes in BGP which you can manipulate to acheive this task along with exporting half of prefixes to one neighbor and the othe half to other neighbor.

 

BTW are those neighbor ISP-R1 and R2 or other behind R1?

 

Highlighted
Routing

Re: BGP Load balance export prefixes

‎09-23-2017 08:18 AM

singhh

 

Which attributes of BGP can I configure to do that?

 

There's no other router behind R1 and R2. I can reach R1 and R2 directly.

 

Thanks!

 

 

 

Highlighted
Routing

Re: BGP Load balance export prefixes

‎09-23-2017 12:34 PM

Can you share your rough topology? It's not quite clear where do you want to load balance.

 

For Attributes:

a) You can advertised all the routes to both neighbor and then apply a policy in which you advertised higher med for half of the routes to ISP-R1 and for other half to ISP-R2. (In case of EBGP peering)

b) Same you can do with as-path prepend.

c) you can use origin code as well

d) you can also use Local preference in case of IBGP neighborship.

 

 

Highlighted
Routing

Re: BGP Load balance export prefixes

‎09-24-2017 07:48 AM

Hi,

 

I made some changes to attributes and finally get results.

Thanks to your reply I start reading about MED and find the way to accomplish the goal.

 

These are the more significant configurations to this achievement:

 

root@router# show protocols bgp group ebgp_isp1                 
type external;
import from_bgp_isp1;
export to_bgp_isp1;
remove-private all;
peer-as 100;
neighbor 10.100.1.1 {
    metric-out 20;
}
neighbor 10.200.1.1 {
    export some_prefixes_med_10;
}



root@router# show policy-options policy-statement some_prefixes_med_10              
term v4-prefix-metric-10 {
    from {
        route-filter <public_prefix_1> exact;
        route-filter <public_prefix_2> exact;
        route-filter <public_prefix_3> exact;
        route-filter <public_prefix_4> exact;
        route-filter <public_prefix_5> exact;
        route-filter <public_prefix_6> exact;
        route-filter <public_prefix_7> exact;
    }
    then {
        metric 10;
        accept;
    }
}


root@router# show policy-options policy-statement to_bgp_isp1
term v4-prefix {
    from {
        route-filter <public_prefix_1> exact;
        route-filter <public_prefix_2> exact;
        route-filter <public_prefix_3> exact;
        route-filter <public_prefix_4> exact;
        route-filter <public_prefix_5> exact;
        route-filter <public_prefix_6> exact;
        route-filter <public_prefix_7> exact;
        route-filter <public_prefix_8> exact;
        route-filter <public_prefix_9> exact;
        route-filter <public_prefix_10> exact;
        route-filter <public_prefix_11> exact;
    }
    then accept;
}

 

Thanks to everyone.

Guillermo

Highlighted
Routing

Re: BGP Load balance export prefixes

‎09-24-2017 08:42 AM

So, you are able to load balance now.. is it correct?

 

Feedback