Introduction .............................................................................................................. vii1. Document Conventions ................................................................................ viii2. Feedback ...................................................................................................... ix1. Linux Virtual Server Overview ................................................................................. 11. A Basic LVS Configuration .............................................................................. 11.1. Data Replication and Data Sharing Between Real Servers ..................... 32. A Three-Tier LVS Configuration ...................................................................... 33. LVS Scheduling Overview .............................................................................. 53.1. Scheduling Algorithms ......................................................................... 53.2. Server Weight and Scheduling ............................................................. 74. Routing Methods ............................................................................................ 74.1. NAT Routing ....................................................................................... 74.2. Direct Routing ..................................................................................... 95. Persistence and Firewall Marks ......................................................................115.1. Persistence ........................................................................................115.2. Firewall Marks ....................................................................................126. LVS — A Block Diagram ................................................................................126.1. LVS Components ...............................................................................142. Initial LVS Configuration ........................................................................................171. Configuring Services on the LVS Routers .......................................................172. Setting a Password for the Piranha Configuration Tool .................................183. Starting the Piranha Configuration Tool Service ...........................................183.1. Configuring the Piranha Configuration Tool Web Server Port .............194. Limiting Access To the Piranha Configuration Tool ......................................205. Turning on Packet Forwarding .......................................................................216. Configuring Services on the Real Servers .......................................................213. Setting Up LVS .....................................................................................................231. The NAT LVS Network ..................................................................................231.1. Configuring Network Interfaces for LVS with NAT .................................231.2. Routing on the Real Servers ...............................................................251.3. Enabling NAT Routing on the LVS Routers ..........................................252. LVS via Direct Routing ..................................................................................262.1. Direct Routing and arptables_jf .......................................................272.2. Direct Routing and iptables ..............................................................283. Putting the Configuration Together .................................................................293.1. General LVS Networking Tips .............................................................304. Multi-port Services and LVS ...........................................................................304.1. Assigning Firewall Marks ....................................................................315. Configuring FTP ............................................................................................325.1. How FTP Works .................................................................................325.2. How This Affects LVS Routing ............................................................335.3. Creating Network Packet Filter Rules ..................................................336. Saving Network Packet Filter Settings ............................................................354. Configuring the LVS Routers with Piranha Configuration Tool ...............................371. Necessary Software ......................................................................................372. Logging Into the Piranha Configuration Tool ................................................37v