?
Solved

How to configure BGP load balancing with two ISPs on juniper MX-80

Posted on 2011-09-09
7
Medium Priority
?
4,194 Views
Last Modified: 2012-05-12
Hello Exchange Experts,
I’m newbie in this community, but I want to see how it works and is it really possible to get help without spending hours for research in Internet  ¿
I’m looking for example of BGP load balancing configuration with two ISPs.
I have Juniper MX-80 router with two upstream providers. I’d like to configure a load balancing and redundancy between two peers.
My BGP configuration is showed below:

ROUTER# show protocols        
bgp {
    group ebgp-to-AS1111 {
        type external;
        description EBGP-to-1111;
        export AS-1111_export;
        peer-as 1111;
        neighbor 1.1.1.1;
    }
    group ebgp-to-AS2222 {
        type external;
        description EBGP-to-2222;
        export AS-2222_export;
        peer-as 2222;
        neighbor 2.2.2.1;
    }
}

Any help would be gratefully appreciated
0
Comment
Question by:itvs
7 Comments
 
LVL 32

Expert Comment

by:harbor235
ID: 36513453

If you are sending to multiple destinations, then by default per prefix lb kicks in

Can you post the output of "show policy-options"?

It may say per packet load balancing but it really means per flow.

 harbor235 ;}
0
 
LVL 16

Expert Comment

by:SteveJ
ID: 36513681
Have you talked with the ISP? Not about the juniper config, but about what you want to do?

Good luck,
SteveJ
0
 

Author Comment

by:itvs
ID: 36515306
Hi guys,
Of course ISPs know about it  and they have all my IP ranges added to  the prefix-list
Below you can see my  “show policy-options” output.
I’m interested in load balancing per packet, but all examples are about multiple connections to one ISP and one AS.
I think the option multipath  +  multiple-as could be used, but also  I couldn’t find any clear example.
If  multiple-as will work  in my case, can you show how it should looks like?
Thanks.
0
A Cyber Security RX to Protect Your Organization

Join us on December 13th for a webinar to learn how medical providers can defend against malware with a cyber security "Rx" that supports a healthy technology adoption plan for every healthcare organization.

 

Author Comment

by:itvs
ID: 36515316
Sorry,
Here it is:
ROUTER# show policy-options
prefix-list ADVERT-2-1111 {
    3.3.3.0/24;
    4.4.4.0/24;
    5.5.5.0/24;
}
prefix-list ADVERT-2-2222 {
    3.3.3.0/24;
    4.4.4.0/24;
    5.5.5.0/24;
}
policy-statement AS-1111_export {
    term 1 {
        from {
            prefix-list ADVERT-2-1111;
        }
        then accept;
    }
    term 2 {
        then reject;
    }
}
policy-statement AS-2222_export {
    term 1 {
        from {
            prefix-list ADVERT-2-2222;
        }
        then accept;
    }                                  
    term 2 {                            
        then reject;                    
    }                                  
}                  
0
 
LVL 24

Expert Comment

by:rfc1180
ID: 36519452
To configure a BGP multipath, include the multipath statement:

multipath {
    multiple-as;
}


Billy
0
 

Author Comment

by:itvs
ID: 36520317
Thanks for comments.
I saw it multiple times on Internet, but I’m looking for real configuration example.
This router is in the production environment has 5 Gbps of traffic and I don’t really want to do experiments on it.
 Do you think that my modified configuration below will work?
Please correct me if you can see anything wrong.

ROUTER# show protocols        
bgp {
    group ebgp-to-AS1111 {
        type external;
        description EBGP-to-1111;
        export AS-1111_export;
        peer-as 1111;
      multipath {
        multiple-as;
      }
        neighbor 1.1.1.1;
    }
    group ebgp-to-AS2222 {
        type external;
        description EBGP-to-2222;
        export AS-2222_export;
        peer-as 2222;
        multipath {
        multiple-as;
      }
      neighbor 2.2.2.1;
    }
}


ROUTER# show routing-options
static {
    route 0.0.0.0/0 next-hop 1.1.1.1;
}
router-id 10.10.10.1;
autonomous-system 3333;

forwarding-table {
    export per-flow-load-balancing;
}



ROUTER# show policy-options
prefix-list ADVERT-2-1111 {
    3.3.3.0/24;
    4.4.4.0/24;
    5.5.5.0/24;
}
prefix-list ADVERT-2-2222 {
    3.3.3.0/24;
    4.4.4.0/24;
    5.5.5.0/24;
}
policy-statement AS-1111_export {
    term 1 {
        from {
            prefix-list ADVERT-2-1111;
        }
        then accept;
    }
    term 2 {
        then reject;
    }
}
policy-statement AS-2222_export {
    term 1 {
        from {
            prefix-list ADVERT-2-2222;
        }
        then accept;
    }                                  
    term 2 {                            
        then reject;                    
    }                                  
}      
policy-statement per-flow-load-balancing {
    term balance;
    then load-balance per-packet;
}


-- Thanks
0
 
LVL 24

Accepted Solution

by:
rfc1180 earned 2000 total points
ID: 36530737
Sorry, been busy with work. Your config looks ok; it is a very simple process to enable what you are seeking. You have the important information:

     multipath {
        multiple-as;

for each of your upstreams

forwarding-table {
    export per-flow-load-balancing;
}

policy-statement per-flow-load-balancing {
    term balance;
    then load-balance per-packet;
}

NOTE, it is really not per-packet, but per flow (I am sure you are aware of this)

Billy
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article explains the fundamentals of industrial networking which ultimately is the backbone network which is providing communications for process devices like robots and other not so interesting stuff.
In this article I will be showing you how to subnet the easiest way possible for IPv4 (Internet Protocol version 4). This article does not cover IPv6. Keep in mind that subnetting requires lots of practice and time.
Viewers will learn how to connect to a wireless network using the network security key. They will also learn how to access the IP address and DNS server for connections that must be done manually. After setting up a router, find the network security…
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…

840 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question