Solaris IPMP 配置
IPMP(IPNetwork Multipathing)是Solaris產(chǎn)品中的一個(gè)主要特性,其目的在于:一、增加網(wǎng)絡(luò)的吞吐量,可方便快捷的將幾個(gè)網(wǎng)絡(luò)接口綁定在一起使用,從而起到增加帶寬的作用。二、實(shí)現(xiàn)網(wǎng)絡(luò)接口的有效性,通過IPMP,可以做到網(wǎng)絡(luò)接口的冗余使用,即使宕掉一塊網(wǎng)卡,其他的網(wǎng)卡均能有效運(yùn)行,并且壞掉的網(wǎng)卡上的業(yè)務(wù)IP不會丟失,將平滑轉(zhuǎn)移到其他網(wǎng)卡上。
配置方法:
1、配置/etc/hosts
#
# Internet host table
#
127.0.0.1 localhost
10.4.128.226 s10 loghost # Primary Interface Address
#Modifications made for IPMP
10.4.128.228 s102 # Second Interface Address
10.4.128.230 s103 # Third Interface Address
10.4.128.225 test1 # Primary Test Address
10.4.128.227 test2 # Second Test Address
10.4.128.232 test3 # Third Test Address
可能你會有疑問,為什么需要這么多的IP地址,其實(shí)很簡單,每個(gè)網(wǎng)卡必須都有一個(gè)IP地址,所以三個(gè)網(wǎng)卡就是三個(gè)IP地址,那么你必須賦予一個(gè)接口一個(gè)測試地址.這個(gè)地址必須是可以路由的地址,用來監(jiān)控每個(gè)接口的狀態(tài),錯誤檢測以及恢復(fù),如此算來,一個(gè)是6個(gè)地址。
2、配置MAC地址,以免沖突
你需要在eeprom里修改local-mac-address?的值為true
具體命令如下:
# eeprom local-mac-address?=true
3、配置網(wǎng)卡地址
這時(shí)候你需要配置hostname.xxx,xxx是你對應(yīng)的三個(gè)網(wǎng)卡設(shè)備名,我的網(wǎng)卡設(shè)備名分別是pcn0、pcn1、pcn2。將下面列出的內(nèi)容寫如你對應(yīng)的文件中。
# cat /etc/hostname.pcn0
s10 netmask + broadcast + group mpgrp up \
addif test1 deprecated netmask + broadcast + -failover up
# cat /etc/hostname.pcn1
s102 netmask + broadcast + group mpgrp up \
addif test2 deprecated netmask + broadcast + -failover up
# cat /etc/hostname.pcn2
s103 netmask + broadcast + group mpgrp up \
addif test3 deprecated netmask + broadcast + -failover up
4、重新啟動
#init 6
5、測試容余
強(qiáng)行使網(wǎng)卡failover
#if_mpadm -d pcn2
這時(shí)你會觀察到,pcn2上的地址和pcn0上的地址都轉(zhuǎn)移到了pcn1上
重新啟用網(wǎng)卡
#if_mpadm -r pcn2
因?yàn)槲沂怯锰摂M機(jī)搭建的環(huán)境,沒有做進(jìn)一步的測試。如果大家有實(shí)驗(yàn)環(huán)境的話,可以拔網(wǎng)線試試,或者上傳一個(gè)比較大的文件測試一下讀寫速度。
總結(jié)
以上是生活随笔為你收集整理的Solaris IPMP 配置的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 手机淘宝以秒杀抢滩校园市场
- 下一篇: 沉默是金不如开口为银