Добавил:
Upload Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
Oracle Solaris 11 Advanced Administration Cookbook.docx
Скачиваний:
3
Добавлен:
01.07.2025
Размер:
3 Мб
Скачать
☆

Getting ready

This recipe requires two virtual machines (VirtualBox or VMware Workstation) with Oracle Solaris 11 installed, 4 GB memory, and four network interfaces in the first virtual machine. For the second virtual machine, just one interface is enough.

How to do it…

This recipe will be based on a similar scenario presented previously, but four interfaces will be used where all of them are active:

f Group: hacker_ipmp0

 Data IP addresses: 192.168.1.50, 192.168.1.60, 192.168.1.70,

and 192.168.1.80

 Interface 1: net0

test IP (test_net0): 192.168.1.51

 Interface 2: net1

test IP (test_net1): 192.168.1.61

 Interface 3: net2

test IP (test_net2): 192.168.1.71

 Interface 4: net3

test IP (test_net3): 192.168.1.81

Networking

Like every feature in Oracle Solaris 11, IPMP is based on a Service Management Facility (SMF) service that must be online (default) and can be verified by running the following command:

root@solaris11-1:~# svcs -a | grep ipmp

online 23:38:50 svc:/network/ipmp:default root@solaris11-1:~# svcs -l ipmp

fmri svc:/network/ipmp:default

name IP Multipathing

enabled true

state online next_state none

state_time January 9, 2014 11:38:50 PM BRST alt_logfile /system/volatile/network-ipmp:default.log restarter svc:/system/svc/restarter:default contract_id 19

manifest /lib/svc/manifest/network/network-ipmp.xml dependency require_all/none svc:/network/loopback (online)

Moreover, the behavior of the IPMP daemon is based on the mpathd configuration file that is in the default directory under /etc/. Additionally, this configuration file has default content that covers any usual environment that does not demand any special care with delay in responses. Execute the following command:

root@solaris11-1:~# more /etc/default/mpathd

#

# Copyright 2000 Sun Microsystems, Inc. All rights reserved.

# Use is subject to license terms.

#

# ident "%Z%%M% %I% %E% SMI"

#

# Time taken by mpathd to detect a NIC failure in ms. The minimum time

# that can be specified is 100 ms.

# FAILURE_DETECTION_TIME=10000

#

# Failback is enabled by default. To disable failback turn off this option

#

Chapter 3

FAILBACK=yes

#

# By default only interfaces configured as part of multipathing groups

# are tracked. Turn off this option to track all network interfaces

# on the system

# TRACK_INTERFACES_ONLY_WITH_GROUPS=yes

root@solaris11-1:~#

Well, it's time to move forward. Initially, let's list what interfaces are available and their respective status by executing the following command:

root@solaris11-1:~# ipadm show-addr

ADDROBJ TYPE STATE ADDR

lo0/v4 static ok 127.0.0.1/8 net0/v4 dhcp ok 192.168.1.106/24 net1/v4 dhcp ok 192.168.1.107/24 net2/v4 dhcp ok 192.168.1.99/24 net3/v4 dhcp ok 192.168.1.140/24 lo0/v6 static ok ::1/128 root@solaris11-1:~# ipadm show-if

IFNAME CLASS STATE ACTIVE OVER

lo0 loopback ok yes -- net0 ip ok yes -- net1 ip ok yes -- net2 ip ok yes -- net3 ip ok yes -- root@solaris11-1:~# dladm show-link

LINK CLASS MTU STATE OVER

net0 phys 1500 up --

net1 phys 1500 up --

net2 phys 1500 up --

net3 phys 1500 up --

In the following step, all IP address objects will be deleted:

root@solaris11-1:~# ipadm delete-ip net0 root@solaris11-1:~# ipadm delete-ip net1 root@solaris11-1:~# ipadm delete-ip net2 root@solaris11-1:~# ipadm delete-ip net3

Networking

Returning to the monitoring commands, we shouldn't see all these IP address objects anymore:

root@solaris11-1:~# ipadm show-addr

ADDROBJ TYPE STATE ADDR

lo0/v4 static ok 127.0.0.1/8

lo0/v6 static ok ::1/128 root@solaris11-1:~# ipadm show-if

