PP BGP Load Balancing with JUNOS

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
3
down vote

favorite












So we've got a couple of BGP upstream providers, whom both are providing us with their full internet routing tables.



What we are now wanting to do, is utilize both providers, rather than just one being preferred and the other on standby.



Reading through most of this document from Juniper.



https://www.juniper.net/documentation/en_US/junos/topics/example/bgp-multipath-unequal.html



Which, although talks about Unequal Paths, which some are, and some arent. It refers to only balancing between a set of BGP peers whom use the same ASN.



My question is, how do I apply this, to two different BGP peers from different ASNs?



We have our BGP peers configured in groups, if you're asking.



TIA,
D










share|improve this question

















  • 1




    If you receive full tables from your upstreams, your router should chose a best path for each route so there should be some balance between the uplinks. Per packet loadbalancing over multiple external networks is a bad idea, out of order packets can kill your performance then. It would be useful to share your configurations and describe your topology in more detail.
    – Teun Vink♦
    4 hours ago










  • Ah, yes! Thank you for that. Yes, actually links are some what balanced. I guess I'm probably still thinking as if I was connected only one provider, rather than having two.
    – Unwittingly Simple
    4 hours ago










  • Even with a single provider, it can be a really bad idea.
    – Ron Maupin♦
    24 mins ago














up vote
3
down vote

favorite












So we've got a couple of BGP upstream providers, whom both are providing us with their full internet routing tables.



What we are now wanting to do, is utilize both providers, rather than just one being preferred and the other on standby.



Reading through most of this document from Juniper.



https://www.juniper.net/documentation/en_US/junos/topics/example/bgp-multipath-unequal.html



Which, although talks about Unequal Paths, which some are, and some arent. It refers to only balancing between a set of BGP peers whom use the same ASN.



My question is, how do I apply this, to two different BGP peers from different ASNs?



We have our BGP peers configured in groups, if you're asking.



TIA,
D










share|improve this question

















  • 1




    If you receive full tables from your upstreams, your router should chose a best path for each route so there should be some balance between the uplinks. Per packet loadbalancing over multiple external networks is a bad idea, out of order packets can kill your performance then. It would be useful to share your configurations and describe your topology in more detail.
    – Teun Vink♦
    4 hours ago










  • Ah, yes! Thank you for that. Yes, actually links are some what balanced. I guess I'm probably still thinking as if I was connected only one provider, rather than having two.
    – Unwittingly Simple
    4 hours ago










  • Even with a single provider, it can be a really bad idea.
    – Ron Maupin♦
    24 mins ago












up vote
3
down vote

favorite









up vote
3
down vote

favorite











So we've got a couple of BGP upstream providers, whom both are providing us with their full internet routing tables.



What we are now wanting to do, is utilize both providers, rather than just one being preferred and the other on standby.



Reading through most of this document from Juniper.



https://www.juniper.net/documentation/en_US/junos/topics/example/bgp-multipath-unequal.html



Which, although talks about Unequal Paths, which some are, and some arent. It refers to only balancing between a set of BGP peers whom use the same ASN.



My question is, how do I apply this, to two different BGP peers from different ASNs?



We have our BGP peers configured in groups, if you're asking.



TIA,
D










share|improve this question













So we've got a couple of BGP upstream providers, whom both are providing us with their full internet routing tables.



What we are now wanting to do, is utilize both providers, rather than just one being preferred and the other on standby.



Reading through most of this document from Juniper.



https://www.juniper.net/documentation/en_US/junos/topics/example/bgp-multipath-unequal.html



Which, although talks about Unequal Paths, which some are, and some arent. It refers to only balancing between a set of BGP peers whom use the same ASN.



My question is, how do I apply this, to two different BGP peers from different ASNs?



We have our BGP peers configured in groups, if you're asking.



TIA,
D







bgp load-balancing






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked 4 hours ago









Unwittingly Simple

283




