Innerhalb
Nach weiteren Dokumenten suchen
Support-Ressourcen
| Dieses Buch im PDF-Format herunterladen (1691 KB)
Chapter 28 Administering Network Multipathing (Task)
This chapter provides procedures for creating and working
with an interface group, configuring test addresses, configuring the hostname file, and configuring the multipathing configuration file.
This chapter contains the following information:
Configuring Multipathing Interface Groups
This section provides procedures for configuring
multipathing interface groups. It also describes how to make an interface
a hot standby interface.
Grouping Physical Interfaces provides additional information.
Configuring Multipathing Interface Groups—Task Map
Table 28–1 Configuring Multipathing Interface Groups—Task Map
How to Configure a Multipathing Interface Group With Two Interfaces
-
Become superuser.
-
Place each physical interface into a multipathing group by typing the
following command.
# ifconfig interface-name group group-name
|
For example, to place hme0 and hme1
under group test, you type the following commands:
# ifconfig hme0 group test
# ifconfig hme1 group test
|
-
Configure a test address for all the physical interfaces.
-
For an IPv4 test address, type the following command.
Note –
This step assumes that you have already configured your physical
interfaces' addresses.
# ifconfig interface-name addif ip-address <parameters> -failover deprecated up
|
For example, to configure a test address on hme0
with the following configuration:
-
Address set to 19.16.85.21
-
Netmask and broadcast address set to the default value
-
-failover and deprecated
options set
You type the following command:
# ifconfig hme0 addif 19.16.85.21 netmask + broadcast + -failover deprecated up
|
You can check the configuration by typing the following:
# ifconfig hme0:1
hme0:1: flags=9000843<UP,BROADCAST,RUNNING,MULTICAST,DEPRECATED,IPv4,NOFAILOVER>
mtu 1500 index 2 inet 19.16.85.21 netmask ffffff00 broadcast 19.16.85.255
|
Note –
You must mark an IPv4 test address as deprecated to prevent applications
from using the test address.
To configure a test address on hme1 with the following
configuration:
-
Address set to 19.16.85.22
-
Netmask and broadcast address set to the default value
-
-failover and deprecated
options set
Type the following command:
# ifconfig hme1 addif 19.16.85.22 netmask + broadcast + -failover deprecated up
|
-
For an IPv6 test address, type the following command.
# ifconfig interface-name inet6 -failover
|
Note –
Because you have already placed the physical interfaces with IPv4
addresses into a multipathing group, physical interfaces with IPv6 addresses
are also implicitly placed in the same multipathing group. You might have
placed physical interfaces with IPv6 addresses into a multipathing group first.
Then physical interfaces with IPv4 addresses would have been also implicitly
placed in the same multipathing group.
For example, to configure hme0 with an IPv6 test
address, you type the following command:
# ifconfig hme0 inet6 -failover
|
You can check the configuration by typing the following:
# ifconfig hme0 inet6
hme0: flags=a000841<UP,RUNNING,MULTICAST,IPv6,NOFAILOVER> mtu 1500
index 2 inet6 fe80::a00:20ff:feb9:17fa/10
groupname test
|
Note –
You do not need to mark an IPv6 test address as deprecated to
prevent applications from using the test address.
For the second interface, hme1, type the following
command:
# ifconfig hme1 inet6 -failover
|
-
(Do this step only if you want to preserve the configuration across
reboots.) To preserve the configuration across reboots, do the following substeps.
-
For IPv4, edit the /etc/hostname.interface file and add the following line.
interface-address <parameters> group group-name up \
addif logical-interface -failover deprecated <parameters> up
|
Note –
This test IP address is configured only on the next reboot. If
you want the configuration to be invoked in the current session, do steps
1, 2, and 3.
For example, to create a group test with the following
configuration for hme0:
-
Physical interface hme0 with address 19.16.85.19
-
A logical interface address of 19.16.85.21
-
With deprecated and -failover
set
-
Sets the netmask and broadcast address to the default value
You add the following line to the /etc/hostname.hme0
file:
19.16.85.19 netmask + broadcast + group test up \
addif 19.16.85.21 deprecated -failover netmask + broadcast + up
|
Similarly, to place hme1 under the same group test and configure a test address, type the following command:
19.16.85.20 netmask + broadcast + group test up \
addif 19.16.85.22 deprecated -failover netmask + broadcast + up
|
-
For IPv6, edit the /etc/hostname6.interface file and add the following line.
-failover group group-name up
|
Note –
This test IP address is configured only on the next reboot. If
you want the configuration to be invoked in the current session, do steps
1, 2, and 3.
For example, to create a test group for hme0 with
an IPv6 address, add the following line to the /etc/hostname6.hme0 file:
Similarly, to place hme1 under the same group test and configure a test address, add the following line to the /etc/hostname6.hme1 file:
Note –
To add more interfaces to the multipathing group, repeat steps
1 through 3. New interfaces can be added to an existing group on a live system.
However, changes are lost across reboots.
How to Configure a Multipathing Group With One of the Interfaces a
Standby Interface
The examples that are used in this procedure assume that hme1 will be configured as the standby interface.
Note –
A standby interface has only a test address.
-
Do steps 1 and 2 in How to Configure a Multipathing Interface Group With Two Interfaces.
-
Configure the test address on all physical interfaces by using the following
substeps.
-
For the non-standby interface, such as hme0, do step
3 in How to Configure a Multipathing Interface Group With Two Interfaces.
-
For a standby interface, configure a test address by typing the following
command.
Note –
A standby interface can have only a test address. A standby interface
cannot have any other IP address.
# ifconfig interface-name plumb ip-address <other-parameters> deprecated -failover
standby up
|
Note –
You must set the -failover option before the standby option and the standby option before up.
For <other-parameters>, use the parameters that
are required by your configuration. See the ifconfig(1M) man page
for descriptions.
For example, to create a test address with the following configuration:
-
Physical interface hme1 as a standby interface
-
Address of 19.16.85.22
-
With deprecated and -failover
set
-
Sets the netmask and broadcast address to the default value
You type the following command:
# ifconfig hme1 plumb 19.16.85.22 netmask + broadcast + deprecated -failover standby up
|
You can check the results by typing the following:
# ifconfig hme1
flags=69040843<UP,BROADCAST,RUNNING,MULTICAST,DEPRECATED,IPv4,NOFAILOVER,STANDBY,INACTIVE>
mtu 1500 index 4 inet 19.16.85.22 netmask ffffff00 broadcast 19.16.85.255
groupname test
|
For IPv6, to create a test address, type the following command:
ifconfig hme1 plumb -failover standby up
|
The INACTIVE flag indicates that this interface is
not used for any outbound packets. When a failover occurs on this standby
interface, the INACTIVE flag is cleared.
-
(Do this step only if you want to preserve the configuration across
reboots.) To preserve the configuration across reboots, do the following substeps.
-
For IPv4, edit the /etc/hostname.interface file and add the following line.
interface-address <parameters> group group-name up \
addif logical-interface-failover deprecated <parameters> up
|
Note –
This test IP address is configured only on the next reboot. If
you want the configuration to be invoked in the current session, do steps
1 and 2.
For example, to create a group test with the following
configuration for hme0:
-
Physical interface hme0 with address 19.16.85.19
-
A logical interface address of 19.16.85.21
-
With deprecated and -failover
set
-
Sets the netmask and broadcast address to the default value
You add the following line to the /etc/hostname.hme0
file:
19.16.85.19 netmask + broadcast + group test up \
addif 19.16.85.21 deprecated -failover netmask + broadcast + up
|
Similarly, to place the standby interface hme1 under
the same group test and configure a test address, type
the following command:
19.16.85.22 netmask + broadcast + deprecated group test -failover standby up
|
-
For IPv6, edit the /etc/hostname6.interface file and add the following line.
-failover group group-name up
|
Note –
This test IP address is configured only on the next reboot. If
you want the configuration to be invoked in the current session, do steps
1 and 2.
For example, to create a test group for hme0 with
an IPv6 address, add the following line to the /etc/hostname6.hme0 file:
Similarly, to place the standby interface hme1 under
the same group test and configure a test address, add the
following line to the /etc/hostname6.hme1 file:
-failover group test standby up
|
How to Display the Group to Which a Physical Interface Belongs
-
Become superuser.
-
On a command line, type the following command.
# ifconfig interface-name
|
For example, to display the group name for hme0,
you type the following command:
# ifconfig hme0
hme0: flags=9000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500
index 2 inet 19.16.85.19 netmask ffffff00 broadcast 19.16.85.255
groupname test
|
To display the group name for only the IPv6 instance, you type the following
command:
# ifconfig hme0 inet6
hme0: flags=a000841<UP,RUNNING,MULTICAST,IPv6> mtu 1500 index 2
inet6 fe80::a00:20ff:feb9:19fa/10
groupname test
|
How to Add an Interface To a Group
-
Become superuser.
-
On a command line, type the following command.
# ifconfig interface-name group group-name
|
For example, to add hme0 to the group test, you type the following command:
# ifconfig hme0 group test
|
How to Remove an Interface From a Group
-
Become superuser.
-
On a command line, type the following command.
# ifconfig interface-name group ""
|
The quotation marks indicate a null string.
For example, to remove hme0 from the group test, you type the following command:
# ifconfig hme0 group ""
# ifconfig hme0
hme0: flags=9000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500
index 2 inet 19.16.85.19 netmask ffffff00 broadcast 19.16.85.255
# ifconfig hme0 inet6
hme0: flags=a000841<UP,RUNNING,MULTICAST,IPv6> mtu 1500 index 2
inet6 fe80::a00:20ff:feb9:19fa/10
|
Removing Network Adapters From Multipathing Groups provides additional information.
How to Move an Interface From an Existing Group to a Different Group
-
Become superuser.
-
On a command line, type the following command.
# ifconfig interface-name group group-name
|
Note –
Placing the interface in a new group automatically removes it
from any existing group.
For example, to remove hme0 from group test and place it in group cs-link, you type
the following:
# ifconfig hme0 group cs-link
|
This command removes the interface from
any existing group and then puts the interface in the group cs-link.
Replacing a Physical Interface That Has Failed or DR-detaching/DR-attaching
a Physical Interface
The steps in this section pertain to
only IP layers that are configured by using ifconfig(1M).
Layers above or below the IP layer, such as ATM or other services, require
specific manual steps if the layers are not automated. The specific steps
are used to unconfigure during pre-detach and configure after post-attach.
See the layers and applications documentation for instructions on how to handle
the failure and DR scenarios.
You must do the following manual steps before replacing a physical interface
that has failed. The following procedures use physical interfaces hme0 and hme1 as example interfaces. The procedures
assume that both interfaces are in a multipathing group and that hme0 has failed. The procedures also assume that the logical interface hme0:1 has the test address.
Note –
These procedures assume that you are replacing the failed interface
with the same physical interface name (for example, hme0
with hme0).
How to Remove a Physical Interface That Has Failed
Note –
You can skip step 1 if the test address is plumbed by using the /etc/hostname.hme0 file.
-
Retrieve the test address configuration by typing the following command.
# ifconfig hme0:1
hme0:1:
flags=9040842<BROADCAST,RUNNING,MULTICAST,DEPRECATED,IPv4,NOFAILOVER>
mtu 1500 index 3
inet 129.146.233.250 netmask ffffff00 broadcast 129.146.233.255
|
You need this information to replumb the test address when replacing
the physical interface.
See Using the hostname File to Configure Groups and
Test Addresses for details on how to configure test
addresses by using the hostname file.
-
Refer to the cfgadm(1M)
man page, Sun Enterprise
6x00, 5x00, 4x00, and 3x00 Systems Dynamic Reconfiguration User's Guide,
or Sun Enterprise
10000 DR Configuration Guide for a description of how
to remove the physical interface.
How to Replace a Physical Interface That Has Failed
-
Refer to the cfgadm(1M)
man page, Sun Enterprise
6x00, 5x00, 4x00, and 3x00 Systems Dynamic Reconfiguration User's Guide,
or Sun Enterprise
10000 DR Configuration Guide, or Sun Fire 880 Dynamic Reconfiguration User's Guide for a description of how to replace the physical interface.
-
Plumb in and bring up the test address by typing the following command.
# ifconfig hme0 <test address configuration>
|
Note –
The test address configuration is the same test address that was
configured in the /etc/hostname.hme0 file. Using the
previous procedure, the test configuration is the same configuration that
is displayed in step 1.
This configuration triggers the in.mpathd daemon
to resume probing. As a result of this probing, in.mpathd
detects the repair. Consequently, in.mpathd causes the
original IP address to fail back from hme1.
See Configuring Test Addresses for more details about how to configure
test addresses.
Note –
The failback of IP addresses during the recovery of a failed physical
interface requires as much as three minutes. This time might vary. The time
depends on network traffic. The time also depends on the determination of
the stability of the incoming interface to failback failed over interfaces
by the in.mpathd daemon.
Recovering a Physical Interface That Was Not Present at System Boot
The steps
in this section pertain to only IP layers that are configured by using ifconfig(1M). Layers above or below the IP layer, such as ATM or
other services, require specific manual steps if the layers are not automated.
The specific steps are used to unconfigure during pre-detach and configure
after post-attach. See the layers and applications documentation for instructions
on how to handle the failure and DR scenarios.
Recovery after a DR operation for a NIC that is part of the IO board
on a Sun Fire platform or if the NIC is a cPCI device is automatic. Consequently,
the following steps are not required for a NIC that is coming back as part
of a DR operation. For more information on the Sun Fire x800 and Sun Fire
15000, see the cfgadm_sbd(1M)
man page. The physical interface is recovered to the configuration that is
specified in the /etc/hostname.interface file. See Configuring Multipathing Interface Groups for details on
how to configure interfaces to preserve the configuration across reboots.
Note –
On Sun Fire legacy (Exx00) systems, DR detaches are still subject
to manual procedures. However, DR attaches are automated.
You must do the following manual steps before recovering a physical
interface that was not present at system boot. The following procedure uses
physical interfaces hme0 and hme1 as
example interfaces. The procedure assumes that both interfaces are in a multipathing
group and that hme0 was not present at system boot.
Note –
The failback of IP addresses during the recovery of a failed physical
interface last three minutes. This time might vary. The time depends on network
traffic. The time also depends on the determination of the stability of the
incoming interface to fail back failed-over interfaces by the in.mpathd daemon.
How to Recover a Physical Interface That Was Not Present at System
Boot
-
Retrieve the failed network information from the console log failure
error message.
See the syslog(3C)man
page. The error message might be similar to the following message:
moving addresses from failed IPv4 interfaces:
hme1 (moved to hme0)
|
The error message might also be similar to the following message:
moving addresses from failed IPv4 interfaces:
hme1 (couldn't move, no alternative interface)
|
-
Attach the physical interface to the system.
Refer to the cfgadm(1M)
man page, Sun Enterprise
10000 DR Configuration Guide, or Sun Enterprise 6x00, 5x00, 4x00, and 3x00 Systems
Dynamic Reconfiguration User's Guide for a description
of how to replace the physical interface.
-
Refer to the message content from step 1. If the addresses could not
be moved, go to step 5. If the addresses were moved, do step 4.
-
Unplumb the logical interfaces that are configured as part of the failover
process by doing the following substeps.
-
Look at the contents of the file /etc/hostname.<moved_from_interface>
to see what logical interfaces were configured as part of the failover process.
-
Unplumb each failover IP address by typing the following command:
# ifconfig moved_to_interface removeif moved_ip_address
|
Note –
Failover addresses are those addresses that are marked with the failover parameter, or those addresses that are not marked with
the -failover parameter. You do not need to unplumb IP
addresses that are marked -failover.
For example, assume that the contents of the /etc/hostname.hme0 file contained the following lines:
inet 1.2.3.4 -failover up group one
addif 1.2.3.5 failover up
addif 1.2.3.6 failover up
|
Then, to unplumb each failover IP address, you would type the following
commands:
# ifconfig hme0 removeif 1.2.3.5
# ifconfig hme0 removeif 1.2.3.6
|
-
Reconfigure the IPv4 information for the replaced physical interface
by typing the following command for each interface that was removed.
# ifconfig removed_from_NIC <parameters>
|
By using the example in step 4, you would type the following commands:
# ifconfig hme1 inet plumb
# ifconfig hme1 inet 1.2.3.4 -failover up group one
# ifconfig hme1 addif 1.2.3.5 failover up
# ifconfig hme1 addif 1.2.3.6 failover up
|
Configuring the Multipathing Configuration File
The multipathing /etc/default/mpathd configuration file contains three parameters that you can adjust
for your configuration requirements:
See Multipathing Configuration File for a description of these parameters.
How to Configure the Multipathing Configuration File
-
Become superuser.
-
Edit the /etc/default/mpathd and change the default
value of one or more of the three parameters by using one or more of the following
substeps.
-
Type the new value for the FAILURE_DETECTION_TIME
parameter.
-
Type the new value for the FAILBACK parameter.
-
Type the new value for the TRACK_INTERFACES_ONLY_WITH_GROUPS parameter.
TRACK_INTERFACES_ONLY_WITH_GROUPS=[yes | no]
|
-
On a command line, type the following command.
|