DR模式下,返回给客户机的IP是某一台realserver的IP,而不是director的IP,为啥呢?

1 Director 真实IP:172.17.35.152,虚拟IP:172.17.35.136;
2 RealServer1 IP: 172.17.35.149
3 RealServer2 IP: 172.17.35.202
director配置为路由模式,开启TCP和UDP转发(分别不同的端口号)。
realserver1 and realserver2上开启UDP接收端程序,客户端发送UDP包到director的虚拟IP,realserver1接收到此包,并回报,但是在客户端使用wireshark抓包,显示源端地址是realserver1的地址。这是为啥?

脚本记不太清了,在办公室机器上,明天发上来。

Forums:

director的脚本:
ifconfig eth0:0 172.17.35.136 broadcast 172.17.35.255 netmask 255.255.255.255 up
route add -host 172.17.35.136 dev eth0:0
echo "1" > /proc/sys/net/ipv4/ip_forward

ipvsadm -C
ipvsadm -A -u 172.17.35.136:9000 -s rr
ipvsadm -A -t 172.17.35.136:7000 -s rr

ipvsadm -a -u 172.17.35.136:9000 -r 172.17.35.149:9000 -g
ipvsadm -a -u 172.17.35.136:9000 -r 172.17.35.202:9000 -g

ipvsadm -a -t 172.17.35.136:7000 -r 172.17.35.149:7000 -g
ipvsadm -a -t 172.17.35.136:7000 -r 172.17.35.202:7000 -g

#启用LVS服务
ipvsadm

realserver的脚本:
ifconfig lo:0 172.17.35.136 broadcast 172.17.35.136 netmask 255.255.255.255 up
route add -host 172.17.35.136 dev lo:0

echo "1" > /proc/sys/net/ipv4/conf/all/arp_ignore
echo "2" > /proc/sys/net/ipv4/conf/lo/arp_announce
echo "2" > /proc/sys/net/ipv4/conf/all/arp_announce

Shiver me timbers, them's some great inimaortfon.

That's a smart way of loikong at the world.

That's not just the best anwsre. It's the bestest answer!

following aspects auto insurance safe driving people quit cheap car insurance quotes maybe research appropriately massachusetts insurance auto more specifically

randomness