IPMP(IPMultipathing)是Solaris操作系统中重要特性,它将几个网络接口绑定在一起作为一个IPMP组,做到网络接口的冗余。即使其中的一个网络接口发生故障,IPMP上的业务IP不会丢失,会failover到其他接口上,避免了单点故障。IPMP可用于Oracle的RAC的公用网络或私有网络上。基于link的IPMP(LinkBasedIPMP)在Solaris中mpathd守护进程负责探测网络接口的故障与修复,它所用的参数配置文件为/etc/default/mpathd。IPMP根据mpathd探测网络接口故障的方法不同,可分为基于link的IPMP和基于probe的IPMP。基于link的IPMP具有以下特点–mpathd利用网络接口驱动程序进行探测(需要接口硬件支持)–不需要额外的测试IP地址,节省IP资源–默认可用(如果接口硬件支持)在配置IPMP时,有两种模式:Active-Active模式和Active-Standby模式。在Active-Active模式中所有网络接口都要在线处于active状态;在Active-Standby模式中,至少有一个网络接口在线处于active状态,其他网络接口处于standby状态。查看IPMP组中各个网络接口的状态信息可用ipmpstat命令。#ipmpstatusage:ipmpstat[-n][-ofield[-P]]-a|-g|-i|-p|-toutputmodes:-adisplayIPMPdataaddressinformation-gdisplayIPMPgroupinformation-idisplayIPMP-relatedIPinterfaceinformation-pdisplayIPMPprobeinformation-tdisplayIPMPtargetinformationoptions:-ndisplayIPaddressesnumerically-odisplayonlythespecifiedfields,inorder-Pdisplayusingparsableoutputmode在Solaris11上配置LinkBasedIPMP示例1.设置NCP(networkconfigurationprofile)为DefaultFixed.#netadmenable-pncpDefaultFixed查看ncp是否为DefaultFixed.#netadmlistTYPEPROFILESTATEncpDefaultFixedonlinencpAutomaticdisabledlocAutomaticofflinelocNoNetofflinelocDefaultFixedonline2.设置IPMP的transitive-probing属性为false#svccfg-ssvc:/network/ipmpsetpropconfig/transitive-probing=false#svcadmrefreshsvc:/network/ipmp:default查看transitive-probing属性#svccfg-ssvc:/network/ipmplistpropconfig/transitive-probingconfig/transitive-probingbooleanfalse#ipmpstat-pipmpstat:probe-basedfailuredetectionisdisabled3.Active-Active模式(以4个网络接口为例)创建IPMP组ipmp1#ipadmcreate-ipmpipmp1创建网络接口net2,net3,net9和net10#ipadmcreate-ipnet2#ipadmcreate-ipnet3#ipadmcreate-ipnet9#ipadmcreate-ipnet10添加网络接口到ipmp1组中#ipadmadd-ipmp-inet2-inet3-inet9-inet10ipmp1查看ipmp1信息#ipmpstat-gGROUPGROUPNAMESTATEFDTINTERFACESipmp1ipmp1ok--net10net9net3net2#ipmpstat-iINTERFACEACTIVEGROUPFLAGSLINKPROBESTATEnet10yesipmp1-------updisabledoknet9yesipmp1-------updisabledoknet3yesipmp1-------updisabledoknet2yesipmp1--mbM--updisabledok为ipmp1设置IP地址#ipadmcreate-addr-Tstatic-a192.168.57.142/24ipmp1/v4#ipmpstat-aADDRESSSTATEGROUPINBOUNDOUTBOUND192.168.57.142upipmp1net2net10net9net3net2查看ipmp1的IP地址#ipadmshow-addrADDROBJTYPESTATEADDRlo0/v4staticok127.0.0.1/8ipmp1/v4staticok192.168.57.144/244.Active-Standby模式继续上面的例子,把net9和net10转换为standby#ipadmset-ifprop-pstandby=on-mipnet9#ipadmset-ifprop-pstandby=on-mipnet10#ipmpstat-iINTERFACEACTIVEGROUPFLAGSLINKPROBESTATEnet10noipmp1is-----updisabledoknet9noipmp1is-----updisabledoknet3yesipmp1-------updisabledoknet2yesipmp1--mbM--updisabledok从ifconfig命令输出中可以看到net9和net10有STANDBY标志,处于inactive状态。#ifconfig-ainetipmp1:flags=108001000843UP,BROADCAST,RUNNING,MULTICAST,IPv4,IPMP,PHYSRUNNINGmtu1500index9inet192.168.57.142netmaskffffff00broadcast192.168.57.255groupnameipmp1net2:flags=100001000843UP,BROADCAST,RUNNING,MULTICAST,IPv4,PHYSRUNNINGmtu1500index10inet0.0.0.0netmaskff000000broadcast0.255.255.255groupnameipmp1net3:flags=100001000843UP,BROADCAST,RUNNING,MULTICAST,IPv4,PHYSRUNNINGmtu1500index11inet0.0.0.0netmaskff000000broadcast0.255.255.255groupnameipmp1net9:flags=100061000843UP,BROADCAST,RUNNING,MULTICAST,IPv4,STANDBY,INACTIVE,PHYSRUNNINGmtu1500index12inet0.0.0.0netmaskff000000groupnameipmp1net10:flags=100061000843UP,BROADCAST,RUNNING,MULTICAST,IPv4,STANDBY,INACTIVE,PHYSRUNNINGmtu1500index8inet0.0.0.0netmaskff000000groupnameipmp1