Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

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

Posted on 2011-09-09
7
Medium Priority
?
4,088 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
When ransomware hits your clients, what do you do?

MSPs: Endpoint security isn’t enough to prevent ransomware.
As the impact and severity of crypto ransomware attacks has grown, Webroot fought back, not just by building a next-gen endpoint solution capable of preventing ransomware attacks but also by being a thought leader.

 

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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

How to set-up an On Demand, IPSec, Site to SIte, VPN from a Draytek Vigor Router to a Cyberoam UTM Appliance. A concise guide to the settings required on both devices
This article is a collection of issues that people face from time to time and possible solutions to those issues. I hope you enjoy reading it.
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
NetCrunch network monitor is a highly extensive platform for network monitoring and alert generation. In this video you'll see a live demo of NetCrunch with most notable features explained in a walk-through manner. You'll also get to know the philos…
Suggested Courses

636 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