IFNAME CLASS STATE ACTIVE OVER

lo0 loopback ok yes -- root@solaris11-1:~# dladm show-link

LINK CLASS MTU STATE OVER

net0 phys 1500 up --

net1 phys 1500 up --

net2 phys 1500 up --

net3 phys 1500 up --

Everything is okay up to now. Thus, before starting to configure IPMP, it's appropriate to change the NCP profile from Automatic to DefaultFixed because the IPMP setup is going to use fixed IP addresses:

root@solaris11-1:~# netadm list

TYPE PROFILE STATE

ncp Automatic online ncu:phys net0 online

ncu:phys net1 online

ncu:phys net2 online

ncu:phys net3 online ncp my_profile disabled

ncp DefaultFixed disabled

loc NoNet online

loc work disabled

loc Automatic offline

root@solaris11-1:~# netadm enable -p ncp DefaultFixed

Enabling ncp 'DefaultFixed'

Great! It's interesting to realize that there is no IP address object on the system:

root@solaris11-1:~# ipadm show-addr

ADDROBJ TYPE STATE ADDR

lo0/v4 static ok 127.0.0.1/8

lo0/v6 static ok ::1/128

Chapter 3

The game begins. To make the administration more comfortable, all network links are going to be renamed for them to be more easily recognizable, and shortly thereafter, new IP address objects will be created too (for a while, without any IP address value):

root@solaris11-1:~# dladm rename-link net0 net0_myipmp0 root@solaris11-1:~# dladm rename-link net1 net1_myipmp1 root@solaris11-1:~# dladm rename-link net2 net2_myipmp2 root@solaris11-1:~# dladm rename-link net3 net3_myipmp3 root@solaris11-1:~# dladm show-link

LINK CLASS MTU STATE OVER

net0_myipmp0 phys 1500 unknown -- net1_myipmp1 phys 1500 unknown -- net2_myipmp2 phys 1500 unknown -- net3_myipmp3 phys 1500 unknown -- root@solaris11-1:~# ipadm create-ip net0_myipmp0 root@solaris11-1:~# ipadm create-ip net1_myipmp1 root@solaris11-1:~# ipadm create-ip net2_myipmp2 root@solaris11-1:~# ipadm create-ip net3_myipmp3 root@solaris11-1:~# ipadm show-if

IFNAME CLASS STATE ACTIVE OVER

lo0 loopback ok yes -- net0_myipmp0 ip down no -- net1_myipmp1 ip down no -- net2_myipmp2 ip down no -- net3_myipmp3 ip down no -- root@solaris11-1:~# ipadm show-addr

ADDROBJ TYPE STATE ADDR

lo0/v4 static ok 127.0.0.1/8

lo0/v6 static ok ::1/128

Now, it's time to create the IPMP interface group (hacker_ipmp0) and assign all interfaces to this group. Pay attention to the fact that there are no IP addresses on any network interface yet:

root@solaris11-1:~# ipadm create-ipmp hacker_ipmp0

root@solaris11-1:~# ipadm add-ipmp -i net0_myipmp0 -i net1_myipmp1 -i net2_myipmp2 -i net3_myipmp3 hacker_ipmp0

Networking

The IPMP interface group is ok (see the ipmpstat –g command in the following snippet), but the status is down (see the ipadm show-if and ipmpstat -a commands in the following snippet) for now (wait for more steps):

root@solaris11-1:~# ipadm show-if

IFNAME CLASS STATE ACTIVE OVER

lo0 loopback ok yes -- net0_myipmp0 ip ok yes -- net1_myipmp1 ip ok yes -- net2_myipmp2 ip ok yes -- net3_myipmp3 ip ok yes --

hacker_ipmp0 ipmp down no net0_myipmp0 net1_myipmp1 net2_ myipmp2 net3_myipmp3

root@solaris11-1:~# ipmpstat –g

GROUP GROUPNAME STATE FDT INTERFACES

hacker_ipmp0 hacker_ipmp0 ok -- net3_myipmp3 net2_myipmp2 net1_myipmp1 net0_myipmp0

root@solaris11-1:~# ipmpstat -a

ADDRESS STATE GROUP INBOUND OUTBOUND

