fir3net
PPS-Firenetbanner-780.5x190-30-03-17

Brocade ADX - Policy-Based Server Load Balancing

Policy-Based Server Load Balancing (PB-SLB) provides the ability to distribute traffic based on the source IP address of the client.

There are 2 ways in which to configure PB-SLB. You can either pull a list of IP`s from a TFTP server or define the IP`s directly on the ADX.
This example is based on defining the IP`s directly on the ADX.

Example

Within this example we will balance any traffic from a source IP of 8.8.8.8 or 9.9.9.9 to the real servers REAL3 or REAL4. All other traffic will be balanced to REAL1 or REAL2.

Assign Groups

First of all we place our real servers into groups.

server real REAL1 192.168.1.1
  port http group-id 1 1

server real REAL2 192.168.1.2
  port http group-id 1 1

server real REAL3 192.168.1.3
  port http group-id 2 2

server real REAL4 192.168.1.4
  port http group-id 2 2

Create PB-SLB Rules

Next we define our PB-SLB rules.

First of all we define which source IP`s should go to which group. We then define a default group to ensure that should none of the source IP`s match, traffic is still sent to a defined group (in this case group 1).
To ensure that the policy list is saved to flash by default when you enter a 'wr mem' the command 'enable-config-gen' is also entered.

server pbslb add 8.8.8.8 255.255.255.255 2
server pbslb add 9.9.9.9 255.255.255.255 2
server pbslb default-group-id ipv4 1
server pbslb enable-config-gen

Enable

The final step is to then enable PB-SLB on the virtual server along with binding each of the real servers that we previously assigned the group id`s to.

server virtual VIP_172.16.1.100
 port http sw-l4-pbslb
 port ssl sw-l4-pbslb
 bind http REAL1 80
 bind http REAL2 80
 bind http REAL3 80
 bind http REAL4 80

Troubleshooting

You can confirm that your real servers are being hit via the use of 'show server sessions'. To display your PB-SLB list you can also use the command 'show pbslb all 0'.

Note : Please take into account that persistence takes precedence over PB-SLB. Based on this should any form of persistence be configured within your Virtual Server you may not observe the expected results.

About the Author

RDonato

R Donato

Rick Donato is the Founder and Chief Editor of Fir3net.com. He currently works as a Principal Network Security Engineer and has a keen interest in automation and the cloud.

You can find Rick on Twitter @f3lix001