Vous êtes sur la page 1sur 3

IPMP on Solaris 10 Setting IPMP with 2 physical ethernet using 3 IP Address # more /etc/hosts 127.0.0.1 localhost 192.168.0.

2 server1 192.168.0.3 server1-bge0 192.168.0.4 server1-bge1 # more /etc/netmasks 192.168.0.0 255.255.255.0 # more /etc/defaultrouter 192.168.0.1 # more /etc/hostname.bge0 server1 netmask + broadcast + group ipmp0 up \ addif server1-bge0 deprecated -failover netmask + broadcast + up # more /etc/hostname.bge1 server1-bge1 deprecated -failover netmask + broadcast + group ipmp0 up Now we have 3 IP address, 2 physical (192.168.0.3 & 192.168.0.4) and 1 virtual ( 192.168.0.2), if one of physical ip has disrupted, we still have 192.168.0.2 ali ve. # reboot

Link Based IP multi pathing setup <="" p="" align="Center" size="2" width="100%"> I will do the setup from the command line and then make it permanent across rebo ots. We will plumb the interfaces first then configure it. I will ate the whole process of how to setup IP multi pathing. In a ld not need to plumb the active interface cause it should be m only doing it this way to show you how to setup everything do this to demonstr live system you wou running already. I' from scratch.

So, let's plumb the interfaces and assign an IP address to e1000g0. Then I will assign the groupname ipmp0 to both interfaces. bash-3.00# ifconfig e1000g0 plumb bash-3.00# ifconfig e1000g1 plumb bash-3.00# ifconfig e1000g0 192.168.102.40 netmask + broadcast + up Setting netmask of e1000g0 to 255.255.255.0 bash-3.00# ifconfig e1000g0 group ipmp0 bash-3.00# ifconfig e1000g1 group ipmp0 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=1000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 8 inet 192.168.102.40 netmask ffffff00 broadcast 192.168.102.255

groupname ipmp0 ether 8:0:27:6f:c5:6e e1000g1: flags=1000842<BROADCAST,RUNNING,MULTICAST,IPv4&rt mtu 1500 index 9 inet 0.0.0.0 netmask 0 groupname ipmp0 ether 8:0:27:1e:1d:e6 Finished! The interfaces are now setup for link based IP multi pathing. How easy was that. We can confirm this by looking at the /var/adm/messages output. Jun 26 23:15:37 qserver in.mpathd[1238]: [ID 975029 daemon.error] No test address configured on interface e1000g0; disabling probe-based failure d etection on it Let's test it to see if it works. I will use an Ubuntu system and ping my test s etup. pieter@pieter-VirtualBox:~$ ping 192.168.102.40 PING 192.168.102.40 (192.168.102.40) 56(84) bytes of data. 64 bytes from 192.168.102.40: icmp_req=1 ttl=255 time=3.83 ms 64 bytes from 192.168.102.40: icmp_req=2 ttl=255 time=0.955 ms 64 bytes from 192.168.102.40: icmp_req=3 ttl=255 time=0.523 ms The ping works with the setup as is. Let's fail interface e1000g0 to check if th e ping still works. I will use a command called, if_mpadm to simulate the failur e. It's a command that will take the interface offline like you would physically disconnect it. bash-3.00# if_mpadm -d e1000g0 bash-3.00# tail -f /var/adm/messages Jun 26 23:23:34 qserver in.mpathd[1238]: [ID 832587 daemon.error] Successfully failed over from NIC e1000g0 to NIC e1000g1 Ok, so it looks like the IP has failed over. Let's see if we can ping from the U buntu system. pieter@pieter-VirtualBox:~$ ping 192.168.102.40 PING 192.168.102.40 (192.168.102.40) 56(84) bytes of data. 64 bytes from 192.168.102.40: icmp_req=1 ttl=255 time=1.18 ms 64 bytes from 192.168.102.40: icmp_req=2 ttl=255 time=0.580 ms Yep, it still works. Let's have a look at the interfaces with the ifconfig -a co mmand. 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 8 inet 0.0.0.0 netmask 0 groupname ipmp0 ether 8:0:27:6f:c5:6e e1000g1: flags=1000842<BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 9 inet 0.0.0.0 netmask 0 groupname ipmp0 ether 8:0:27:1e:1d:e6 e1000g1:1: flags=1000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 9 inet 192.168.102.40 netmask ffffff00 broadcast 192.168.102.255

Cool stuff! e1000g1 now has the IP address that was previously plumbed on e1000g 0. So it worked as advertised. Let's fix the interface and see if the IP fails back again. bash-3.00# if_mpadm -r 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=1000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 8 inet 192.168.102.40 netmask ffffff00 broadcast 192.168.102.255 groupname ipmp0 ether 8:0:27:6f:c5:6e e1000g1: flags=1000842<BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 9 inet 0.0.0.0 netmask 0 groupname ipmp0 ether 8:0:27:1e:1d:e6 bash-3.00# tail -f /var/adm/messages Jun 24 15:04:02 qserver in.mpathd[1241]: [ID 620804 daemon.error] Successfully failed back to NIC e1000g0 pieter@pieter-VirtualBox:~$ ping 192.168.102.40 PING 192.168.102.40 (192.168.102.40) 56(84) bytes of data. 64 bytes from 192.168.102.40: icmp_req=1 ttl=255 time=4.34 ms 64 bytes from 192.168.102.40: icmp_req=2 ttl=255 time=0.503 ms Yep, it failed back and the ping still works. This is all well and dandy, but if we reboot the system the config will be gone. So we need to make this permanent by editing the /etc/hostname.e1000g0 and /etc /hostname.e1000g1 files. bash-3.00# cat /etc/hostname.e1000g0 qserver group ipmp0 bash-3.00# cat /etc/hostname.e1000g1 group ipmp0 We just add the group ipmp0 into both files and now we can reboot the system and IP multi pathing will be configured for link based mode on the interfaces. How easy was that! I really like the link based setup. It's easy and quick and I prefer this over t he probe based setup. Next we will look at probe based IP multipathing.

Vous aimerez peut-être aussi