Installation guide
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Table of Contents
Int roduction
1. Document Conventions
1.1. T ypographic Conventions
1.2. Pull-quote Conventions
1.3. Notes and Warnings
2. Feedback
Chapter 1. Linux Virt ual Server Overview
1.1. A Basic LVS Configuration
1.1.1. Data Replication and Data Sharing Between Real Servers
1.1.1.1. Configuring Real Servers to Synchronize Data
1.2. A Three-Tier LVS Configuration
1.3. LVS Scheduling Overview
1.3.1. Scheduling Algorithms
1.3.2. Server Weight and Scheduling
1.4. Routing Methods
1.4.1. NAT Routing
1.4.2. Direct Routing
1.4.2.1. Direct Routing and the ARP Limitation
1.5. Persistence and Firewall Marks
1.5.1. Persistence
1.5.2. Firewall Marks
1.6. LVS — A Block Diagram
1.6.1. LVS Components
1.6.1.1. pulse
1.6.1.2. lvs
1.6.1.3. ipvsadm
1.6.1.4. nanny
1.6.1.5. /etc/sysconfig/ha/lvs.cf
1.6.1.6. Piranha Configuration Tool
1.6.1.7. send_arp
Chapter 2. Initial LVS Configuration
2.1. Configuring Services on the LVS Routers
2.2. Setting a Password for the Piranha Configuration T ool
2.3. Starting the Piranha Configuration T ool Service
2.3.1. Configuring the Piranha Configuration Tool Web Server Port
2.4. Limiting Access To the Piranha Configuration T ool
2.5. T urning on Packet Forwarding
2.6. Configuring Services on the Real Servers
Chapter 3. Setting Up LVS
3.1. T he NAT LVS Network
3.1.1. Configuring Network Interfaces for LVS with NAT
3.1.2. Routing on the Real Servers
3.1.3. Enabling NAT Routing on the LVS Routers
3.2. LVS via Direct Routing
3.2.1. Direct Routing and arptables_jf
3.2.2. Direct Routing and iptables
3.3. Putting the Configuration Together
3.3.1. General LVS Networking T ips
3.4. Multi-port Services and LVS
4
5
5
6
7
7
9
9
10
10
11
12
12
13
14
14
15
16
16
16
17
17
18
18
18
18
18
18
18
18
20
20
21
21
22
22
23
23
24
24
24
25
26
26
27
28
29
29
30
Table of Contents
1