283







  • 1




    If you receive full tables from your upstreams, your router should chose a best path for each route so there should be some balance between the uplinks. Per packet loadbalancing over multiple external networks is a bad idea, out of order packets can kill your performance then. It would be useful to share your configurations and describe your topology in more detail.
    – Teun Vink♦
    4 hours ago










  • Ah, yes! Thank you for that. Yes, actually links are some what balanced. I guess I'm probably still thinking as if I was connected only one provider, rather than having two.
    – Unwittingly Simple
    4 hours ago










  • Even with a single provider, it can be a really bad idea.
    – Ron Maupin♦
    24 mins ago












  • 1




    If you receive full tables from your upstreams, your router should chose a best path for each route so there should be some balance between the uplinks. Per packet loadbalancing over multiple external networks is a bad idea, out of order packets can kill your performance then. It would be useful to share your configurations and describe your topology in more detail.
    – Teun Vink♦
    4 hours ago










  • Ah, yes! Thank you for that. Yes, actually links are some what balanced. I guess I'm probably still thinking as if I was connected only one provider, rather than having two.
    – Unwittingly Simple
    4 hours ago










  • Even with a single provider, it can be a really bad idea.
    – Ron Maupin♦
    24 mins ago







1




1




If you receive full tables from your upstreams, your router should chose a best path for each route so there should be some balance between the uplinks. Per packet loadbalancing over multiple external networks is a bad idea, out of order packets can kill your performance then. It would be useful to share your configurations and describe your topology in more detail.
– Teun Vink♦
4 hours ago




If you receive full tables from your upstreams, your router should chose a best path for each route so there should be some balance between the uplinks. Per packet loadbalancing over multiple external networks is a bad idea, out of order packets can kill your performance then. It would be useful to share your configurations and describe your topology in more detail.
– Teun Vink♦
4 hours ago












Ah, yes! Thank you for that. Yes, actually links are some what balanced. I guess I'm probably still thinking as if I was connected only one provider, rather than having two.
– Unwittingly Simple
4 hours ago




Ah, yes! Thank you for that. Yes, actually links are some what balanced. I guess I'm probably still thinking as if I was connected only one provider, rather than having two.
– Unwittingly Simple
4 hours ago












Even with a single provider, it can be a really bad idea.
– Ron Maupin♦
24 mins ago




Even with a single provider, it can be a really bad idea.
– Ron Maupin♦
24 mins ago










1 Answer
1






active

oldest

votes

















up vote
3
down vote



accepted










Per packet load balancing via upstream networks is a bad idea, performance will suffer from out of order packets (which you will have no control over).



If you want to balance traffic between your upstreams, the smart thing to do is to set local preference on specific prefixes or ASNs you've learned so that traffic to those prefixes is preferred via a specific upstream. This will not be perfect either since it's not a very fine grained method, but it can give you a better balance for outbound traffic between upstreams.



For example, you can prefer traffic to and via AS 1234 and 2345 this way:



 policy-statement transit1-preferred 
from as-path-group PREFERRED-VIA-TRANSIT1;
then
local-preference 220;
accept;



as-path-group PREFERRED-VIA-TRANSIT1
as-path ASN1 ".* 1234 .*";
as-path ASN2 ".* 2345 .*";






