配置IPMP
做這個可以把2快網路卡綁成一個網口!
This article demostrates how to set up IPMP on a Solaris 8 host and configure a virtual IP.
Environment:
SunOS denitdb37 5.8 Generic_117350-28 sun4u sparc SUNW,Sun-Fire-V490
Prerequisites:
. a Solaris 8 host is networked to one VLAN via 2 NICs.
. /etc/netmask is configured correctly. e.g.,
# cat /etc/netmasks
10.101.155.0 255.255.255.0
. /etc/defaulterouter is configured correctly. e.g.,
# cat /etc/defaultrouter
10.101.155.1
# wc -l /etc/defaultrouter
0 /etc/defaultrouter
. mpathd is configured correctly. e.g.,
# grep -v ^# /etc/default/mpathd
FAILURE_DETECTION_TIME=10000
FAILBACK=yes
TRACK_INTERFACES_ONLY_WITH_GROUPS=yes
Procedure of IPMP setup on a Solaris 8 host
-------------------------------------------
0. modify /etc/hosts as follows:
127.0.0.1 localhost
10.101.155.123 denitdb37 denitdb37.den.xyz.com loghost
10.101.155.124 denitdb37-if0
10.101.155.125 denitdb37-if1
1. log onto the system console as root.
2. deconfigure the 2 NICs, e.g.:
# ifconfig ce0 unplumb
# ifconfig ce6 unplumb
# ifconfig -a
lo0: flags=1000849
inet 127.0.0.1 netmask ff000000
3. plumb the 2 NICs.
# ifconfig ce0 plumb
# ifconfig ce6 plumb
4. configure IPMP on the 2 NICs.
4.1 configure the first interface.
# ifconfig ce0 denitdb37-if0 group denitdb37 deprecated netmask + broadcast + -failover up
Setting netmask of ce0 to 255.255.255.0
# ifconfig -a
lo0: flags=1000849
inet 127.0.0.1 netmask ff000000
ce0: flags=9040843
inet 10.101.155.124 netmask ffffff00 broadcast 10.101.155.255
groupname denitdb37
ether 0:14:4f:24:86:70
4.2 configure the second interface.
# ifconfig ce6 denitdb37-if1 group denitdb37 deprecated -failover netmask + broadcast + up
Setting netmask of ce6 to 255.255.255.0
denitdb37# ifconfig -a
lo0: flags=1000849
inet 127.0.0.1 netmask ff000000
ce0: flags=9040843
inet 10.101.155.124 netmask ffffff00 broadcast 10.101.155.255
groupname denitdb37
ether 0:14:4f:24:86:70
ce6: flags=9040843
inet 10.101.155.125 netmask ffffff00 broadcast 10.101.155.255
groupname denitdb37
ether 0:14:4f:0:f4:91
4.3 configure IP of the host
# ifconfig ce0 addif denitdb37 netmask + broadcast + failover up
Created new logical interface ce0:1
Setting netmask of ce0:1 to 255.255.255.0
# ifconfig -a
lo0: flags=1000849
inet 127.0.0.1 netmask ff000000
ce0: flags=9040843
inet 10.101.155.124 netmask ffffff00 broadcast 10.101.155.255
groupname denitdb37
ether 0:14:4f:24:86:70
ce0:1: flags=1000843
inet 10.101.155.123 netmask ffffff00 broadcast 10.101.155.255
ce6: flags=9040843
inet 10.101.155.125 netmask ffffff00 broadcast 10.101.155.255
groupname denitdb37
ether 0:14:4f:0:f4:91
# netstat -rn
Routing Table: IPv4
Destination Gateway Flags Ref Use Interface
-------------------- -------------------- ----- ----- ------ ---------
10.101.155.0 10.101.155.123 U 1 5 ce0:1
10.101.155.0 10.101.155.123 U 1 0 ce0
10.101.155.0 10.101.155.123 U 1 3 ce6
default 10.101.155.1 UG 1 158
127.0.0.1 127.0.0.1 UH 2 190 lo0
5. verify IPMP is functioning
5.0 ssh the host ("ssh denitdb37" in this case), and verify the connection after the detatch & reattatch.
5.1 detatch the NIC to which the IP of the host is bound:
# if_mpadm -d ce0
Jul 6 21:37:16 denitdb37 in.mpathd[29]: Successfully failed over from NIC ce0 to NIC ce6
denitdb37# ifconfig -a
lo0: flags=1000849
inet 127.0.0.1 netmask ff000000
ce0: flags=89040842
inet 10.101.155.124 netmask ffffff00 broadcast 10.101.155.255
groupname denitdb37
ether 0:14:4f:24:86:70
ce6: flags=9040843
inet 10.101.155.125 netmask ffffff00 broadcast 10.101.155.255
groupname denitdb37
ether 0:14:4f:0:f4:91
ce6:1: flags=1000843
inet 10.101.155.123 netmask ffffff00 broadcast 10.101.155.255
5.2 re-attatch the interface
# if_mpadm -r ce0
Jul 6 21:39:01 denitdb37 in.mpathd[29]: Successfully failed back to NIC ce0
# ifconfig -a
lo0: flags=1000849
inet 127.0.0.1 netmask ff000000
ce0: flags=9040843
inet 10.101.155.124 netmask ffffff00 broadcast 10.101.155.255
groupname denitdb37
ether 0:14:4f:24:86:70
ce0:1: flags=1000843
inet 10.101.155.123 netmask ffffff00 broadcast 10.101.155.255
ce6: flags=9040843
inet 10.101.155.125 netmask ffffff00 broadcast 10.101.155.255
groupname denitdb37
ether 0:14:4f:0:f4:91
6. create IPMP configuration files (its verification is to be done by a reboot).
# cat /etc/hostname.ce0
denitdb37-if0 group denitdb37 deprecated -failover up addif denitdb37 netmask + failover up
# cat /etc/hostname.ce6
denitdb37-if1 group denitdb37 deprecated -failover netmask + up
Procedure of configuring a virtual IP on a IPMP host
----------------------------------------------------
1. configure the virtual IP on /etc/hosts.
# echo -e "10.101.155.126ttmp.vip.xyz.com" >> /etc/hosts
2. configure the VIP manually:
# ifconfig ce0 addif tmp.vip.xyz.com netmask + broadcast + failover up
Created new logical interface ce0:2
Setting netmask of ce0:2 to 255.255.255.0
# ifconfig -a
lo0: flags=1000849
inet 127.0.0.1 netmask ff000000
ce0: flags=9040843
inet 10.101.155.124 netmask ffffff00 broadcast 10.101.155.255
groupname denitdb37
ether 0:14:4f:24:86:70
ce0:1: flags=1000843
inet 10.101.155.123 netmask ffffff00 broadcast 10.101.155.255
ce0:2: flags=1000843
inet 10.101.155.126 netmask ffffff00 broadcast 10.101.155.255
ce6: flags=9040843
inet 10.101.155.125 netmask ffffff00 broadcast 10.101.155.255
groupname denitdb37
ether 0:14:4f:0:f4:91
3. verify by "if_mpadm".
4. update IPMP configuration:
# cat /etc/hostname.ce0
denitdb37-if0 group denitdb37 deprecated -failover up addif denitdb37 netmask + failover up addif tmp.vip.xyz.com netmask + failover up
# cat /etc/hostname.ce6
denitdb37-if1 group denitdb37 deprecated -failover netmask + up
5. reboot the host to verify the configuration files.
ref:
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/7916042/viewspace-902979/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- Solaris IPMP 配置
- turbo linux ipmp配置備記Linux
- Solaris 11中配置基於link的IPMP
- 非常好實用的關於solaris ipmp配置文件
- IPMP面試“秘笈”(Level C)(轉)面試
- Solaris 11 中 Oracle RAC 私網冗餘模式從HAIP到IPMPOracle模式AI
- Configuring Solaris IP Multipathing (IPMP) for the Oracle 10g VIPOracle 10g
- 專案經理的職業化發展與IPMP認證(轉)
- nvim 配置,neovim配置
- Git配置配置檔案Git
- webpack(11)配置檔案分離為開發配置、生成配置和基礎配置Web
- mongodb配置檔案常用配置項MongoDB
- apache 配置檔案的配置(轉)Apache
- cmake配置VS工程配置使用dll
- Profile配置和載入配置檔案
- 【Python】配置檔案配置路徑Python
- webpack配置Plugin/配置檔案分離WebPlugin
- nginx配置+uwsgi+負載均衡配置Nginx負載
- mysql--my.ini配置檔案配置MySql
- 網路配置2:靜態路由配置路由
- 配置HP-UNIX下配置IP地址
- python讀配置檔案配置資訊Python
- MyBatis 配置MyBatis
- 配置RedisRedis
- webpack配置Web
- Ubuntu 配置Ubuntu
- mysql配置MySql
- 配置nginxNginx
- rocketmq配置MQ
- RIP配置
- babelrc配置Babel
- RabbitMQ配置MQ
- Nginx 配置Nginx
- iptables配置
- ftp 配置FTP
- larvelnginx配置Nginx
- 配置MySQLclusterMySql
- nginxphp配置NginxPHP