:: down hacker_ipmp0 -- --

0.0.0.0 down hacker_ipmp0 -- --

Because there is no data or test IP address yet, all probe operations are disabled:

root@solaris11-1:~# ipmpstat -i

INTERFACE ACTIVE GROUP FLAGS LINK PROBE STATE

net3_myipmp3 yes hacker_ipmp0 ------- up disabled ok net2_myipmp2 yes hacker_ipmp0 ------- up disabled ok net1_myipmp1 yes hacker_ipmp0 ------- up disabled ok net0_myipmp0 yes hacker_ipmp0 --mbM-- up disabled ok root@solaris11-1:~# ipmpstat -p

ipmpstat: probe-based failure detection is disabled

Finally, all main data IP addresses and test IP addresses will be added to the IPMP configuration by executing the following commands:

root@solaris11-1:~# ipadm create-addr -T static -a 192.168.1.50/24 hacker_ipmp0/v4addr1

root@solaris11-1:~# ipadm create-addr -T static -a 192.168.1.60/24 hacker_ipmp0/v4addr2

Chapter 3

root@solaris11-1:~# ipadm create-addr -T static -a 192.168.1.70/24 hacker_ipmp0/v4addr3

root@solaris11-1:~# ipadm create-addr -T static -a 192.168.1.80/24 hacker_ipmp0/v4addr4

root@solaris11-1:~# ipadm create-addr -T static -a 192.168.1.51/24 net0_ myipmp0/test

root@solaris11-1:~# ipadm create-addr -T static -a 192.168.1.61/24 net1_ myipmp1/test

root@solaris11-1:~# ipadm create-addr -T static -a 192.168.1.71/24 net2_ myipmp2/test

root@solaris11-1:~# ipadm create-addr -T static -a 192.168.1.81/24 net3_ myipmp3/test

To check whether our previous ipadm commands are working, execute the following command:

root@solaris11-1:~# ipadm show-addr

ADDROBJ TYPE STATE ADDR

lo0/v4 static ok 127.0.0.1/8 net0_myipmp0/test static ok 192.168.1.51/24 net1_myipmp1/test static ok 192.168.1.61/24 net2_myipmp2/test static ok 192.168.1.71/24 net3_myipmp3/test static ok 192.168.1.81/24 hacker_ipmp0/v4addr1 static ok 192.168.1.50/24 hacker_ipmp0/v4addr2 static ok 192.168.1.60/24 hacker_ipmp0/v4addr3 static ok 192.168.1.70/24 hacker_ipmp0/v4addr4 static ok 192.168.1.80/24 lo0/v6 static ok ::1/128 root@solaris11-1:~# ipadm show-if

IFNAME CLASS STATE ACTIVE OVER

lo0 loopback ok yes -- net0_myipmp0 ip ok yes -- net1_myipmp1 ip ok yes -- net2_myipmp2 ip ok yes -- net3_myipmp3 ip ok yes --

hacker_ipmp0 ipmp ok yes net0_myipmp0 net1_myipmp1 net2_ myipmp2 net3_myipmp3

root@solaris11-1:~# dladm show-link

Networking

LINK

CLASS

MTU

STATE

OVER

net0_myipmp0

phys

1500

up

--

net1_myipmp1

phys

1500

up

--

net2_myipmp2

phys

1500

up

--

net3_myipmp3

phys

1500

up

--

If everything went well, the IPMP interface group and all IP addresses should be ok and up:

root@solaris11-1:~# ipmpstat -g

GROUP GROUPNAME STATE FDT INTERFACES

hacker_ipmp0 hacker_ipmp0 ok 10.00s net3_myipmp3 net2_myipmp2 net1_myipmp1 net0_myipmp0

root@solaris11-1:~# ipmpstat -a

ADDRESS STATE GROUP INBOUND OUTBOUND

:: down hacker_ipmp0 -- --

192.168.1.80 up hacker_ipmp0 net0_myipmp0 net3_myipmp3 net2_myipmp2 net1_myipmp1 net0_myipmp0

192.168.1.70 up hacker_ipmp0 net1_myipmp1 net3_myipmp3 net2_myipmp2 net1_myipmp1 net0_myipmp0

