登录  
 加关注
查看详情
   显示下一条  |  关闭
温馨提示!由于新浪微博认证机制调整,您的新浪微博帐号绑定已过期,请重新绑定!立即重新绑定新浪微博》  |  关闭

herb

喜欢写博,喜欢安静,喜欢挑战!

 
 
 

日志

 
 

LVS ipvsadm+heartbeat+ldirecrtord(nat示例)  

2011-01-17 19:46:07|  分类: Linux Cluster |  标签: |举报 |字号 订阅

  下载LOFTER 我的照片书  |

[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    

  评论这张
 
阅读(991)| 评论(0)

历史上的今天

评论

<#--最新日志,群博日志--> <#--推荐日志--> <#--引用记录--> <#--博主推荐--> <#--随机阅读--> <#--首页推荐--> <#--历史上的今天--> <#--被推荐日志--> <#--上一篇,下一篇--> <#-- 热度 --> <#-- 网易新闻广告 --> <#--右边模块结构--> <#--评论模块结构--> <#--引用模块结构--> <#--博主发起的投票-->
 
 
 
 
 
 
 
 
 
 
 
 
 
 

页脚

网易公司版权所有 ©1997-2018