keepalived_lvs_conf.pre

! Configuration File for keepalived

# Update: 2013-07-10 mysyncLBtest

global_defs {
#   notification_email {
#     longber@gmail.com
#   }
#   notification_email_from longber@gmail.com
#   smtp_server smtp.google.com
#   smtp_connect_timeout 30
    router_id mysyncLB1test
}

# instance VI_1
# ------------------------------------------------------------------------------
vrrp_instance VI_1 {
    state BACKUP
    priority 200
    virtual_router_id 51
    interface eth0
    lvs_sync_daemon_interface eth0
    track_interface {
        eth0
    }
    advert_int 1
    authentication {
        auth_type PASS
        auth_pass mysynctestLVS
    }
    virtual_ipaddress {
        192.168.0.2/24 dev eth0 label eth0:0
        192.168.0.3/24 dev eth0 label eth0:1
        192.168.0.4/24 dev eth0 label eth0:2
        192.168.0.5/24 dev eth0 label eth0:3
        192.168.0.6/24 dev eth0 label eth0:4
        192.168.0.7/24 dev eth0 label eth0:5
        192.168.0.8/24 dev eth0 label eth0:6
        192.168.0.9/24 dev eth0 label eth0:7
        192.168.0.59/24 dev eth0 label eth0:8
    }
    nopreempt
}

# WEB_session-pre
# ------------------------------------------------------------------------------
virtual_server 192.168.0.2 80 {
    delay_loop 6
    lb_algo wlc
    lb_kind DR
    persistence_timeout 65
    protocol TCP
    ha_suspend
    #virtualhost 192.168.0.2
    sorry_server 192.168.0.37 80
    real_server 192.168.0.36 80 {
        weight 1

        TCP_CHECK {
            connect_port 80
            connect_timeout 3
            nb_get_retry 3
            delay_before_retry 3
        }
    } # end real_server
} # end virtual_server 192.168.0.2:80
# ------------------------------------------------------------------------------

# xmxd-pre-3200
# ------------------------------------------------------------------------------
virtual_server 192.168.0.2 3200 {
    delay_loop 6
    lb_algo wlc
    lb_kind DR
    persistence_timeout 65
    protocol TCP
    ha_suspend
    #virtualhost 192.168.0.2
    sorry_server 192.168.0.37 3200
    real_server 192.168.0.36 3200 {
        weight 1

        TCP_CHECK {
            connect_port 3200
            connect_timeout 3
            nb_get_retry 3
            delay_before_retry 3
        }
    } # end real_server
    
    real_server 192.168.0.37 3200 {
        weight 1

        TCP_CHECK {
            connect_port 3200
            connect_timeout 3
            nb_get_retry 3
            delay_before_retry 3
        }
    } # end real_server
} # end virtual_server 192.168.0.2:3200
# ------------------------------------------------------------------------------

# WEB-pre
# ------------------------------------------------------------------------------
virtual_server 192.168.0.3 80 {
    delay_loop 6
    lb_algo wlc
    lb_kind DR
    persistence_timeout 65
    protocol TCP
    ha_suspend
    #virtualhost 192.168.0.3
    sorry_server 192.168.0.37 80
    real_server 192.168.0.36 80 {
        weight 1
        TCP_CHECK {
            connect_port 80
            connect_timeout 3
            nb_get_retry 3
            delay_before_retry 3
        }
    } # end real_server

    real_server 192.168.0.37 80 {
        weight 1
        TCP_CHECK {
            connect_port 80
            connect_timeout 3
            nb_get_retry 3
            delay_before_retry 3
        }
    } # end real_server
} # end virtual_server 192.168.0.3:80
# ------------------------------------------------------------------------------


# WEB-pre
# ------------------------------------------------------------------------------
virtual_server 192.168.0.59 8480 {
    delay_loop 6
    lb_algo wlc
    lb_kind DR
    persistence_timeout 65
    protocol TCP
    ha_suspend
    #virtualhost 192.168.0.3
    sorry_server 192.168.0.37 8480
    real_server 192.168.0.36 8480 {
        weight 1
        TCP_CHECK {
            connect_port 8480
            connect_timeout 3
            nb_get_retry 3
            delay_before_retry 3
        }
    } # end real_server

    real_server 192.168.0.37 8480 {
        weight 1
        TCP_CHECK {
            connect_port 8480
            connect_timeout 3
            nb_get_retry 3
            delay_before_retry 3
        }
    } # end real_server
} # end virtual_server 192.168.0.59:8480
# ------------------------------------------------------------------------------