192.168.1.60 up hacker_ipmp0 net2_myipmp2 net3_myipmp3 net2_myipmp2 net1_myipmp1 net0_myipmp0

192.168.1.50 up hacker_ipmp0 net3_myipmp3 net3_myipmp3 net2_myipmp2 net1_myipmp1 net0_myipmp0

Thanks to each test IP address, all interfaces should be being monitored by the in.mpathd daemon (from the IPMP service), and this probe information is shown by executing the following command:

root@solaris11-1:~# ipmpstat -p

TIME

INTERFACE

PROBE

NETRTT

RTT

RTTAVG

TARGET

0.21s

net0_myipmp0

i1411

0.66ms

0.85ms

0.70ms

192.168.1.113

0.47s

net3_myipmp3

i1411

0.55ms

7.57ms

2.31ms

192.168.1.113

0.70s

net2_myipmp2

i1411

0.67ms

0.77ms

0.72ms

192.168.1.112

1.13s

net1_myipmp1

i1412

0.43ms

0.60ms

0.73ms

192.168.1.112

1.78s

net0_myipmp0

i1412

0.63ms

0.74ms

1.00ms

192.168.1.112

2.17s

net3_myipmp3

i1412

0.68ms

0.82ms

0.65ms

192.168.1.112

2.43s

net2_myipmp2

i1412

0.31ms

0.36ms

0.67ms

192.168.1.113

2.94s

net0_myipmp0

i1413

7.17ms

8.03ms

11.05ms

192.168.1.188

2.99s

net1_myipmp1

i1413

0.27ms

0.31ms

1.11ms

192.168.1.113

3.54s

net3_myipmp3

i1413

0.57ms

0.69ms

2.10ms

192.168.1.113

3.69s

^C

net2_myipmp2

i1413

0.61ms

0.72ms

0.72ms

192.168.1.112

Chapter 3

You might notice some strange IPs: 192.168.1.112, 192.168.1.113, and 192.168.1.188. Where do these addresses come from? The IPMP service makes tests and checks (probes) to assure that the data IPs are working as expected by using the multicast protocol, and it registers the RTT (round trip) for a packet to go and return from a discovered host. In this particular case, IPMP has reached some machines on my private local network and a printer.

Therefore, according to the previous command, it is possible to confirm whether all IPMP network interfaces are good by executing the following commands:

root@solaris11-1:~#

ipmpstat -i

INTERFACE ACTIVE

GROUP

FLAGS

LINK

PROBE

STATE

net3_myipmp3 yes

hacker_ipmp0

-------

up

ok

ok

net2_myipmp2 yes

hacker_ipmp0

-------

up

ok

ok

net1_myipmp1 yes

hacker_ipmp0

-------

up

ok

ok

net0_myipmp0 yes

hacker_ipmp0

--mbM--

up

ok

ok

These flags from the ipmpstat –i command deserve a quick explanation:

f m: This is to send and/or receive IPv4 multicast packets

f M: This is to send and/or receive IPv6 multicast packets

f b: This is chosen to send and/or receive IPv4 broadcast packets

f i: This means inactive f s: This means standby f d: This means down

Likewise, information about test IP addresses and hosts that were used to send multicast packets are presented in a simple way, as follows:

root@solaris11-1:~# ipmpstat -t

INTERFACE

MODE

TESTADDR

TARGETS

net3_myipmp3

multicast

192.168.1.81

192.168.1.113

192.168.1.112

net2_myipmp2

multicast

192.168.1.71

192.168.1.112

192.168.1.113

net1_myipmp1

multicast

192.168.1.61

192.168.1.113

192.168.1.112

net0_myipmp0

multicast

192.168.1.51

192.168.1.112

192.168.1.188

192.168.1.113

Excellent! Is it over? No. How can we know whether the IPMP configuration is working? The best way is to make a network fail. To simulate this scenario, we must first shut down Oracle Solaris 11 by executing the following command:

root@solaris11-1:~# shutdown –y –g0

Networking

In the next step, we must choose our virtual machine, click on the Settings button, and go to

Network. There, for the Attached to option, change the first interface to Not attached.

