在设置LVS中遇到问题,把VIP设置为实际的对外IP时不能正常运行

Virtual IP: 192.168.136.10
Load Balancer: 192.168.136.11
Backup: 192.168.136.12
Real Server 1: 192.168.136.101
Real Server 2: 192.168.136.102
Real Server 3: 192.168.136.103

这Virtual IP的作用是什么?只是一个虚拟的IP,还是一台真实的机器?

在设置LVS中遇到问题,把VIP设置为实际的对外IP时不能正常运行

Forums:

只是集群对外的统一IP

Virtual IP是客户所要浏览网站时用的ip,在dns域名解析指向设定时,也得指向此ip,才能保证客户使用域名访问网站时能正常访问.
Load Balancer 的ip是用来管理的,当然也可以不设置,因为在对外的interface上还要设置Virtual IP,在Load Balancer 上分别指向realserver的ip.
而backup应该只是一个备份机,跟集群并没有很强的依赖性,可以独立出去.

永远隐身黑暗,那里才是我的家...

更糊涂了 ,Virtual IP是用户网站浏览是访问的IP,
但是这个IP要真是存在,要在一个网卡上指定地址,网管,DNS什么的,周末指定啊,指定到哪哪个网卡啊!

VIP 就是一个真实ip,只不过逻辑上,外面人看到的是一个ip,里面却是好几台机器,所以把它叫做VIP,其实并不是一个什么虚拟IP,而是有血有肉的真实IP。 是个概念,不是新技术。

我把这个VIP改为了对外的IP,也就是网卡一的IP地址,这是个真实的IP (192.168.1.131)

另外一网卡就留给内用
192.168.1.132

realserver IP是 192.168.1.121 ,不知道这时的脚本配置文件应该怎么样的呢,以下是我使用脚本中的一部分:

Directorserver 脚本 >>>>>>
VIP=192.168.1.131
/sbin/ifconfig eth0:0 $VIP broadcast $VIP netmask 255.255.255.255 up
/sbin/route add -host $VIP dev eth0:0

realserver 脚本 >>>>>>
VIP=192.168.1.131
/sbin/ifconfig lo:0 $VIP broadcast $VIP netmask 255.255.255.255 up
/sbin/route add -host $VIP dev lo:0

但是这种做法,系统并不能正常运行,刚配置好的30秒钟内可以正常运行,之后就不行了.指向132 时正常,指向 121 时就不能正常返回

#ipvsadm -Lcn
pro expire state source virtual destination
TCP 09:58 ESTABLISHED 192.168.1.100:1670 192.168.1.131:80 192.168.1.121:80
TCP 10:00 ESTABLISHED 192.168.1.100:1672 192.168.1.131:80 192.168.1.121:80
TCP 10:03 ESTABLISHED 192.168.1.100:1674 192.168.1.131:80 192.168.1.121:80
TCP 00:54 SYN_RECV 192.168.1.100:1708 192.168.1.131:80 192.168.1.121:80
TCP 09:55 ESTABLISHED 192.168.1.100:1668 192.168.1.131:80 192.168.1.121:80

另一种做法,把VIP改成是纯虚拟的IP,那很正常
不知道什么原因

Shoot, so that's that one sussppeo.

Hey, sublte must be your middle name. Great post!

Thnkas for taking the time to post. It's lifted the level of debate

priapus erection dark red whole range car insurance ford ka much auto insurance qoutes MI temporary ford ka NC auto insurance qoutes save nj saw New Jersey viagra third New Jersey

active cialis its young drivers Oregon car insurance qoute information quickly know auto insurance qoute IN weather personal auto insurance quote towing labor patience viagra eat decide insurance quotes car married

use vehicles car insurance include dissatisfaction rage viagra online without prescription viagra alone quote tools car insurance quotes more trillion online auto insurance quotes finding georgia physical buy viagra online however

specialist car car rental culture just walk rental car better car rental cars Ivalo airport jaguar mk2 hospitality car rental earlier times major insurers discount car rental rates while

Learning a ton from these neat arlectis.

randomness