Layer 4 server load balancing hot backup configuration example
Network requirements
In Figure 49, physical servers Server A, Server B, and Server C provide FTP services, and are in descending order of hardware configuration.
Configure server load balancing on the LB devices to distribute user requests among the servers based on their hardware performance, and use health monitoring to monitor reachability of the servers.
For high availability purposes, implement hot backup for the LB devices. To ensure traffic continuity, enable synchronization for session extension information and sticky entries on the LB devices.
Figure 49: Network diagram
Configuration procedure
Configure the LB devices:
Configure IRF.
# Set up an IRF fabric for the two LB devices with member IDs 1 and 2. (Details not shown.)
For more information about IRF, see Virtual Technologies Configuration Guide.
Configure Reth interfaces.
# Create Reth 1, and assign an IP address to Reth 1. Assign member interfaces to Reth 1, and set their priorities.
[LB] interface reth 1 [LB-Reth1] ip address 61.159.4.100 24 [LB-Reth1] member interface gigabitethernet 1/0/1 priority 20 [LB-Reth1] member interface gigabitethernet 2/0/1 priority 10 [LB-Reth1] quit
# Create Reth 2, and assign an IP address to Reth 1. Assign member interfaces to Reth 2, and set their priorities.
[LB] interface reth 2 [LB-Reth2] ip address 192.168.1.100 24 [LB-Reth2] member interface gigabitethernet 1/0/2 priority 20 [LB-Reth2] member interface gigabitethernet 2/0/2 priority 10 [LB-Reth2] quit
Configure a redundancy group.
# Create track entries to monitor the link state of the Ethernet interfaces.
[LB] track 1 interface gigabitethernet 1/0/1 [LB] track 2 interface gigabitethernet 1/0/2 [LB] track 3 interface gigabitethernet 2/0/1 [LB] track 4 interface gigabitethernet 2/0/2
# Create the redundancy group bkp and assign Reth 1 and Reth 2 to the redundancy group.
[LB] redundancy group bkp [LB-redundancy-group-bkp] member interface reth 1 [LB-redundancy-group-bkp] member interface reth 2
# Create node 1 (with priority 100) for the redundancy group bkp and bind node 1 to IRF member device 1. Associate track entries 1 and 2 with node 1.
[LB-redundancy-group-bkp] node 1 [LB-redundancy-group-bkp-node-1] priority 100 [LB-redundancy-group-bkp-node-1] bind slot 1 [LB-redundancy-group-bkp-node-1] track 1 interface gigabitethernet 1/0/1 [LB-redundancy-group-bkp-node-1] track 2 interface gigabitethernet 1/0/2 [LB-redundancy-group-bkp-node-1] quit
# Create node 2 (with priority 50) for the redundancy group bkp and bind node 2 to IRF member device 2. Associate track entries 3 and 4 with node 2.
[LB-redundancy-group-bkp] node 2 [LB-redundancy-group-bkp-node2] priority 50 [LB-redundancy-group-bkp-node2] bind slot 2 [LB-redundancy-group-bkp-node2] track 3 interface gigabitethernet 2/0/1 [LB-redundancy-group-bkp-node2] track 4 interface gigabitethernet 2/0/2 [LB-redundancy-group-bkp-node2] quit [LB-redundancy-group-bkp] quit
Enable session synchronization for stateful failover.
[LB] session synchronization enable
Configure a server farm.
# Create the ICMP-type NQA template t1.
[LB] nqa template icmp t1 [LB-nqatplt-icmp-t1] quit
# Create the server farm sf, and specify the scheduling algorithm as weighted round robin and health monitoring method as t1.
[LB] server-farm sf [LB-sfarm-sf] predictor round-robin [LB-sfarm-sf] probe t1 [LB-sfarm-sf] quit
Configure real servers.
# Create the real server rs1 with IPv4 address 192.168.1.1, port number 21, and weight 150, and add it to the server farm sf.
[LB] real-server rs1 [LB-rserver-rs1] ip address 192.168.1.1 [LB-rserver-rs1] port 21 [LB-rserver-rs1] weight 150 [LB-rserver-rs1] server-farm sf [LB-rserver-rs1] quit
# Create the real server rs2 with IPv4 address 192.168.1.2, port number 21, and weight 120, and add it to the server farm sf.
[LB] real-server rs2 [LB-rserver-rs2] ip address 192.168.1.2 [LB-rserver-rs2] port 21 [LB-rserver-rs2] weight 120 [LB-rserver-rs2] server-farm sf [LB-rserver-rs2] quit
# Create the real server rs3 with IPv4 address 192.168.1.3, port number 21, and weight 80, and add it to the server farm sf.
[LB] real-server rs3 [LB-rserver-rs3] ip address 192.168.1.3 [LB-rserver-rs3] port 21 [LB-rserver-rs3] weight 80 [LB-rserver-rs3] server-farm sf [LB-rserver-rs3] quit
Configure a virtual server.
# Create the TCP virtual server vs with VSIP 61.159.4.100, and specify its default master server farm sf. Enable synchronization for session extension information and sticky entries, and enable the virtual server.
[LB] virtual-server vs type tcp [LB-vs-tcp-vs] virtual ip address 61.159.4.100 [LB-vs-tcp-vs] default server-farm sf [LB-vs-tcp-vs] connection-sync enable [LB-vs-tcp-vs] sticky-sync enable [LB-vs-tcp-vs] service enable [LB-vs-tcp-vs] quit
Configure the physical servers:
# Specify the default gateway 192.168.1.100 for physical servers Server A, Server B, and Server C. (Details not shown.)
Verifying the configuration
# Display information about the redundancy group bkp.
[LB] display redundancy group bkp Redundancy group bkp (ID 1): Node ID Slot Priority Status Track weight 1 Slot1 100 Primary 255 2 Slot2 50 Secondary 255 Preempt delay time remained : 0 min Preempt delay timer setting : 1 min Remaining hold-down time : 0 sec Hold-down timer setting : 1 sec Manual switchover request : No Member interfaces: Reth1 Reth2 Member failover groups: Node 1: Track info: Track Status Reduced weight Interface 1 Positive 255 GE1/0/1 2 Positive 255 GE1/0/2 Node 2: Track info: Track Status Reduced weight Interface 3 Negative 255 GE2/0/1 4 Negative 255 GE2/0/2
# Display brief information about all real servers.
[LB] display real-server brief Real server Address Port State VPN instance Server farm rs1 192.168.1.1 21 Active sf rs2 192.168.1.2 21 Active sf rs3 192.168.1.3 21 Active sf
# Display detailed information about all server farms.
[LB] display server-farm Server farm: sf Description: Predictor: Round robin Proximity: Disabled NAT: Enabled SNAT pool: Failed action: Keep Active threshold: Disabled Slow-online: Disabled Selected server: Disabled Probe information: Probe success criteria: All Probe method: t1 Total real server: 3 Active real server: 3 Real server list: Name State VPN instance Address Port Weight Priority rs1 Active 192.168.1.1 21 150 4 rs2 Active 192.168.1.2 21 120 4 rs3 Active 192.168.1.3 21 80 4
# Display detailed information about all virtual servers.
[LB] display virtual-server Virtual server: vs Description: Type: TCP State: Active VPN instance: Virtual IPv4 address: 61.159.4.100/32 Virtual IPv6 address: -- Port: 0 Primary server farm: sf (in use) Backup server farm: Sticky: LB policy: Connection limit: -- Rate limit: Connections: -- Bandwidth: -- Inbound bandwidth: -- Outbound bandwidth: -- Connection synchronization: Enabled Sticky synchronization: Enabled Bandwidth busy protection: Disabled Interface bandwidth statistics: Disabled Route advertisement: Disabled