This trick will simulate a failure on the interface and the interface won't be presented for Oracle Solaris 11. Then, the virtual machine (solaris11-1) must be turned on again, and as expected, the system works very well. This can be confirmed by using all the previous network and IPMP commands:

root@solaris11-1:~# ipmpstat -pn

TIME

INTERFACE

PROBE

NETRTT

RTT

RTTAVG

TARGET

0.08s

net2_myipmp2

i761

0.22ms

0.31ms

0.56ms

192.168.1.113

1.31s

net1_myipmp1

i762

3.90ms

4.02ms

9.35ms

192.168.1.188

1.37s

net3_myipmp3

i761

0.48ms

0.57ms

0.83ms

192.168.1.113

1.57s

net2_myipmp2

i762

0.32ms

0.38ms

0.61ms

192.168.1.113

2.79s

net1_myipmp1

i763

0.63ms

0.73ms

0.78ms

192.168.1.113

2.85s

net3_myipmp3

i762

0.66ms

0.78ms

0.72ms

192.168.1.113

1.11s

net0_myipmp0

i763

--

--

--

192.168.1.113

-0.03s

net0_myipmp0

i762

--

--

--

192.168.1.188

3.08s

net2_myipmp2

i763

0.57ms

0.70ms

0.57ms

192.168.1.113

4.02s

net3_myipmp3

i763

0.58ms

0.69ms

0.82ms

192.168.1.113

Chapter 3

As expected, the first interface (net0_myipmp0) fails during the probe test. Moving forward, the same failure will be shown in other commands:

root@solaris11-1:~# ipadm show-if

IFNAME CLASS STATE ACTIVE OVER

lo0 loopback ok yes -- net0_myipmp0 ip failed no -- net1_myipmp1 ip ok yes -- net2_myipmp2 ip ok yes --

hacker_ipmp0 ipmp ok yes net0_myipmp0 net1_myipmp1 net2_ myipmp2 net3_myipmp3

net3_myipmp3 ip ok yes -- root@solaris11-1:~# ipmpstat -g

GROUP GROUPNAME STATE FDT INTERFACES

hacker_ipmp0 hacker_ipmp0 degraded 10.00s net3_myipmp3 net2_myipmp2 net1_myipmp1 [net0_myipmp0]

The IPMP group status is degraded because one of its interfaces (net0_myipmp0) is missing. Other IPMP commands can confirm this fact:

root@solaris11-1:~# ipmpstat -i

INTERFACE ACTIVE GROUP FLAGS LINK PROBE STATE

net3_myipmp3 yes hacker_ipmp0 ------- up ok ok net2_myipmp2 yes hacker_ipmp0 ------- up ok ok net1_myipmp1 yes hacker_ipmp0 --mbM-- up ok ok net0_myipmp0 no hacker_ipmp0 ------- up failed failed root@solaris11-1:~# ipmpstat -a

ADDRESS STATE GROUP INBOUND OUTBOUND

:: down hacker_ipmp0 -- --

192.168.1.80 up hacker_ipmp0 net1_myipmp1 net3_myipmp3 net2_myipmp2 net1_myipmp1

192.168.1.70 up hacker_ipmp0 net3_myipmp3 net3_myipmp3 net2_myipmp2 net1_myipmp1

192.168.1.60 up hacker_ipmp0 net2_myipmp2 net3_myipmp3 net2_myipmp2 net1_myipmp1

192.168.1.50 up hacker_ipmp0 net1_myipmp1 net3_myipmp3 net2_myipmp2 net1_myipmp1

Networking

Take care—on the first view, it could seem that there's something wrong, but in fact, there isn't. It's usual for some people to guess that the IP address is bound to a specific interface, but this isn't true. All data IP addresses are assigned to the IPMP group interface, and IPMP will try

to use the best interface for outbound connections. Nonetheless, the best and final test can be performed using another machine (solaris11-2), and from there, try to ping all data IP addresses from the first machine (solaris11-1):

root@solaris11-2:~# ping

192.168.1.50

192.168.1.50 is alive

root@solaris11-2:~# ping

192.168.1.60

192.168.1.60 is alive

root@solaris11-2:~# ping

192.168.1.70

192.168.1.70 is alive

root@solaris11-2:~# ping

192.168.1.80

192.168.1.80 is alive

