Load Sharing with HSRP and BGP

Unanswered Question
Jun 18th, 2008
User Badges:

Hi,


I am configuring multihoming with HSRP.

I have to ISPs (A and B) and two Routers.


For link failure BGP willtake care and for Router failure HSRP will take care.


Using this concept i can use only one link at any time.


Is there any way that i can share the load ( or set incoming and outgoing traffic thru ISP A or ISP B)

I am following this document:

http://www.cisco.com/en/US/tech/tk365/technologies_configuration_example09186a0080093f2c.shtml

  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 0 (0 ratings)
Loading.
Giuseppe Larosa Wed, 06/18/2008 - 06:18
User Badges:
  • Super Silver, 17500 points or more
  • Hall of Fame,

    Founding Member

Hello ghanshyam,


for the upstream outgoing direction you can define two HSRP groups running on the same interfaces with a different VIP and a different Active router.

Then you distribute the two different VIPs on your servers and Pcs.


For the incoming directions from the internet ISPs ,if they (the ISPs) accept two longer prefixes from you, you can make one preferred through ISP1 and one through ISP2 by using AS path prepeding.


However, your capability to influence the return path is limited to this for the BGP protocol characteristics.


You can get some usage of both links on both directions but you cannot expect an exact 50% ratio.


hope to help

Giuseppe

ghanshyam.saini Wed, 06/18/2008 - 20:10
User Badges:

Thanks for reply!


Can you please esplain this:

"Then you distribute the two different VIPs on your servers and Pcs."


Thanks,

gm



Giuseppe Larosa Fri, 06/20/2008 - 01:47
User Badges:
  • Super Silver, 17500 points or more
  • Hall of Fame,

    Founding Member

Hello Ghanshyam,

when you use multiple HSRP groups where each of them has its own VIP IP address you then decide what end user Pcs and servers will use first VIP which will use the second.


So distribute = configure on groups of end user devices (PCs or servers)

You need to assign different default gateways to different groups of users.

In this way you can get some load sharing in the upstream (to the internet ) direction.

For the downstream direction if you have two IP subnets /24 you can try to influence the return path, so that normally return path for subnet A1 is via ISP1 and for subnet A2 is via ISP2.

By the way, you have your own autonomus system or are you using an IP block that had given to you by your first ISP ?

If so you have to ask the second provider to give you a /24 IP subnet and then you need to use NAT with route-maps


Hope to help

Giuseppe

ashok_boin Wed, 06/18/2008 - 21:17
User Badges:
  • Bronze, 100 points or more

Didn't get much information about your network topology like you have your own single network subnet or got assigned from both providers.


We can do load balancing in various ways assuming you got two different networks from ISP A & B calling them as Net A & Net B respectively. We need to think about load balancing for different directions separately.


Inbound direction:


The inbound path get influenced by how you advertise your networks like do AS Path prepend for Net B when adv out through ISP A & vice versa through ISP B.


Outbound direction:


The outbound path get influenced by your own configuration in your routers, the best way to influence by Local preference. Use AS-Path lists & assign local preference for half of your receiving networks 200 & for other half as 100 (default valued of local pref). Generally, you give higher local preference for ISP & it's directly connected networks.


-Ashok.

ghanshyam.saini Wed, 06/18/2008 - 21:56
User Badges:

Hi,


I have my own block of IP address /24 network.


This I am using on my current router with two diffrent upstream ISPs.

Now i have to put second router with for hardware failure with BGP and load sharing.

hennigan Wed, 06/18/2008 - 21:38
User Badges:
  • Bronze, 100 points or more

You can share the load by BGP, both in and out. Tuning traffic in to you is a bit trickier than out, may involve pushing communities to your upstreams, etc.


I would use loopbacks for the IBGP neighbors, not the ethernets shown in the document you referenced.


Consider that in a normal scenario inbound traffic will load balance via BGP, travel from the BGP router to the LAN and then to the host.


Outbound traffic will go to the HSRP virtual address of the active router which may or may not be the one where the inbound traffic entered or with the best path to the destination. It will then look up the destination via BGP, and if the best path is on the other border router it will route it there. If the best path is local, it will route it out the WAN to the BGP neighbor.


If either WAN link fails, the BGP routes get withdrawn and all traffic goes out the remaining path (which may be the standby router if the WAN link on the active router fails). One extra internal hop in this case, no big deal.


If the active router fails, then the standby takes over via HSRP and it obviously has the only working BGP WAN link.


The document shows a track scenario to force the active router to flip to standby if its WAN link goes down. I don't see any real advantage in that. It looks like it is for a pure active/failover scenario rather than multi-homed BGP with best path selection.


Consider this as two separate tasks. One is IGP/IBGP/EBGP configuration for two active upstreams on two border routers. The second is HSRP to protect against a router hardware failure.

ghanshyam.saini Wed, 06/18/2008 - 21:53
User Badges:

Hi,


I am already running BGP on a single router and now i got another router for hardware failure.

As per your comments:

1. I have to shift one link from existing router to new router and configure BGP over there.

2. Configure HSRP for router or link failover.


I need more infor regarding traffic routing, if you can help me out.

ashok_boin Wed, 06/18/2008 - 22:33
User Badges:
  • Bronze, 100 points or more

Yes, that's right.


If you have only a single Class C network, then it's very difficult to achieve load balancing as the most specific route advertised into BGP world is /24. So, if you have taken from two Tier-1 ISPs, your inbound path most probably from one ISP which you preferred with AS-path prepend or communities propagation.


-Ashok.

ghanshyam.saini Wed, 06/18/2008 - 23:28
User Badges:

If i get another /24 block can i do the load sharing if yes please let me know any doc reference

Actions

This Discussion