Solved

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

Posted on 2011-09-09
7
3,515 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
Comment Utility

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
Comment Utility
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
Comment Utility
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
What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

 

Author Comment

by:itvs
Comment Utility
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
Comment Utility
To configure a BGP multipath, include the multipath statement:

multipath {
    multiple-as;
}


Billy
0
 

Author Comment

by:itvs
Comment Utility
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
Comment Utility
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

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
VLAN question 7 42
Cisco switch SVI 17 39
How to use a IP block on cisco 877 3 24
eBGP policy and ACL in interface 7 28
In the world of WAN, QoS is a pretty important topic for most, if not all, networks. Some WAN technologies have QoS mechanisms built in, but others, such as some L2 WAN's, don't have QoS control in the provider cloud.
Getting hacked is no longer a matter or "if you get hacked" — the 2016 cyber threat landscape is now titled "when you get hacked." When it happens — will you be proactive, or reactive?
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…
After creating this article (http://www.experts-exchange.com/articles/23699/Setup-Mikrotik-routers-with-OSPF.html), I decided to make a video (no audio) to show you how to configure the routers and run some trace routes and pings between the 7 sites…

762 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

11 Experts available now in Live!

Get 1:1 Help Now