[root@gw-wt-1 ha.d]#
/etc/ha.d/
ldirectord.cf
# Sample ldirectord configuration file to configure various virtual services.
#
# Ldirectord will connect to each real server once per second and request
# /index.html. If the data returned by the server does not contain the
# string "Test Message" then the test fails and the real server will be
# taken out of the available pool. The real server will be added back into
# the pool once the test succeeds. If all real servers are removed from the
# pool then localhost:80 is added to the pool as a fallback measure.
# Global Directives
checktimeout=5
checkinterval=5
#fallback=127.0.0.1:80
autoreload=yes
fork = no
logfile="/var/log/ldirectord.log"
logfile="local0"
#emailalert="admin@x.y.z"
#emailalertfreq=3600
#emailalertstatus=all
quiescent=yes
# configure for hq 8601 earthnet route
# and a single real server for a virtual service
virtual=120.193.10.101:8601
#virtual=1
real=192.168.3.107:8601 gate 5
real=192.168.3.106:8601 masq 5
# real=192.168.3.112:8601 masq 5
real=192.168.3.104:8601 gate 5
# fallback=127.0.0.1:80 gate
service=none
scheduler=wlc
# persistent=2
netmask=255.255.255.255
protocol=tcp
# protocol=fwm
checktype=connect
# checkport=8601
# request="index.html"
# receive="Test Page"
# virtualhost=x.y.z
# configure for hq 8602 earthnet route
# and a single real server for a virtual service
virtual=120.193.10.101:8602
# real=192.168.3.104:8602 gate 5
real=192.168.3.19:8602 masq 5
real=192.168.3.18:8602 masq 5
# fallback=127.0.0.1:80 gate
service=none
scheduler=wlc
# persistent=2
netmask=255.255.255.255
protocol=tcp
# protocol=fwm
checktype=connect
# checkport=8601
# request="index.html"
# receive="Test Page"
# virtualhost=x.y.z
# configure for hq 8601 earthnet route
# and a single real server for a virtual service
virtual=192.168.3.200:8601
real=192.168.3.107:8601 gate 5
real=192.168.3.106:8601 gate 5
# real=192.168.3.112:8601 gate 5
real=192.168.3.104:8601 gate 5
# fallback=127.0.0.1:80 gate
service=none
scheduler=wlc
# persistent=2
netmask=255.255.255.255
protocol=tcp
# protocol=fwm
checktype=connect
# checkport=8601
# request="index.html"
# receive="Test Page"
# virtualhost=x.y.z
# configure for hq 8602 earthnet route
# and a single real server for a virtual service
virtual=192.168.3.200:8602
# real=192.168.3.104:8602 gate 5
real=192.168.3.18:8602 gate 5
real=192.168.3.19:8602 gate 5
# fallback=127.0.0.1:80 gate
service=none
scheduler=wlc
# persistent=2
netmask=255.255.255.255
protocol=tcp
# protocol=fwm
checktype=connect
# checkport=8601
# request="index.html"
# receive="Test Page"
# virtualhost=x.y.z
[root@gw-wt-1 ha.d]cat /etc/ha.d/haresources
gw-wt-2 IPaddr2::192.168.3.40/24/eth1
gw-wt-1 \
IPaddr2::192.168.3.200/24/eth1 \
IPaddr2::120.193.10.101/24/eth0 \
ldirectord::ldirectord.cf LVSSyncDaemonSwap::master
[root@gw-wt-1 ha.d]#
ipvsadm
IP Virtual Server version 1.2.1 (size=4096)
Prot LocalAddress:Port Scheduler Flags
-> RemoteAddress:Port Forward Weight ActiveConn InActConn
TCP 192.168.3.200:8602 wlc
-> 192.168.3.19:8602 Route 5 356 0
-> 192.168.3.18:8602 Route 5 2380 0
TCP 192.168.3.200:8601 wlc
-> 192.168.3.107:8601 Route 5 845 0
-> 192.168.3.104:8601 Route 5 844 0
-> 192.168.3.106:8601 Route 5 844 0
TCP 120.193.10.101:8602 wlc
-> 192.168.3.18:8602 Masq 5 324 0
-> 192.168.3.19:8602 Masq 5 131 1
TCP 120.193.10.101:8601 wlc
-> 192.168.3.104:8601 Route 5 1427 0
-> 192.168.3.106:8601 Masq 5 1427 1
-> 192.168.3.107:8601 Route 5 1427 0