Cisco Support Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Announcements

Welcome to Cisco Support Community. We would love to have your feedback.

For an introduction to the new site, click here. And see here for current known issues.

New Member

BGP and Load sharing

Hi,

I'm still extremely new to BGP protocol. Apparently its the easiest to configure. Problem below.

I have to sites - A and B. Both sites have connections to 2 seperate ISP's we use.

Site A - Connection to both ISP's on same router.

Site B- Connection to both ISP's on seperate routers.

Does this constitute multi or dual homed BGP?

How would I achieve load-sharing / load balancing at both sites? Right now I would like to get it working at Site B.

Any help on this is good.

Thanks in advance.

3 REPLIES
Hall of Fame Super Silver

Re: BGP and Load sharing

Brad

Connection of your AS to at least 2 ISPs is the generally accepted definition of multi homing or dual homing. So yes it appears that you are multi homed or dual homed.

Some clarification would help: when you say that you have 2 sites, are the sites interconnected? Will both sites be in the same AS? (which would mean that your AS would have 4 connections for BGP) or will each site constitute its own AS?

Attempting to load balance with BGP is more complex that it is with interior routing protocols. The first thing to recognize about load sharing with BGP is that you need to find solutions to share outbound traffic and solutions to share inbound traffic (the IGPs take care of both together). And the solutions that take care of outbound traffic are separate and different from the solutions for inbound traffic.

To control your outbound traffic you will be concerned with what the ISP advertises to you (and you use to build your routing table). You will need to mark some routes as preferable via one provider and some routes as preferable via the other provider. At the site where 1 router connects to both ISPs you could use weight to make the distinction. But since weight is local to the individual router in the site where there are 2 routers weight will not do and you will need to configure local preference (and for consistency I would suggest that you use local preference at both).

For controlling inbound traffic we need to start with an understanding of whether you have your own provider independent IP address space or whether you are using provider assigned addresses. Actually provider assigned addresses are easier: if you are using provider assigned addresses, then you would be using NAT (or PAT) to translate the addresses of outbound traffic and so inbound traffic would come back to the router which did the translation of the outbound traffic. If you have your own provider independent address space then to control inbound traffic you need to advertise some part of your address space as more favorable through one provider and some part of your address space as more favorable through the other provider. Configuring prepending on your outbound advertisements is the way to do this.

I know this sounds complicated. Unfortunately it IS complicated to multihome (and more complicated if both sites are in the same AS).

Good luck.

HTH

Rick

New Member

Re: BGP and Load sharing

Ok ....now i'm confused.

1. Yes the sites(A & B) are interconnected using BGP which I think is referred to as IGP?

2. Both sites have the same AS.

3. How do you mark preferable routes?

4. Explain more about local preference.

5. We have our own provider independent IP address space.

6. How do I advertise some part of my address space as more favorable through one provider and some part of my address space as more favorable through the other provider?

PS. The above questions only relate to the site where I have a connection to 2xISP's on 2 seperate routers.

I will deal with the site where both links to the ISP's are on the same router later. I also need to know if what ever changes I make will break IGP?

Hall of Fame Super Silver

Re: BGP and Load sharing

Brad

OK this discussion is likely to get quite complex and there are likely no simple solutions for what you want to do.

1) If A and B are connected using BGP then they would be in the same AS and yes it is called IBGP. (There is some terminology which might get confusing: there is IGP and there is IBGP. IGP is a generic term Interior Gateway Protocol which is roughly any of your standard interior routing protocols like OSPF, EIGRP, RIP while IBGP is BGP running between 2 routers within the same AS)

2) So both sites in the same AS = IBGP. How many providers are we talking about? A is connected to 2 and is B connected to the same 2 or to different ones? You might be talking about BGP to 2, or 3, or 4 different providers. Knowing how many helps determine how complex this is.

3) You make some of your outbound advertisements less preferable by AS prepending - you put your AS into the AS path more than once. You do this is a route map for some of your ISP connections.

4) For inbound advertisements that you receive from the providers you have 2 elements that you can use to indicate a preference. You can use weight (which is local to the router) or you can use local-preference which is advertised between routers in an IBGP situation. Since you will be running IBGP you should use local preference rather than weight. You manipulate the value of local preference in a route map assigned inbound for some of your external BGP neighbors. Conceptually you can think of local preference as a sort of mini "administrative distance" for BGP. In the same way that administrative distance is used by the router to choose which route to prefer when it has multiple routes to the same prefix, BGP can use local preference to indicate that on the basis of an internal policy that we prefer a route from this neighbor to a route from that neighbor.

5) and 6) relate to prepending which we mentioned in 3). To achieve load sharing between providers you typically divide your address space. It is difficult enough to manage if there are 2 providers and more complex if there are 3 or 4 providers. You advertise the first part of your address space to the first provider with a normal AS path and advertise the other part of your address space with prepended AS path. You advertise the other part of your address space to the other provider with normal AS path and the first part of your address space with prepended AS path.

Be aware that as you start to subdivide your address space that many Internet Service Providers have policies on the prefix length that they will accept. For example if you have an address space that is /24 and you need to divide it into 4 parts then each part is a /26 (and /26 is problematic for some providers). It is even worse if your address space is greater than /24.

You say "I will deal with the site where both links to the ISP's are on the same router later". But I believe that you need to figure how you are going to do this for both routers up front. What you do on one has significant impact on what you need to do on the other one.

And yes what you do with BGP can have impacts on what you need to do with your internal routing protocol.

HTH

Rick

281
Views
0
Helpful
3
Replies
CreatePlease to create content