lvs-DR+keepalived rip与vip不在同一网段,请问如何设置?请各位大神给些建议

我把大概的环境在下面列出:
LVS1:eth0(192.168.1.51) eth1(192.168.153.11)
注:eth1主要作用是连接realserver
LVS2:eth0(192.168.1.52) eth1 (192.168.153.12)
WEB1:eth0(192.168.153.14) lo:0(192.168.1.50)

下边是keepalived.conf中截取的一部分代码:
virtual_server 192.168.1.50 80 {
delay_loop 6
lb_algo rr
lb_kind DR
nat_mask 255.255.255.0
#persistence_timeout 50
protocol TCP

    real_server 192.168.153.13 80 {                        
    weight 1
    TCP_CHECK {
    connect_timeout 3
    nb_get_retry 3
    delay_before_retry 3
    }
}

     real_server 192.168.153.14 80 {
    weight 1
    TCP_CHECK {
    connect_timeout 3
    nb_get_retry 3
    delay_before_retry 3
    }
}

}
WEB端:
[root@WEB2 network-scripts]# cat /etc/sysctl.conf | egrep "ignore|announce"
net.ipv4.conf.all.arp_ignore = 1
net.ipv4.conf.lo.arp_ignore = 1
net.ipv4.conf.lo.arp_announce = 2
net.ipv4.conf.all.arp_announce = 2

问题:
在用客户端浏览器访问http://192.168.1.51,无法访问。

LVS1中的显示:
[root@DR1 ~]# ipvsadm -Lnc
IPVS connection entries
pro expire state source virtual destination
TCP 00:57 SYN_RECV 192.168.1.9:10988 192.168.1.50:80 192.168.153.14:80
TCP 00:58 SYN_RECV 192.168.1.9:10989 192.168.1.50:80 192.168.153.14:80

转载于:https://blog.51cto.com/1194090/2336920

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值