注册 登录
热血神器论坛请不要百度等搜索引擎来搜索,以免搜到假冒论坛 返回首页

mxf5b3ob2ei的个人空间 http://bbs.rxjhshenqi.com/?81343 [收藏] [复制] [分享] [RSS]

日志

Linux Virtual Server?作??(VS NAT) (VS TUN) (VS DR)

已有 224 次阅读2013-9-9 20:12

Linux Virtual Server?作??(VS/NAT) (VS/TUN) (VS/DR) 来源: ChinaUnix博客  日期:2008.09.11 16:25 (共有条评论) ?境:
Load Balancer:kernel 2.6.x 已?建 LVS 模?kernel 2.4.x 需打

Fedora Core 3 ??安?即可使用 LVS 模?, 另以 yum 安? ipvsadm 套件
如?法以 yum 安? ipvsadm, 可?

下?
 Real Server:VS/NAT 可使用任何平台的?路伺服器? Real ServerVS/TUN 需支援 IP TunnelingVS/DR 需支援 Non-ARP ?路????化???境, 本篇 Load Balancer ? Real Server 皆? Fedora Core 3
Virtual Server via NAT (VS/NAT)

screen.width*0,wfbz.devhub.com.7) {this.resized=true; this.width=screen.width*0.7; this.alt='Click here to open new window\nCTRL+Mouse wheel to zoom in/out';}" onmouseover="if(this.width>screen.width*0.7) {this.resized=true; this.width=screen.width*0.7; this.style.cursor='hand'; this.alt='Click here to open new window\nCTRL+Mouse wheel to zoom in/out';}" onclick="if(!this.resized) {return true;} else {window.open('');}" onmousewheel="return imgzoom(this);" alt="" />
Load Balancer:
eth1 (?外): 10.2.0.1
eth0 (??): 192.168.1.254
#vi /etc/sysctl.conf
net.ipv4.ip_forward = 1
#sysctl -p
#iptables -t nat -A POSTROUTING -s 192.168.1.0/24 -j MASQUERADE
#ipvsadm -C
#ipvsadm -A -t 10.2.0.1:80 -s rr
#ipvsadm -a -t 10.2.0.1:80 -r 192.168.1.1:80 -m
#ipvsadm -a -t 10.2.0.1:80 -r 192.168.1.2:80 -m
Real Server:
Default Gateway 指向 Director 的 LAN IP
Virtual Server via IP Tunneling (VS/TUN)

screen.width*0.7) {this.resized=true; this.width=screen.width*0.7; this.alt='Click here to open new window\nCTRL+Mouse wheel to zoom in/out';}" onmouseover="if(this.width>screen.width*0.7) {this.resized=true; this.width=screen.width*0.7; this.style.cursor='hand'; this.alt='Click here to open new window\nCTRL+Mouse wheel to zoom in/out';}" onclick="if(!this.resized) {return true;} else {window.open('');}" onmousewheel="return imgzoom(this);" alt="" />
Load Balancer:
eth0: 10.2.0.1
eth0:0: 10.2.0.2
#vi /etc/sysctl.conf
net.ipv4.ip_forward = 1
#sysctl -p
#ifconfig eth0:0 10.2.0.2 netmask 255.255.255.255 up
#ipvsadm -C
#ipvsadm -A -t 10.2.0.2:80 -s rr
#ipvsadm -a -t 10.2.0.2:80 -r 10.2.0.11:80 -i
#ipvsadm -a -t 10.2.0.2:80 -r 10.2.0.12:80 -i
Real Server:
#vi /etc/sysctl.conf
net.ipv4.ip_forward = 1
net.ipv4.conf.all.arp_ignore = 1
net.ipv4.conf.all.arp_announce = 2
#sysctl -p
#ifconfig tunl0 10.2.0.2 netmask 255.255.255.255 up
#route add -host 10.2.0.2 dev tunl0
ps. 以上是 Real Server ? Director 在同一? LAN 的 IP Tunneling, 跨 WAN 的 IP Tunneling ?搞不清楚... Orz
Virtual Server via Direct Routing (VS/DR)

screen.width*0.7) {this.resized=true; this.width=screen.width*0.7; this.alt='Click here to open new window\nCTRL+Mouse wheel to zoom in/out';}" onmouseover="if(this.width>screen.width*0.7) {this.resized=true; this.width=screen.width*0.7; this.style.cursor='hand'; this.alt='Click here to open new window\nCTRL+Mouse wheel to zoom in/out';}" onclick="if(!this.resized) {return true;} else {window.open('');}" onmousewheel="return imgzoom(this);" alt="" />
Load Balancer:
eth0: 10.2.0.1
eth0:0: 10.2.0.2
#vi /etc/sysctl.conf
net.ipv4.ip_forward = 1
#sysctl -p
#ifconfig eth0:0 10.2.0.2 netmask 255.255.255.255 up
#ipvsadm -C
#ipvsadm -A -t 10.2.0.2:80 -s rr
#ipvsadm -a -t 10.2.0.2:80 -r 10.2.0.11:80 -g
#ipvsadm -a -t 10.2.0.2:80 -r 10.2.0.12:80 -g
Real Server:
#vi /etc/sysctl.conf
net.ipv4.ip_forward = 1
net.ipv4.conf.lo.arp_ignore = 1
net.ipv4.conf.lo.arp_announce = 2
net.ipv4.conf.all.arp_ignore = 1
net.ipv4.conf.all.arp_announce = 2
#sysctl -p
#ifconfig lo:0 10.2.0.2 netmask 255.255.255.255 up
#route add -host 10.2.0.2 dev lo:0




本文来自ChinaUnix博客,如果查看原文请点:   (共有条评论)

路过

鸡蛋

鲜花

握手

雷人

评论 (0 个评论)

facelist doodle 涂鸦板

您需要登录后才可以评论 登录 | 注册

小黑屋|Archiver|手机版|北京诚盛加业科技有限公司 ( 京ICP证161137号 《网络文化经营许可证》编号:京网文[2018]11620-1068号 京ICP备16034435号 著作权登记号:2018SR532784 )

GMT+8, 2024-5-11 00:40 , Processed in 0.062005 second(s), 8 queries , Memcache On.

Powered by Discuz! X3.2 Licensed

© 2001-2013 Comsenz Inc.

返回顶部