4

We have two software gateways (on Linux) for IPv6 that take fullviews from ISPs and announce our AS. And several nodes connected to Internet via the gateways. Something like at picture:

enter image description here

And we would like to organize loadbalicing of outgoing traffic on network level. So one node sends packets via first gateway another node sends via second one.

Is there any native IPv6 feature for this that makes nodes to chose gateway automatically (perfectly if route will be chosen for each new connection) and may consider failing of any router.

I understand that it is possible to set up gateway at the nodes manually, or use SLAAC, or DHCPv6 and it should work in someway. But may be there is more beautiful native solution that allow setting priority of gateways and so on?

Update: The main goal of the question is to find out if there is a special mechanism that was developed with IPv6 and special for IPv6, or like part of IPv6 and that intend for loadbalancing. Or practices that used for IPv4 are should be used?

0

3 Answers 3

3

Just like for IPv4, there are several FHRPs (First Hop Redundancy Protocols) that can do something like that: HSRP, VRRP, GLBP, etc.

The problem is that a host will have only one default gateway configured, and the host will send to the MAC address of its configured default gateway. The FHRP will fool the host by creating a virtual MAC address to which a host will send frames containing packets destined for a different network. The routers must be configured to use an FHRP because they must communicate with each other about which is in charge. Because the host must be fooled at layer-2, this is something outside the scope of a layer-3 protocol (IPv4, IPv6, etc.), so there is noting built into the layer-3 protocol that can do this.

3

It really comes down to what you're trying to load-balance. IMO, having each host manually configured with different primary and backup gateways to load-share is a bit hokey.

Assuming that your goal is to load-balance across the ISPs, then:

If gateway_1 and gateway_2 also have an IBGP peering adjacency between then, then you can perform outbound load distribution by virtue of each ISP having a slightly different view of the global table. All traffic would be sent to gateway_1, but if a better path existed to the destination via ISP_2, then traffic would be routed via gateway_2 and onwards to ISP_2.

To improve on this further, if your ultimate requirement is that you load-balance outbound flows from each node, then extend BGP down onto each node as well, peering with each gateway, and then enable ECMP and/or Multipath on these links.

2

One approach is this, assuming you have a large enough pool of client machines, and they tend to be more-or-less equal in their requirements.

  • Run VRRP or similar with two virtual gateways VGW1 and VGW2
  • Adjust the priorities so that GW1 wins election for VGW1 and GW2 wins for VGW2
  • Ideally on the same hosts, run two DHCP servers with overlapping networks
  • GW1 gives addresses in bottom half of range, default gw VGW1
  • GW2 gives addresses in top of half of range, default gw VGW2
  • Let the DHCP servers race

Now, assuming both functioning perfectly, if GW1 is slightly more loaded it will be slower offering DHCP and thus GW2 will most likely win the next race to give out a lease. Thus the two will tend to balance allocation. (This can go wrong if the DHCP clients/servers are "sticky" and try to stay with the same address and server.)

Each client is configured to use either VGW1 or VGW2. If one physical router goes down, the other will take over.

I've done this kind of thing with IPv4, never v6, but it would work the same way.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.