星期五, 8月 28, 2015

FW:如何設定active active IPMP on Solaris 11

Active/Active IPMP for Solaris 11 wo/inet6

Ref:

https://blogs.oracle.com/thefield/entry/active_active_ipmp_for_solaris

 

Here are the steps to create a active/active ipmp configuration with Solaris 11.

Automated network configuration is manageded by a Solaris service called "nwam" or "Network Auto Magic". The nawm service is turned on by default, and must be disabled before you manually make changes to the settings for static IP addresses. Also needed is the "default" physical networking service.

 root@sunonly:~# netadm enable -p ncp defaultfixed 

These procudures also disables the ipv6 on the interfaces and persists across reboots.

The dladm command to display the physical interfaces (datalinks) available to work with. 

root@sunonly:~# dladm show-phys
LINK              MEDIA                STATE      SPEED  DUPLEX    DEVICE
net5              Ethernet             up            1000      full             e1000g1
net0              Ethernet             up            1000      full             nge0
net2              Ethernet             up            10000    full             ixgbe0
net4              Ethernet             up            1000      full             e1000g0
net3              Ethernet             up            10000    full             ixgbe1
net1              Ethernet             up            1000      full             nge1

The ipadm command is the preferred tool to manage the configuration of the interfaces.

Create a ipmp group called "ipmp1".

 root@sunonly:~# ipadm create-ipmp ipmp1

Create the interfaces for two of the nics.  Notice from the "dladm show-phys" output the interfaces are not on the same device.

"Solaris 10 plumb"

root@sunonly:~# ipadm create-ip net1

root@sunonly:~# ipadm create-ip net5

Add the two interfaces to the ipmp group "ipmp1".

root@sunonly:~# ipadm add-ipmp -i net1 -i net5 ipmp1

Add and entery into the hosts file for ip to interface assignment.

root@sunonly:~# echo "10.10.10.2     ipmp1-srss" >> /etc/hosts

Assign the host file entry to the interface ipmp group "ipmpi" with a class C netmask. 

root@sunonly:~# ipadm create-addr -T static -a ipmp1-srss/24 ipmp1/srss

 Display the status of the ipmp group

root@sunonly:~# ipmpstat -a

ADDRESS           STATE  GROUP   INBOUND     OUTBOUND
ipmp1-srss         up         ipmp1     net1              net5 net1

root@sunonly:~# ipmpstat -g

GROUP     GROUPNAME   STATE     FDT       INTERFACES
ipmp1       ipmp1                ok            --            net5 net1

root@sunonly:~# ipmpstat -i

INTERFACE   ACTIVE  GROUP  FLAGS   LINK   PROBE     STATE
net5               yes          ipmp1   -------        up      disabled   ok
net1               yes          ipmp1   --mbM--   up      disabled   ok

Display the ip information using ifconfig command

root@sunonly:~# ifconfig -a

IPV4

ipmp1: flags=8001000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4,IPMP> mtu 1500 index 8
   inet 10.10.10.2 netmask ffffff00 broadcast 10.10.10.255
   groupname ipmp1

net1: flags=1000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 9
   inet 0.0.0.0 netmask ff000000 
   groupname ipmp1
   ether 0:14:4f:ff:23:12 

net5: flags=1000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 10
   inet 0.0.0.0 netmask ff000000 
   groupname ipmp1
   ether 0:14:4f:ff:23:14 

IPV6

ipmp1: flags=28002000840<RUNNING,MULTICAST,IPv6,IPMP> mtu 1500 index 8
   inet6 ::/0 
   groupname ipmp1

net1: flags=20002000841<UP,RUNNING,MULTICAST,IPv6> mtu 1500 index 9
   inet6 fe80::214:4fff:feff:2312/10 
   groupname ipmp1
   ether 0:14:4f:ff:23:12 

net5: flags=20002000841<UP,RUNNING,MULTICAST,IPv6> mtu 1500 index 10
   inet6 fe80::214:4fff:feff:2314/10 
   groupname ipmp1
   ether 0:14:4f:ff:23:14 

Display the ip information using ipadm command

root@sunonly:~# ipadm show-addr

ADDROBJ      TYPE     STATE     ADDR
lo0/v4             static    ok            127.0.0.1/8
ipmp1/srss    static    ok            10.10.10.2/24
net1/_a          static    ok            fe80::214:4fff:feff:2312/10
net5/_a          static    ok            fe80::214:4fff:feff:2314/10

Here now is where it gets questionable.  What method should be used to cleanup and remove ipv6 from the interfaces?  So having a Solaris 4-5.11 background, I have chosen to to deviate from the preferred methods.

root@sunonly:~# ipadm delete-addr net1/_a

root@sunonly:~# ipadm delete-addr net5/_a

root@sunonly:~# ifconfig net1 inet6 unplumb

root@sunonly:~# ifconfig net5 inet6 unplumb

root@sunonly:~# ifconfig ipmp1 inet6 unplumb

Last delete all lines containing "_family=26"

root@sunonly:~# vi /etc/ipadm/ipadm.conf 

#
# Copyright 2010 Sun Microsystems, Inc.  All rights reserved.
# Use is subject to license terms.
#
# DO NOT EDIT OR PARSE THIS FILE!
#
# Use the ipadm(1m) command to change the contents of this file.
_ifname=lo0;_family=2;_class=2;
_ifname=lo0;_aobjname=lo0/v4;_ipv4addr=127.0.0.1,;up=yes;
_ifname=lo0;_aobjname=lo0/v4;prefixlen=8;
_ifname=ipmp1;_family=2;_class=1;
_ifname=ipmp1;_family=26;_class=1;
_ifname=net1;_family=2;_class=0;
_ifname=net1;_family=26;_class=0;
_ifname=net5;_family=2;_class=0;
_ifname=net5;_family=26;_class=0;
_ifname=ipmp1;_underif=net1;
_ifname=ipmp1;_underif=net5;
_ifname=ipmp1;_aobjname=ipmp1/srss;_ipv4addr=ipmp1-srss,;up=yes;
_ifname=ipmp1;_aobjname=ipmp1/srss;prefixlen=24;

 

沒有留言:

LinkWithin-相關文件

Related Posts Plugin for WordPress, Blogger...