[c-nsp] BGP multipath load balancing.. broken sessions upon hash change

Peter Kranz pkranz at unwiredltd.com
Wed Sep 2 16:49:42 EDT 2015


I’m using bgp maximum-paths and several peers announcing the same /32 to
create a poor man’s load balancer. This works well with up to 16 peers after
which the CEF number of buckets is exceeded.

However, if the number of connected peers change, all sessions break, which
I would like to avoid.

For example:
- 10 machines are advertising a path to the /32
- SSH is opened to one machine via the advertised IP address
- 1 machine stops advertising, bringing the pool to 9
- SSH connection breaks a little while later

 Conversely when adding another machine to the pool, a similar experience:
- 9 machines are advertising a path to the /32
- SSH is opened to one machine via the advertised IP address
- 1 machines starts advertising, bringing the pool to 10 
- SSH connection breaks immediately

Is there a solution to keep the client session sticky to the BGP peer it was
initially started on? I am using per-destination load balancing. My
suspicion is that upon a change in the number of connected peers, the CEF
hash buckets are reset and renumbered, breaking all connections.

Peter Kranz
www.UnwiredLtd.com
Desk: 510-868-1614 x100
Mobile: 510-207-0000
pkranz at unwiredltd.com




More information about the cisco-nsp mailing list