http://192.168.1.226/bs访问真机192.168.1.231:80 不能转发
[root@lvs1 ~]# ipvsadm -lcn用这命令看没转发
IPVS connection entries
pro expire state source virtual destination
[root@lvs1 ~]# tail -f /var/log/messages 看日志发现 IPVS: Service not defined
Oct 20 14:12:07 lvs1 Keepalived_healthcheckers: Adding service [192.168.1.231:80] to VS [192.168.1.226:80]
Oct 20 14:12:07 lvs1 Keepalived_healthcheckers: IPVS: Service not defined
出现IPVS: Service not defined是不是ipvsadm坏了?我换了另一台装ipvsadm才能转发。
目前有5台机,打算这样配置
1. LB + Firewall + DNS ( Haproxy )
2. Web A ( Apache + Postfix )
3. Web B ( Apache + Postfix )
4. Database A ( MYSQL )
5. Database B ( MYSQL )
IP有3个。
VIP=xxx.xxx.xxx.100
RIP1=xxx.xxx.xxx.101
RIP2=xxx.xxx.xxx.102
NAT
Web A IP xxx.xxx.xxx.100 port 12301 (192.168.0.10)
Web B IP xxx.xxx.xxx.100 port 12302 (192.168.0.20)
Database A IP xxx.xxx.xxx.100 port 12303 (192.168.0.30)
Database B IP xxx.xxx.xxx.100 port 12304 (192.168.0.40)