找了个方法,但是试了一下,不行
For VS/TUN clusters, you can simply configure tunl0 up so that the system can decapsulate ipip packets properly, then add the REDIRECT commands for VIPs.
For iptables in kernel 2.4, you can use it as follows:
[quote:57e7b7b607="lues"]我也想用VS/TUN方式来架设LVS集群,我现在用的操作系统是REDHAT LINUX AS 3.0,它的内核已经直接支持IPVS了,那我该怎么解决no arp的问题呢?我看到的配置过程都说要重新编译内核,有没有不重新编译内核的解决方法呢?[/quote]
要使用 TUN或者 DR 模式, 内核应该是一定要打补丁并重新编译了。
因为 TUN 模式和 DR 模式都存在一个各服务器都有相同虚拟 IP 的问题,所以都是需要禁掉 ARP 响应的,见 http://www.linux-vs.org/docs/arp.html。
我的HA配置如下
[root@test9 ha.d]# more /etc/hosts
# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1 test9 localhost.localdomain localhost
10.0.0.2 test9
210.75.11.36 test9
10.0.0.9 test3
210.75.11.34 test3