Solved

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

Posted on 2011-09-09
7
3,841 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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
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!

 

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 500 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

NEW Veeam Agent for Microsoft Windows

Backup and recover physical and cloud-based servers and workstations, as well as endpoint devices that belong to remote users. Avoid downtime and data loss quickly and easily for Windows-based physical or public cloud-based workloads!

Question has a verified solution.

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

If you're not part of the solution, you're part of the problem.   Tips on how to secure IoT devices, even the dumbest ones, so they can't be used as part of a DDoS botnet.  Use PRTG Network Monitor as one of the building blocks, to detect unusual…
For many of us, the  holiday season kindles the natural urge to give back to our friends, family members and communities. While it's easy for friends to notice the impact of such deeds, understanding the contributions of businesses and enterprises i…
Internet Business Fax to Email Made Easy - With  eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, f…
In this video we outline the Physical Segments view of NetCrunch network monitor. By following this brief how-to video, you will be able to learn how NetCrunch visualizes your network, how granular is the information collected, as well as where to f…

726 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