unix# cd /usr/src/sys/i386/conf
unix# config LVS
LVS: unknown option "NF_SOCKOPT"
其實你所說的問題,在最前面的幾帖中已經說明清楚,請完整閱讀後在測試,可以少走些彎路。
如果還是有問題,請詳細貼出log。 原帖由 @kang 于 2006-12-21 20:31 发表
SRV01
srv01# sysctl net.inet.carp.preempt=1
srv01# ifconfig carp0 create
srv01# ifconfig carp0 vhid 1 pass password 192.168.2.144/24 up #password随便输入,但srv01和srv02必需一致。
SRV02
...
server1:
carp0: flags=49<UP,LOOPBACK,RUNNING> mtu 1500
inet 192.168.0.144 netmask 0xffffff00
carp: MASTER vhid 1 advbase 1 advskew 0
server2:
carp0: flags=49<UP,LOOPBACK,RUNNING> mtu 1500
inet 192.168.0.144 netmask 0xffffff00
carp: MASTER vhid 1 advbase 1 advskew 100
总是这样,我也不知道是怎么回事,请你帮帮忙。 再问个问题
当master作为director的时候,2台机器的weight都是1
那么director的负载是不是比另一台realserver大很多? 还是2台差不多?
如果2台差不过,是不是表示作为banlance 的director消耗资源很少?
谢楼主答复 原帖由 caicheng1015 于 2006-12-30 15:03 发表
server1:
carp0: flags=49<UP,LOOPBACK,RUNNING> mtu 1500
inet 192.168.0.144 netmask 0xffffff00
carp: MASTER vhid 1 advbase 1 advskew 0
server2:
carp0: flags=49<UP,LOOP ...
#把你大carp参数show出来看下.以下是我的master主机的情况.给你参考一下.
#sysctl -a |grep carp
net.inet.ip.same_prefix_carp_only: 0
net.inet.carp.allow: 1
net.inet.carp.preempt: 1
net.inet.carp.log: 1
net.inet.carp.arpbalance: 0
net.inet.carp.suppress_preempt: 0
BACKUP主机的情况也是一样.
[ 本帖最后由 @kang 于 2006-12-30 17:25 编辑 ] srv01:(master)
carp0: flags=49<UP,LOOPBACK,RUNNING> mtu 1500
inet 192.168.2.144 netmask 0xffffffff
carp: MASTER vhid 1 advbase 1 advskew 0
svr02:(backup)
carp0: flags=49<UP,LOOPBACK,RUNNING> mtu 1500
inet 192.168.2.144 netmask 0xffffffff
carp: BACKUP vhid 1 advbase 1 advskew 100
[ 本帖最后由 @kang 于 2006-12-30 17:24 编辑 ]
回复 4楼 @kang 的帖子
why both SRV01 and SRV02 should be ipvs director, if use a separete director how to set it up ?? thank you 请教@kang圣骑士,能否给出SRV01和SRV02上执行: netstat -an |grep LISTEN的结果? 如此好文,不顶对不起楼主了。 原帖由 ypingyuan 于 2007-1-7 21:54 发表请教@kang圣骑士,能否给出SRV01和SRV02上执行: netstat -an |grep LISTEN的结果?
SRV01 主 SRV02 辅
在平常,共用的那个ip是SRV01持有的。
除非SRV01倒闭了,那么就SRV02用上。
如果配置的正确的话,SRV01活过来了,IP再被SRV01抢回去。 原帖由 ypingyuan 于 2007-1-7 21:54 发表
请教@kang圣骑士,能否给出SRV01和SRV02上执行: netstat -an |grep LISTEN的结果?
為什麼呢?netstat -an |grep LISTEN 結果對你會有幫助嗎?
SRV01# netstat -an |grep LISTEN
tcp4 0 0127.0.0.1.10024 *.* LISTEN
tcp4 0 0*.21 *.* LISTEN
tcp4 0 0*.22 *.* LISTEN
tcp6 0 0*.22 *.* LISTEN
tcp4 0 0*.143 *.* LISTEN
tcp6 0 0*.143 *.* LISTEN
tcp4 0 0*.110 *.* LISTEN
tcp6 0 0*.110 *.* LISTEN
tcp4 0 0127.0.0.1.10025 *.* LISTEN
tcp4 0 0*.25 *.* LISTEN
tcp4 0 0*.873 *.* LISTEN
tcp6 0 0*.873 *.* LISTEN
tcp4 0 0127.0.0.1.783 *.* LISTEN
tcp4 0 0*.3306 *.* LISTEN
tcp46 0 0*.443 *.* LISTEN
tcp46 0 0*.80 *.* LISTEN
SRV02一樣