SOLARIS IPMP配置实例

IPMP配置

类型一:IPMP组内所有网卡均启用
IP规划如下:
e1000g0:数据IP:192.168.77.1 测试IP:192.168.77.11
e1000g1:数据IP:192.168.77.2 测试IP:192.168.77.22

# ifconfig e1000g0 group test_ipmp
# ifconfig e1000g1 group test_ipmp

# ifconfig e1000g0 addif 192.168.77.11 netmask + broadcast + -failover deprecated up
# ifconfig e1000g0 addif 192.168.77.22 netmask + broadcast + -failover deprecated up

或者(永久生效)
# cat /etc/hostname.e1000g0
192.168.77.1 netmask + broadcast + group test_ipmp up \
addif 192.168.77.11 deprecated -failover netmask + broadcast + up

# cat /etc/hostname.e1000g1
192.168.85.2 netmask + broadcast + group test_ipmp up \
addif 192.168.77.22 deprecated -failover netmask + broadcast + up

类型二:IPMP组内部分网卡设置为standby(待机)接口

设置IPMP为待机接口时,作为standby的网卡只设置测试IP

IP规划如下:
e1000g0:数据IP:192.168.77.1 测试IP:192.168.77.11
e1000g1:测试IP:192.168.77.22

# ifconfig e1000g0 group test_ipmp
# ifconfig e1000g1 group test_ipmp
# ifconfig e1000g0 addif 192.168.77.11 netmask + broadcast + -failover deprecated up
# ifconfig e1000g1 plumb 192.168.77.22 netmask + broadcast + deprecated -failover standby up

或者(永久生效)
# cat /etc/hostname.e1000g0
192.168.77.1 group test_ipmp netmask + broadcast + up \
addif 192.168.77.11 netmask + broadcast + -failover deprecated up

# cat /etc/hostname.e1000g1
192.168.77.22 group test_ipmp netmask + broadcast + deprecated -failover standby up

重启网卡生效
# ifconfig e1000g0 unplumb
# ifconfig e1000g1 unplumb
# ifconfig e1000g0 plumb
# ifconfig e1000g1 plumb
# svcadm restart physical
# ifconfig -a
e1000g0: flags=1000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 14
        inet 192.168.77.1 netmask ffffff00 broadcast 192.168.77.255
        groupname test_ipmp
        ether 0:c:29:c8:6d:b4
e1000g0:1: flags=9040843<UP,BROADCAST,RUNNING,MULTICAST,DEPRECATED,IPv4,NOFAILOVER> mtu 1500 index 14
        inet 192.168.77.11 netmask ffffff00 broadcast 192.168.77.255
e1000g1: flags=69040843<UP,BROADCAST,RUNNING,MULTICAST,DEPRECATED,IPv4,NOFAILOVER,STANDBY,INACTIVE> mtu 1500 index 13
        inet 192.168.77.22 netmask ffffff00 broadcast 192.168.77.255
        groupname test_ipmp
        ether 0:c:29:c8:6d:be

注意:此时e1000g1网卡是STANDBY,INACTIVE的!

模拟故障:
bash-3.00# if_mpadm -d e1000g0   #停用e1000g0网卡
bash-3.00# ifconfig -a
lo0: flags=2001000849<UP,LOOPBACK,RUNNING,MULTICAST,IPv4,VIRTUAL> mtu 8232 index 1
        inet 127.0.0.1 netmask ff000000
e1000g0: flags=89000842<BROADCAST,RUNNING,MULTICAST,IPv4,NOFAILOVER,OFFLINE> mtu 0 index 14
        inet 0.0.0.0 netmask 0
        groupname test_ipmp
        ether 0:c:29:c8:6d:b4
e1000g0:1: flags=89040842<BROADCAST,RUNNING,MULTICAST,DEPRECATED,IPv4,NOFAILOVER,OFFLINE> mtu 1500 index 14
        inet 192.168.77.11 netmask ffffff00 broadcast 192.168.77.255
e1000g1: flags=29040843<UP,BROADCAST,RUNNING,MULTICAST,DEPRECATED,IPv4,NOFAILOVER,STANDBY> mtu 1500 index 13
        inet 192.168.77.22 netmask ffffff00 broadcast 192.168.77.255
        groupname test_ipmp
        ether 0:c:29:c8:6d:be
e1000g1:1: flags=21000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4,STANDBY> mtu 1500 index 13
        inet 192.168.77.1 netmask ffffff00 broadcast 192.168.77.255
在IPMP切换时,故障网卡会分配一个0.0.0.0的伪IP!

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值