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的地址。这是为啥?
脚本记不太清了,在办公室机器上,明天发上来。
smilenie
周六, 2014-09-13 01:23
Permalink
director的脚本: ifconfig
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
Anonymous (没有被验证)
周二, 2014-09-23 19:02
Permalink
cool הורדה
cool
הורדה מיוטיוב הורדת שירים הורדת שירים מיוטיוב
Anonymous (没有被验证)
周五, 2014-12-19 20:06
Permalink
QdDKfalzZEfh
Shiver me timbers, them's some great inimaortfon.
Anonymous (没有被验证)
周二, 2014-12-23 12:57
Permalink
ijIjZjwcSGs
That's a smart way of loikong at the world.
Anonymous (没有被验证)
周一, 2015-11-09 17:53
Permalink
dOtlClsaoaybVYH
That's not just the best anwsre. It's the bestest answer!
Anonymous (没有被验证)
周五, 2014-12-26 05:32
Permalink
mcNdAcctjjHCqLxGHhV
online life insurance
Anonymous (没有被验证)
周一, 2014-12-29 00:03
Permalink
WdGcEYzPvtVifHVafQ
cialis online
Anonymous (没有被验证)
周四, 2015-02-26 19:33
Permalink
FtgFSNxzaRtn
following aspects auto insurance safe driving people quit cheap car insurance quotes maybe research appropriately massachusetts insurance auto more specifically