- 论坛徽章:
- 0
|
IPMP功能简单的说就是:1.避免由于网络硬件故障造成网络不畅并能平滑的恢复网络!2.IPMP还能实现在网络负荷较重的情况下实现多块网卡之间的数据分流和均衡。
实验环境:SF3800(带两块hme网卡)
配置前网络信息:
[email=root@sf3800]root@sf3800[/email]
# ifconfig -a
lo0: flags=1000849 mtu 8232 index 3
inet 127.0.0.1 netmask ff000000
hme0: flags=1000843 mtu 1500 index 4
inet 192.168.0.110 netmask ffffff00 broadcast 192.168.0.255
ether 0:3:ba:17:8a:f
hme1: flags=1000843 mtu 1500 index 5
inet 192.168.0.111 netmask ffffff00 broadcast 192.168.0.255
ether 0:3:ba:17:8f:dc
================================
1.建立Multipathing Group,把hme0和hm1加入test_group:
[email=root@sf3800]root@sf3800[/email]
# ifconfig hme0 group test_group
[email=root@sf3800]root@sf3800[/email]
# ifconfig hme1 group test_group
2.实现网卡之间active-active工作方式:
[email=root@sf3800]root@sf3800[/email]
# ifconfig hme0 addif 192.168.0.109 deprecated -failover up
[email=root@sf3800]root@sf3800[/email]
# ifconfig hme1 addif 192.168.0.112 deprecated -failover up
3.查看网络配置:
[email=root@sf3800]root@sf3800[/email]
# ifconfig -a
lo0: flags=1000849 mtu 8232 index 3
inet 127.0.0.1 netmask ff000000
hme0: flags=1000843 mtu 1500 index 4
inet 192.168.0.110 netmask ffffff00 broadcast 192.168.0.255
groupname test_group
ether 0:3:ba:17:8a:f
hme0:1: flags=9040843 mtu 1500 index 4
inet 192.168.0.109 netmask ffffff00 broadcast 192.168.0.255
hme1: flags=1000843 mtu 1500 index 5
inet 192.168.0.111 netmask ffffff00 broadcast 192.168.0.255
groupname test_group
ether 0:3:ba:17:8f:dc
hme1:1: flags=9040843 mtu 1500 index 5
inet 192.168.0.112 netmask ffffff00 broadcast 192.168.0.255
=======================================================================
好了,IPMP配置完成,下面检验一下效果:
当你把hme0网卡网线拔掉是,在/var/adm/message 里面出现下面信息:
Sep 26 16:13:06 sf3800 hme: [ID 786680 kern.notice] SUNW,hme0 : No response from Ethernet network : Link down -- cable problem?
Sep 26 16:13:13 sf3800 in.mpathd[910]: [ID 594170 daemon.error] NIC failure detected on hme0 of group test_group
Sep 26 16:13:13 sf3800 in.mpathd[910]: [ID 832587 daemon.error] Successfully failed over from NIC hme0 to NIC hme1
这时你发现机器网络情况是正常的,因为系统自动把 hme0 failover 到hme1上。
当你插上hme0网线时,/var/adm/messages里面出现:
Sep 26 16:13:19 sf3800 hme: [ID 786680 kern.notice] SUNW,hme0 : Internal Transceiver Selected.
Sep 26 16:13:19 sf3800 hme: [ID 786680 kern.notice] SUNW,hme0 : 100 Mbps Full-Duplex Link Up
Sep 26 16:13:28 sf3800 in.mpathd[910]: [ID 299542 daemon.error] NIC repair detected on hme0 of group test_group
Sep 26 16:13:28 sf3800 in.mpathd[910]: [ID 620804 daemon.error] Successfully failed back to NIC hme0
这时系统又自动failback 到hme0网卡上了。
本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u/6109/showart_49442.html |
|