Solved

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

Posted on 2011-09-09
7
3,593 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
Zoho SalesIQ

Hassle-free live chat software re-imagined for business growth. 2 users, always free.

 

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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

Suggested Solutions

PRTG Network Monitor lets you monitor your bandwidth usage, so you know who is using up your bandwidth, and what they're using it for.
David Varnum recently wrote up his impressions of PRTG, based on a presentation by my colleague Christian at Tech Field Day at VMworld in Barcelona. Thanks David, for your detailed and honest evaluation!
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…
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…

920 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

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now