我把大概的环境在下面列出: 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