Amazing! Oracle Solaris 11 wins again! If we shut down the first virtual machine once more (shutdown –y –g0 or poweroff), return the interface to its old configuration (Settings | Network | Adapter 1 | Attached to: Bridged Network) and turn on the solaris11-1 virtual machine again; we're going to confirm that everything is ok:

root@solaris11-1:~#

ipmpstat -i

INTERFACE ACTIVE

GROUP

FLAGS

LINK

PROBE

STATE

net3_myipmp3 yes

hacker_ipmp0

-------

up

ok

ok

net2_myipmp2 yes

hacker_ipmp0

-------

up

ok

ok

net1_myipmp1 yes

hacker_ipmp0

-------

up

ok

ok

net0_myipmp0 yes

hacker_ipmp0

--mbM--

up

ok

ok

root@solaris11-1:~# ipmpstat -g

GROUP GROUPNAME STATE FDT INTERFACES

hacker_ipmp0 hacker_ipmp0 ok 10.00s net3_myipmp3 net2_myipmp2 net1_myipmp1 net0_myipmp0

root@solaris11-1:~# ipmpstat -a

ADDRESS STATE GROUP INBOUND OUTBOUND

:: down hacker_ipmp0 -- --

192.168.1.80 up hacker_ipmp0 net1_myipmp1 net3_myipmp3 net2_myipmp2 net1_myipmp1 net0_myipmp0

192.168.1.70 up hacker_ipmp0 net3_myipmp3 net3_myipmp3 net2_myipmp2 net1_myipmp1 net0_myipmp0

192.168.1.60 up hacker_ipmp0 net2_myipmp2 net3_myipmp3 net2_myipmp2 net1_myipmp1 net0_myipmp0

192.168.1.50 up hacker_ipmp0 net0_myipmp0 net3_myipmp3 net2_myipmp2 net1_myipmp1 net0_myipmp0

Chapter 3

Fantastic! However, let's execute another test. The goal is to convert an active interface into a standby interface (the active-passive configuration). Thus, to proceed, we should delete one of the IP addresses that carries data and is assigned to a standby network interface. If it's not deleted, it wouldn't make any difference. Relax! The following procedure is a piece of cake.

The first step is to change the standby property from the interface to on by running the following command:

root@solaris11-1:~# ipadm set-ifprop -p standby=on -m ip net3_myipmp3

Check whether the last command worked as expected by executing the following command:

root@solaris11-1:~# ipadm show-ifprop -p standby net3_myipmp3

IFNAME PROPERTY PROTO PERM CURRENT PERSISTENT DEFAULT POSSIBLE

net3_myipmp3 standby ip rw on on off on,off

As we've mentioned, a data IP address object (the forth) will be deleted by running the following command:

root@solaris11-1:~# ipadm delete-addr hacker_ipmp0/v4addr4

The net3_myipmp3 interface is marked as deleted (its respective interface is put inside the parentheses):

root@solaris11-1:~# ipmpstat -g

GROUP GROUPNAME STATE

FDT

INTERFACES

hacker_ipmp0 hacker_ipmp0 ok net0_myipmp0 (net3_myipmp3)

10.00s

net2_myipmp2 net1_myipmp1

Check whether the net3_myipmp3 interface doesn't appear anymore by running the following three commands:

root@solaris11-1:~# ipmpstat -a

ADDRESS STATE GROUP INBOUND OUTBOUND

:: down hacker_ipmp0 -- --

192.168.1.80 up hacker_ipmp0 net1_myipmp1 net2_myipmp2 net1_myipmp1 net0_myipmp0

192.168.1.70 up hacker_ipmp0 net0_myipmp0 net2_myipmp2 net1_myipmp1 net0_myipmp0

192.168.1.60 up hacker_ipmp0 net2_myipmp2 net2_myipmp2 net1_myipmp1 net0_myipmp0

192.168.1.50 up hacker_ipmp0 net0_myipmp0 net2_myipmp2 net1_myipmp1 net0_myipmp0

root@solaris11-1:~# ipadm show-if

Networking

IFNAME CLASS STATE ACTIVE OVER

lo0 loopback ok yes -- net0_myipmp0 ip ok yes -- net1_myipmp1 ip ok yes -- net2_myipmp2 ip ok yes --

