Chinaunix首页 | 论坛 | 博客
  • 博客访问: 667097
  • 博文数量: 128
  • 博客积分: 265
  • 博客等级: 二等列兵
  • 技术积分: 1464
  • 用 户 组: 普通用户
  • 注册时间: 2011-09-27 20:44
个人简介

just do it

文章分类

全部博文(128)

文章存档

2023年(1)

2020年(1)

2019年(1)

2018年(3)

2017年(6)

2016年(17)

2015年(16)

2014年(39)

2013年(34)

2012年(10)

分类: 系统运维

2012-08-07 10:37:21


bash-3.00# eeprom local-mac-addresstrue     //使系统中网络接口使用不同的mac地址

 

bash-3.00# cat /etc/hosts

#

# Internet host table

#

::1     localhost      

127.0.0.1       localhost      

192.168.0.20    oracle  loghost         #浮动ip

192.168.0.21    test2       #hme0网卡接口测试ip

192.168.0.22    test1       #eri0网卡接口测试ip

 

 

bash-3.00# cat /etc/hostname.eri0

oracle

test1 netmask 255.255.255.0 broadcast 192.168.0.255 deprecated -failover group ipmptest up addif 192.168.0.20 netmask 255.255.255.0 broadcast 192.168.0.255 up

 

bash-3.00# cat /etc/hostname.hme0

192.168.0.21

test2 netmask 255.255.255.0 broadcast 192.168.0.250 deprecated -failover group ipmptest up standby up

 

reboot后:

bash-3.00# ifconfig -a

lo0: flags=2001000849 mtu 8232 index 1

        inet 127.0.0.1 netmask ff000000

eri0: flags=9040843 mtu 1500 index 2

        inet 192.168.0.22 netmask ffffff00 broadcast 192.168.0.255

        groupname ipmptest

        ether 0:3:ba:f0:c1:20

eri0:1: flags=1000843 mtu 1500 index 2

        inet 192.168.0.20 netmask ffffff00 broadcast 192.168.0.255

hme0: flags=69040843 mtu 1500 index 3

        inet 192.168.0.21 netmask ffffff00 broadcast 192.168.0.255

        groupname ipmptest

        ether 0:3:ba:1:f:7a

bash-3.00#

 

使用命令测试 IPMP是否配置成功也可以用拔网线的方式测试:

bash-3.00# if_mpadm -d eri0          //手动使网卡eri0 offline,看ip是否漂移到另一块网卡接口hme0

bash-3.00# ifconfig -a                    //ifconfig -a 命令查看发现ip漂移到hme0接口

lo0: flags=2001000849 mtu 8232 index 1

        inet 127.0.0.1 netmask ff000000

eri0: flags=89040842 mtu 1500 index 2

        inet 192.168.0.22 netmask ffffff00 broadcast 192.168.0.255

        groupname ipmptest

        ether 0:3:ba:f0:c1:20

hme0: flags=29040843 mtu 1500 index 3

        inet 192.168.0.21 netmask ffffff00 broadcast 192.168.0.255

        groupname ipmptest

        ether 0:3:ba:1:f:7a

hme0:1: flags=21000843 mtu 1500 index 3

        inet 192.168.0.20 netmask ffffff00 broadcast 192.168.0.255

bash-3.00#

bash-3.00# tail -f /var/adm/messages                   //系统日志信息说明ip成功切换到了hme0网卡接口

May 19 13:41:41 oracle in.mpathd[172]: [ID 215189 daemon.error] The link has gone down on eri0

May 19 13:41:41 oracle in.mpathd[172]: [ID 168056 daemon.error] All Interfaces in group ipmptest have failed

May 19 13:41:52 oracle in.mpathd[172]: [ID 299542 daemon.error] NIC repair detected on hme0 of group ipmptest

May 19 13:41:52 oracle in.mpathd[172]: [ID 237757 daemon.error] At least 1 interface (hme0) of group ipmptest has repaired

May 19 13:41:52 oracle in.mpathd[172]: [ID 832587 daemon.error] Successfully failed over from NIC eri0 to NIC hme0

May 19 13:44:25 oracle eri: [ID 786680 kern.notice] SUNW,eri0 : 100 Mbps full duplex link up

May 19 13:44:25 oracle in.mpathd[172]: [ID 820239 daemon.error] The link has come up on eri0

May 19 13:44:40 oracle in.mpathd[172]: [ID 299542 daemon.error] NIC repair detected on eri0 of group ipmptest

May 19 13:44:40 oracle in.mpathd[172]: [ID 620804 daemon.error] Successfully failed back to NIC eri0

May 19 16:27:26 oracle in.mpathd[172]: [ID 832587 daemon.error] Successfully failed over from NIC eri0 to NIC hme0

 

 

bash-3.00# if_mpadm -r eri0                 //重新将eri0网卡 online

bash-3.00# ifconfig -a                           //查看结果,成功切换回eri0网卡

lo0: flags=2001000849 mtu 8232 index 1

        inet 127.0.0.1 netmask ff000000

eri0: flags=9040843 mtu 1500 index 2

        inet 192.168.0.22 netmask ffffff00 broadcast 192.168.0.255

        groupname ipmptest

        ether 0:3:ba:f0:c1:20

eri0:1: flags=1000843 mtu 1500 index 2

        inet 192.168.0.20 netmask ffffff00 broadcast 192.168.0.255

hme0: flags=69040843 mtu 1500 index 3

        inet 192.168.0.21 netmask ffffff00 broadcast 192.168.0.255

        groupname ipmptest

        ether 0:3:ba:1:f:7a

bash-3.00#

bash-3.00# tail -f /var/adm/messages              //观察系统日志信息,成功切换回网卡eri0

May 19 13:41:41 oracle in.mpathd[172]: [ID 168056 daemon.error] All Interfaces in group ipmptest have failed

May 19 13:41:52 oracle in.mpathd[172]: [ID 299542 daemon.error] NIC repair detected on hme0 of group ipmptest

May 19 13:41:52 oracle in.mpathd[172]: [ID 237757 daemon.error] At least 1 interface (hme0) of group ipmptest has repaired

May 19 13:41:52 oracle in.mpathd[172]: [ID 832587 daemon.error] Successfully failed over from NIC eri0 to NIC hme0

May 19 13:44:25 oracle eri: [ID 786680 kern.notice] SUNW,eri0 : 100 Mbps full duplex link up

May 19 13:44:25 oracle in.mpathd[172]: [ID 820239 daemon.error] The link has come up on eri0

May 19 13:44:40 oracle in.mpathd[172]: [ID 299542 daemon.error] NIC repair detected on eri0 of group ipmptest

May 19 13:44:40 oracle in.mpathd[172]: [ID 620804 daemon.error] Successfully failed back to NIC eri0

May 19 16:27:26 oracle in.mpathd[172]: [ID 832587 daemon.error] Successfully failed over from NIC eri0 to NIC hme0

May 19 16:33:24 oracle in.mpathd[172]: [ID 620804 daemon.error] Successfully failed back to NIC eri0

 

 

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