Chinaunix首页 | 论坛 | 博客
  • 博客访问: 41758
  • 博文数量: 11
  • 博客积分: 1410
  • 博客等级: 上尉
  • 技术积分: 130
  • 用 户 组: 普通用户
  • 注册时间: 2006-01-24 12:37
文章分类
文章存档

2006年(11)

我的朋友
最近访客

分类:

2006-07-04 12:41:04

    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

因为我是用虚拟机搭建的环境,没有做进一步的测试。如果大家有实验环境的话,可以拔网线试试,或者上传一个比较大的文件测试一下读写速度。

阅读(1017) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~