share|improve this answer




















    Your Answer







    StackExchange.ready(function()
    var channelOptions =
    tags: "".split(" "),
    id: "496"
    ;
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function()
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled)
    StackExchange.using("snippets", function()
    createEditor();
    );

    else
    createEditor();

    );

    function createEditor()
    StackExchange.prepareEditor(
    heartbeatType: 'answer',
    convertImagesToLinks: false,
    noModals: false,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: null,
    bindNavPrevention: true,
    postfix: "",
    noCode: true, onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    );



    );













     

    draft saved


    draft discarded


















    StackExchange.ready(
    function ()
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fnetworkengineering.stackexchange.com%2fquestions%2f54253%2fpp-bgp-load-balancing-with-junos%23new-answer', 'question_page');

    );

    Post as a guest






























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes








    up vote
    3
    down vote



    accepted










    Per packet load balancing via upstream networks is a bad idea, performance will suffer from out of order packets (which you will have no control over).



    If you want to balance traffic between your upstreams, the smart thing to do is to set local preference on specific prefixes or ASNs you've learned so that traffic to those prefixes is preferred via a specific upstream. This will not be perfect either since it's not a very fine grained method, but it can give you a better balance for outbound traffic between upstreams.



    For example, you can prefer traffic to and via AS 1234 and 2345 this way:



     policy-statement transit1-preferred 
    from as-path-group PREFERRED-VIA-TRANSIT1;
    then
    local-preference 220;
    accept;



    as-path-group PREFERRED-VIA-TRANSIT1
    as-path ASN1 ".* 1234 .*";
    as-path ASN2 ".* 2345 .*";






    share|improve this answer
























      up vote
      3
      down vote



      accepted










      Per packet load balancing via upstream networks is a bad idea, performance will suffer from out of order packets (which you will have no control over).



      If you want to balance traffic between your upstreams, the smart thing to do is to set local preference on specific prefixes or ASNs you've learned so that traffic to those prefixes is preferred via a specific upstream. This will not be perfect either since it's not a very fine grained method, but it can give you a better balance for outbound traffic between upstreams.



      For example, you can prefer traffic to and via AS 1234 and 2345 this way:



       policy-statement transit1-preferred 
      from as-path-group PREFERRED-VIA-TRANSIT1;
      then
      local-preference 220;
      accept;



      as-path-group PREFERRED-VIA-TRANSIT1
      as-path ASN1 ".* 1234 .*";
      as-path ASN2 ".* 2345 .*";






      share|improve this answer






















        up vote
        3
        down vote



        accepted







        up vote
        3
        down vote



        accepted






        Per packet load balancing via upstream networks is a bad idea, performance will suffer from out of order packets (which you will have no control over).



        If you want to balance traffic between your upstreams, the smart thing to do is to set local preference on specific prefixes or ASNs you've learned so that traffic to those prefixes is preferred via a specific upstream. This will not be perfect either since it's not a very fine grained method, but it can give you a better balance for outbound traffic between upstreams.



        For example, you can prefer traffic to and via AS 1234 and 2345 this way:



         policy-statement transit1-preferred 
        from as-path-group PREFERRED-VIA-TRANSIT1;
        then
        local-preference 220;
        accept;



        as-path-group PREFERRED-VIA-TRANSIT1
        as-path ASN1 ".* 1234 .*";
        as-path ASN2 ".* 2345 .*";






        share|improve this answer












        Per packet load balancing via upstream networks is a bad idea, performance will suffer from out of order packets (which you will have no control over).



        If you want to balance traffic between your upstreams, the smart thing to do is to set local preference on specific prefixes or ASNs you've learned so that traffic to those prefixes is preferred via a specific upstream. This will not be perfect either since it's not a very fine grained method, but it can give you a better balance for outbound traffic between upstreams.



        For example, you can prefer traffic to and via AS 1234 and 2345 this way:



         policy-statement transit1-preferred 
        from as-path-group PREFERRED-VIA-TRANSIT1;
        then
        local-preference 220;
        accept;



        as-path-group PREFERRED-VIA-TRANSIT1
        as-path ASN1 ".* 1234 .*";
        as-path ASN2 ".* 2345 .*";







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered 4 hours ago









        Teun Vink♦

        10.3k52551




        10.3k52551



























             

            draft saved


            draft discarded















































             


            draft saved


            draft discarded














            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fnetworkengineering.stackexchange.com%2fquestions%2f54253%2fpp-bgp-load-balancing-with-junos%23new-answer', 'question_page');

            );

            Post as a guest













































































            Comments

            Popular posts from this blog

            Long meetings (6-7 hours a day): Being “babysat” by supervisor

            Is the Concept of Multiple Fantasy Races Scientifically Flawed? [closed]

            Confectionery