lvs/dr配置

lvs/dr

Director server :

  DIP:192.168.1.100/24  eth0

  VIP:192.168.1.101/24  eth0:0

Real server:

  Real1:

  RIP:192.168.1.200/24 

  VIP:192.168.1.101/24  lo:0

  Real2:

  RIP:192.168.1.201/24

  VIP:192.168.1.101/24  lo:0

Director Server配置:

  echo 1 >/proc/sys/net/ipv4/ip_forward

  ifconfig eth0:0 192.168.1.101 broadcast 192.168.1.255 netmask 255.255.255.0 up

  route add -host 192.168.1.101 dev eth0:0

  ivpsadm -At 192.168.1.101:80 -s wlc -p 1200

  ivpsadm -at 192.168.1.101:80 -r 192.168.1.200 -g -w 1

  ivpsadm -at 192.168.1.101:80 -r 192.168.1.201 -g -w 1

 

Real server:

  两台一样:

  echo 1>/proc/sys/net/ipv4/conf/lo/arp_ignore

  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/apr_announce

  

  ifconfig lo:0 192.168.1.101 broadcast 192.168.0.101 netmask 255.255.255.255 up

  route add -host 192.168.1.101 dev lo:0

 

posted @ 2015-12-30 16:44  Echo/  阅读(208)  评论(0编辑  收藏  举报