Create an F5 BIG-IP Load Balancer VIP

Create an F5 BIG-IP Load Balancer VIP

In this guide, I will show you how to create an HTTP and SSL virtual server to load balance traffic across a pool of back-end web servers.

Prerequisites

  • A virtual / physical F5 BIG-IP device with base networking configured (i.e. VLANs, interfaces, self IPs, routes)
  • 2 x web servers (ideally with the F5 BIG-IP as their default gateway)

Steps

Define variables

Variable Name Value
<NODE1 IP> IP Address of web server #1
<NODE2 IP> IP Address of web server #2
<NODE PORT> TCP Port that the web server is listening on
<HTTP POOL NAME> Name of the HTTP pool (arbitrary value)
<SSL POOL NAME> Name of the SSL pool (arbitrary value)
<HTTP VS NAME> Name of the HTTP virtual server (arbitrary value)
<SSL VS NAME> Name of the SSL virtual server (arbitrary value)
<VIP> IP Address of the HTTP(S) listener

  1. Create the HTTP virtual server
    1. Create 2 x nodes (i.e. web servers to load balance)
      create ltm node <NODE1 IP> address <NODE1 IP>
      create ltm node <NODE2 IP> address <NODE2 IP>
    2. Create an HTTP pool with pool members
      create ltm pool <HTTP POOL NAME> members add { <NODE1 IP>:<PORT> <NODE2 IP>:<PORT> }
    3. Create an HTTP virtual server and bind pool
      create ltm virtual <HTTP VS NAME> destination <VIP>:80 profiles add { tcp http } pool <POOL NAME> source-address-translation { type automap }
  2. Create the SSL virtual server
    1. Create an SSL pool with pool members
      create ltm pool <SSL POOL NAME> members add { <NODE1 IP>:<PORT> <NODE2 IP>:<PORT> }
    2. Create an SSL virtual server and bind pool
      create ltm virtual <SSL VS NAME> destination <VIP>:443 profiles add { tcp http clientssl serverssl } pool <POOL NAME> source-address-translation { type automap }

      save sys config

Example TMSH Commands

create ltm node 172.24.32.11 address 172.24.32.11
create ltm node 172.24.32.12 address 172.24.32.12

create ltm pool HTTP-POOL members add { 172.24.32.11:80 172.24.32.12:80 }

create ltm virtual HTTP-VS destination 192.168.1.100:80 profiles add { tcp http } pool HTTP-POOL source-address-translation { type automap }

create ltm pool SSL-POOL members add { 172.24.32.11:443 172.24.32.12:443 }

create ltm virtual SSL-VS destination 192.168.1.100:443 profiles add { tcp http clientssl serverssl } pool SSL-POOL source-address-translation { type automap }

Comments