歡迎來到Linux教程網
Linux教程網
Linux教程網
Linux教程網
Linux教程網 >> Unix知識 >> 關於Unix >> Solaris IPMP 配置

Solaris IPMP 配置

日期:2017/2/28 11:13:26   编辑:關於Unix


IPMP(IPNetwork Multipathing)是Solaris產品中的一個主要特性,其目的在於:一、增加網絡的吞吐量,可方便快捷的將幾個網絡接口綁定在一起使用,從而起到增加帶寬的作用。二、實現網絡接口的有效性,通過IPMP,可以做到網絡接口的冗余使用,即使宕掉一塊網卡,其他的網卡均能有效運行,並且壞掉的網卡上的業務IP不會丟失,將平滑轉移到其他網卡上。
配置方法:
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地址,其實很簡單,每個網卡必須都有一個IP地址,所以三個網卡就是三個IP地址,那麼你必須賦予一個接口一個測試地址.這個地址必須是可以路由的地址,用來監控每個接口的狀態,錯誤檢測以及恢復,如此算來,一個是6個地址。
2、配置MAC地址,以免沖突
你需要在eeprom裡修改local-mac-address?的值為true
具體命令如下:
# eeprom local-mac-address?=true
3、配置網卡地址
這時候你需要配置hostname.xxx,xxx是你對應的三個網卡設備名,我的網卡設備名分別是pcn0、pcn1、pcn2。將下面列出的內容寫如你對應的文件中。
# 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、測試容余
強行使網卡failover
#if_mpadm -d pcn2
這時你會觀察到,pcn2上的地址和pcn0上的地址都轉移到了pcn1上
重新啟用網卡
#if_mpadm -r pcn2
因為我是用虛擬機搭建的環境,沒有做進一步的測試。如果大家有實驗環境的話,可以拔網線試試,或者上傳一個比較大的文件測試一下讀寫速度。
Copyright © Linux教程網 All Rights Reserved