hacker_ipmp0 ipmp ok yes net0_myipmp0 net1_myipmp1 net2_ myipmp2 net3_myipmp3

net3_myipmp3 ip ok no -- root@solaris11-1:~# ipmpstat -i

INTERFACE

ACTIVE

GROUP

FLAGS

LINK

PROBE

STATE

net3_myipmp3

no

hacker_ipmp0

is-----

up

ok

ok

net2_myipmp2

yes

hacker_ipmp0

-------

up

ok

ok

net1_myipmp1

yes

hacker_ipmp0

-------

up

ok

ok

net0_myipmp0

yes

hacker_ipmp0

--mbM--

up

ok

ok

Notice that the is flag on net3_myipmp3 describes this interface as inactive and working in the standby mode. All tests can be performed in the same way using this active-passive scenario.

Last but not least, we need to return everything as it was before this section in order to

prepare for the next section, which explains how to set up link aggregation:

root@solaris11-1:~# ipadm remove-ipmp hacker_ipmp0 -i net0_myipmp0 -i net1_myipmp1 -i net2_myipmp2 -i net3_myipmp3

root@solaris11-1:~# ipadm delete-ipmp hacker_ipmp0

root@solaris11-1:~# ipadm show-addr

ADDROBJ TYPE STATE ADDR

lo0/v4 static ok 127.0.0.1/8 net0_myipmp0/test static ok 192.168.1.51/24 net1_myipmp1/test static ok 192.168.1.61/24 net2_myipmp2/test static ok 192.168.1.71/24 net3_myipmp3/test static ok 192.168.1.81/24 lo0/v6 static ok ::1/128 root@solaris11-1:~# ipadm delete-addr net0_myipmp0/test root@solaris11-1:~# ipadm delete-addr net1_myipmp1/test root@solaris11-1:~# ipadm delete-addr net2_myipmp2/test root@solaris11-1:~# ipadm delete-addr net3_myipmp3/test root@solaris11-1:~# ipadm show-if

Chapter 3

IFNAME CLASS STATE ACTIVE OVER

lo0 loopback ok yes -- net0_myipmp0 ip down no -- net1_myipmp1 ip down no -- net2_myipmp2 ip down no -- net3_myipmp3 ip down no -- root@solaris11-1:~# ipadm delete-ip net0_myipmp0 root@solaris11-1:~# ipadm delete-ip net1_myipmp1 root@solaris11-1:~# ipadm delete-ip net2_myipmp2 root@solaris11-1:~# ipadm delete-ip net3_myipmp3 root@solaris11-1:~# dladm show-link

LINK CLASS MTU STATE OVER

net0_myipmp0 phys 1500 unknown -- net1_myipmp1 phys 1500 unknown -- net2_myipmp2 phys 1500 unknown -- net3_myipmp3 phys 1500 unknown -- root@solaris11-1:~# dladm rename-link net0_myipmp0 net0 root@solaris11-1:~# dladm rename-link net1_myipmp1 net1 root@solaris11-1:~# dladm rename-link net2_myipmp2 net2 root@solaris11-1:~# dladm rename-link net3_myipmp3 net3 root@solaris11-1:~# dladm show-link

LINK CLASS MTU STATE OVER

net0 phys 1500 unknown --

net1 phys 1500 unknown --

net2 phys 1500 unknown --

net3 phys 1500 unknown -- root@solaris11-1:~# netadm enable -p ncp Automatic Enabling ncp 'Automatic'

root@solaris11-1:~# ipadm show-addr | grep v4

lo0/v4 static ok 127.0.0.1/8 net0/v4 dhcp ok 192.168.1.108/24 net1/v4 dhcp ok 192.168.1.106/24 net2/v4 dhcp ok 192.168.1.109/24 net3/v4 dhcp ok 192.168.1.107/24

We are done with IPMP! Oracle Solaris 11 is the best operating system in the world!

Networking

An overview of the recipe

The main concept that must always be remembered is that the IPMP frame is suitable for eliminating a single point of failure. Although it is able to create the outbound load balance, the real goal is the high availability network.

Соседние файлы в предмете [НЕСОРТИРОВАННОЕ]