潜龙勿用,见龙在田
全部博文(540)
分类: LINUX
2010-10-26 14:52:14
LVS/NAT:
LB:
eth0:ipvsadm -A -t 192.168.57.126:8080 -s wlc -p 30
ipvsadm -a -t 192.168.57.126:8080 -r 10.10.57.122:8080 -w 10 -m
ipvsadm -a -t 192.168.57.126:8080 -r 10.10.57.123:80 -w 10 -m
ip addr add 192.168.57.126/24 brd 192.168.57.255 dev eth0 label eth0:126
ip addr add 10.10.57.2/24 brd 10.10.57.255 dev eth1 label eth1:2
echo "1" >/proc/sys/net/ipv4/ip_forward #LVS/NAT模式必须要开启包转发
RS:
关闭eth0端口, eth1端口的网关必须配置为10.10.57.2,并确保默认路由为eth1,否则不能返回应答包.