Приложение B. Пример файла /etc/sysconfig/ha/lvs.cf

Ниже приведен пример файла lvs.cf для кластера, использующего метку межсетевого экрана 21 для служб FTP и метку 80 для объединения HTTP и HTTPS запросов.

serial_no = 94
primary = 192.168.26.9
primary_private = 10.11.12.9
service = lvs
backup_active = 1
backup = 192.168.26.8
backup_private = 10.11.12.8
heartbeat = 1
heartbeat_port = 1050
keepalive = 6
deadtime = 18
network = nat
nat_router = 10.11.12.10 eth1:1
nat_nmask = 255.255.255.0
reservation_conflict_action = preempt
debug_level = NONE
virtual HTTP {
     active = 1
     address = 192.168.26.10 eth0:1
     vip_nmask = 255.255.255.0
     fwmark = 80
     port = 80
     persistent = 320
     send = "GET / HTTP/1.0\r\n\r\n"
     expect = "HTTP"
     load_monitor = none
     scheduler = wlc
     protocol = tcp
     timeout = 6
     reentry = 15
     quiesce_server = 1
     server one {
         address = 10.11.12.1
         active = 1
         weight = 1
     }
     server two {
         address = 10.11.12.2
         active = 1
         weight = 1
     }
     server three {
         address = 10.11.12.3
         active = 1
         weight = 1
     }
}
virtual FTP {
     active = 1
     address = 192.168.27.10 eth0:1
     vip_nmask = 255.255.255.0
     fwmark = 21
     port = 21
     persistent = 1
     send = "quit"
     expect = "220"
     load_monitor = none
     scheduler = rr
     protocol = tcp
     timeout = 6
     reentry = 15
     quiesce_server = 0
     server one {
         address = 10.11.12.1
         active = 1
         weight = 1
     }
     server two {
         address = 10.11.12.2
         active = 1
         weight = 1
     }
     server three {
         address = 10.11.12.3
         active = 1
         weight = 1
     }
}
virtual HTTPS {
     active = 1
     address = 192.168.26.10 eth0:1
     vip_nmask = 255.255.255.0
     fwmark = 80
     port = 443
     persistent = 320
     load_monitor = none
     scheduler = wlc
     protocol = tcp
     timeout = 6
     reentry = 15
     quiesce_server = 1
     server one {
         address = 10.11.12.1
         active = 1
         weight = 1
     }
     server two {
         address = 10.11.12.2
         active = 1
         weight = 1
     }
     server three {
         address = 10.11.12.3
         active = 1
         weight = 1
     }
}