# GAC_EVpre_TCP: 192.168.0.4:9090 -> 192.168.0.52/53:9090
# ------------------------------------------------------------------------------
virtual_server 192.168.0.4 9090 {
    delay_loop 6
    lb_algo wlc
    lb_kind DR
    persistence_timeout 120
    protocol TCP
    ha_suspend

    real_server 192.168.0.52 9090 {
        weight 1

        TCP_CHECK {
            connect_port 9090
            connect_timeout 3
            nb_get_retry 3
            delay_before_retry 3
        }
    } # end real_server

    real_server 192.168.0.53 9090 {
        weight 1

        TCP_CHECK {
            connect_port 9090
            connect_timeout 3
            nb_get_retry 3
            delay_before_retry 3
        }
    } # end real_server

} # end virtual_server 192.168.0.4:9090


# GAC_AFpre_TCP: 192.168.0.4:9099 -> 192.168.0.52/53:9099
# ------------------------------------------------------------------------------
virtual_server 192.168.0.4 9099 {
    delay_loop 6
    lb_algo wlc
    lb_kind DR
    persistence_timeout 120
    protocol TCP
    ha_suspend

    real_server 192.168.0.52 9099 {
        weight 1

        TCP_CHECK {
            connect_port 9099
            connect_timeout 3
            nb_get_retry 3
            delay_before_retry 3
        }
    } # end real_server

    real_server 192.168.0.53 9099 {
        weight 1

        TCP_CHECK {
            connect_port 9099
            connect_timeout 3
            nb_get_retry 3
            delay_before_retry 3
        }
    } # end real_server

} # end virtual_server 192.168.0.4:9099
# ------------------------------------------------------------------------------


# GAC_EVtest_TCP: 192.168.0.5:9091 -> 192.168.0.25/26:9091
# ------------------------------------------------------------------------------
virtual_server 192.168.0.5 9091 {
    delay_loop 6
    lb_algo wlc
    lb_kind DR
    persistence_timeout 120
    protocol TCP
    ha_suspend

    real_server 192.168.0.25 9091 {
        weight 1

        TCP_CHECK {
            connect_port 9091
            connect_timeout 3
            nb_get_retry 3
            delay_before_retry 3
        }
    } # end real_server

    real_server 192.168.0.26 9091 {
        weight 1

        TCP_CHECK {
            connect_port 9091
            connect_timeout 3
            nb_get_retry 3
            delay_before_retry 3
        }
    } # end real_server

} # end virtual_server 192.168.0.5:9091
# ------------------------------------------------------------------------------


# GAC_AFtest_TCP: 192.168.0.5:9092 -> 192.168.0.38/39:9092
# ------------------------------------------------------------------------------
virtual_server 192.168.0.5 9092 {
    delay_loop 6
    lb_algo wlc
    lb_kind DR
    persistence_timeout 120
    protocol TCP
    ha_suspend

    real_server 192.168.0.38 9092 {
        weight 1

        TCP_CHECK {
            #connect_port 9092
            connect_port 22
            connect_timeout 3
            nb_get_retry 3
            delay_before_retry 3
        }
    } # end real_server

    real_server 192.168.0.39 9092 {
        weight 1

        TCP_CHECK {
            #connect_port 9092
            connect_port 22
            connect_timeout 3
            nb_get_retry 3
            delay_before_retry 3
        }
    } # end real_server

} # end virtual_server 192.168.0.5:9092
# ------------------------------------------------------------------------------

## GAC_michael_test_TCP: 192.168.0.5:19090 -> 192.168.11.174:19090
## ------------------------------------------------------------------------------
#virtual_server 192.168.0.5 19090 {
#    delay_loop 6
#    lb_algo wlc
#    lb_kind NAT
#    persistence_timeout 120
#    protocol TCP
#    ha_suspend
#
#    real_server 192.168.11.174 19090 {
#        weight 1
#
#        TCP_CHECK {
#            connect_port 19090
#            connect_timeout 3
#            nb_get_retry 3
#            delay_before_retry 3
#        }
#    } # end real_server
#
#} # end virtual_server 192.168.0.5:19090
## ------------------------------------------------------------------------------