RedHat 8 0 9 0 LVS安裝手冊 3

2021-03-31 08:57:01 字數 2811 閱讀 8212

part ii:lvs設定

系統架構

一、簡易設定:

1、ip tunnel的設定:

load balance : 10.144.43.175(nb8048)

real server:10.144.43.142(linux142)、10.144.43.187(linux187)

virtual ip :10.144.43.185(vip)

nb8048上面的設定:

1、先建立乙個subinte***ce

# ifconfig eth0:0 10.144.43.185 ***mask 255.255.255.255 broadcast ||

10.144.43.185 up

2、建立ip tunnel的rule

2.1、先開啟ip forwarding

# echo 1 > /proc/sys/***/ipv4/ip_forward

2.2、建立ip tunnel的rule,先建立service

# ipvsadm -a -t 10.144.43.185:23 -s wlc

2.3、加入兩台real server的ip

# ipvsadm -a -t 10.144.43.185:23 -r 10.144.43.187 -i

# ipvsadm -a -t 10.144.43.185:23 -r 10.144.43.142 -i

linux142與linux187上面的設定:

1、另外建立乙個tunnel0

# ifconfig tunl0 10.144.43.185 ***mask 255.255.255.255 broadcast 10.144.43.185

2、將host加入routing table

# route add -host 10.144.43.185 dev tunl0

3、將介面的hidden屬性開啟:

# echo 1 > /proc/sys/***/ipv4/ip_forward

# echo 1 > /proc/sys/***/ipv4/conf/all/hidden

# echo 1 > /proc/sys/***/ipv4/conf/tunl0/hidden

2、direct routing的設定

load balance:10.144.43.175

virtual ip: 10.144.43.185

realserver1:10.144.43.175(nb8048)

realserver2:10.144.43.142(linux142)

realserver3:10.144.43.187(linux187)

網路架構圖如上所示,其中dr與realserver1、realserver2在同乙個網段,其ip address配置如附圖,基本設定如下,包含避免arp problem的設定:

dr(direct routing server):

# ifconfig eth0 10.144.43.175 ***mask 255.255.255.0 broadcast 10.144.43.255

# route add -*** 10.144.43.0 dev eth0

# ifconfig eth0:0 10.144.43.185 ***mask 255.255.255.255 broadcast 10.144.43.185

# echo 1 > /proc/sys/***/ipv4/ip_forward

# ipvsadm -a -t 10.144.43.185:23 -s rr (用round robin方式)

# ipvsadm -a -t 10.144.43.185:23 -r 10.144.43.175 -g

# ipvsadm -a -t 10.144.43.185 :23 -r 10.144.43.142 -g

# ipvsadm -a -t 10.144.43.185 :23 -r 10.144.43.187 -g

realserver1 與realserver2的設定:

# ifconfig eth0 10.144.43.142 ***mask 255.255.255.0 broadcast 10.144.43.255

# route add -*** 10.144.43.0 dev eth0

# ifconfig lo:0 10.144.43.185 ***mask 255.255.255.255 broadcast 10.144.43.185

# route add -host 10.144.43.185 dev lo:0

# echo 1 > /proc/sys/***/ipv4/ip_forward

# echo 1 > /proc/sys/***/ipv4/conf/all/hidden

# echo 1 > /proc/sys/***/ipv4/conf/lo/hidden

測試:

從10.16.1.16機器上,對10.144.43.185作tel*** 測試,三次聯機三次都連到不同的server,所以測試正常。

安裝LVS安裝LVS和配置LVS的工作比較繁雜

networking options packet socket netlink device emulation tcp ip networking ip advanced router network packet filtering replaces ipchains ip netfilter...

Android8 0 9 0安裝包解析失敗

順便附上6.0 7.0裝置解決方案 一 裝置6.0 private val permissionslist arraylist private fun requestpermissions override fun onrequestpermissionsresult requestcode int...

redhat下面安裝wireshark

第一步 在windows下紅帽企業版5的.iso檔案中找到下面四個包,用samba共享給虛擬機器。也可以用掛載 mount dev cdrom mnt cdrom 掛載 cd mnt cdrom 進入掛載目錄 找到4個包,一般都會有的。可能要花點時間。我的是在server這個目錄下。lm senso...