Alternate Pathing 2.0 User's Guide
只搜寻这本书
以 PDF 格式下载本书

Using Meta-Networks and Network Pathgroups

6

Both physical networks within a network pathgroup must be of the same type. For example, a network pathgroup could consist of two le networks or two qe networks, but not one of each.
Both alternates in a network pathgroup should be physically connected to the same network. For example, Ethernet adapters should be connected to the same subnet.
While multiple physical network connections exist, only one adapter at a time is active. The adapters should be on different system boards so that DR operations (such as DR Detach) can be performed without affecting all potential active alternates.
The AP switch procedures in this section show how to switch the active alternate.

Meta-Network Interfaces

A meta-network interface name is derived from the name of the primary alternate for that meta-network. A meta-network interface name has the form mxxx where xxx is the primary interface name such as le0. Some examples follow:
  • LE Ethernet meta-network names have the form mle#, where # is the instance number. For example, assume the network adapters le0 and le1 connect to the same Ethernet network. A meta-network mle0 could
encompass these two adapters (if the primary adapter is le0). Similarly, QE Ethernet meta-network names have the form mqe#. Note that you cannot mix le and qe networks within the same pathgroup.
  • FDDI meta-network names have the form mbf# and mnf#. nf networks can be either SAS or DAS; bf networks can only be SAS. Note that you cannot mix nf and bf networks within the same pathgroup.

Creating Network Pathgroups and Meta-Networks

To create a network pathgroup, use the apnet(1M) command. An example follows:

  # apnet -c -p le0 -a le2  
  # apconfig -N -u  
  
  metanetwork:    mle0  U  
  physical devices:  
                  le2  
                  le0  P A  

This apnet(1M) command creates the network pathgroup as well as the meta-network interface name mle0 for the two physical devices le0 and le2. The meta-network interface name is derived from the primary adapter name (specified by -p).
The apconfig(1M) command lists the uncommitted network entries in the database. -N specifies that network database entries should be listed. -u specifies that uncommitted entries should be listed.
If you are satisfied with the network pathgroup, the next step is to commit the entry:

  # apdb -C  
  # apconfig -N  
  
  metanetwork:    mle0  
  physical devices:  
                  le2  
                  le0  P A  

apdb -C commits the database entries. apconfig -N lists the committed network entries in the database. The listing appears exactly as it did before, except that the U no longer appears after mle0.
Before you can use a meta-network, you must remove all direct usage of both members of the pathgroup (see ifconfig(1M)). You may have to unplumb the physical interface; for example:

  # ifconfig le0 down  
  # ifconfig le0 unplumb  


Note - If the interface you will be configuring down is the main network interface, or if it is the interface that you will be using as you execute the commands to configure the meta-network, follow one of the procedures in "Alternately Pathing the Primary Network Interface" on page 6-7.

Usually network interfaces are configured during system boot via the file /etc/hostname.xxx where xxx is the interface name (such as le0). This file contains the IP address or the hostname associated with the interface. You should remove or rename the /etc/hostname.xxx for all interfaces that have been made AP alternates, since direct usage of the alternate must not occur.
You should create an /etc/hostname.mxxx file (such as /etc/hostname.mle0) for any meta-networks that you wish to configure at system reboot. This file should contain the meta-network's IP address or the hostname for the interface. You can simply rename /etc/hostname.le0 to /etc/hostname.mle0.
The normal operating state of a network interface is plumbed up when in use, and unplumbed when not in use. When you automatically configure network interfaces via /etc/hostname.*, the interfaces are left in one of these states. It is possible to leave a network interface in a transitory state of plumbed when you manually configure your network interface. As this is not a normal operational mode it is unlikely that network interfaces will be left in this state. Generally, you should not leave meta-networks in this state during AP network configuration. A network meta-device may be deleted only if it and all other network meta-devices of that device type are either in the unplumbed
state or the plumbed up state. Otherwise, AP ignores the delete request and, depending on your configuration, may display warning messages of the following form:

  WARNING:mnf_setphyspath: APUNSET busy  
  WARNING:ap_db_commit: mnf3 not deleted, metadevice returned error  
  16  


Note - If you are using FDDI, you must specify a unique MACID for the meta-network. The MACID is set via the ether parameter to the ifconfig(1M) command. You might first examine the MACID for each of the alternates. You can do this by bringing up each alternate and examining the ether field. Then, fabricate a MACID that does not match any of the alternates.
The allocation of Media Access Control Identifiers (MACids) is described in RFC1340, "Assigned Numbers", July 1992. When generating a MACid for your AP network interface, the new 48 bit hardware address should be acquired from the IEEE Standards Office, 345 East 47th Street, New York, N.Y. 10017. However, it is possible to "create" a number by transposing digits on an existing MACid of one of the meta-interface's alternate elements. After creating a number, it is important to verify that there is no other hardware on the same subnet which is a legitimate user of the created address.
This meta-network MACID will be used to configure the active physical interface of the meta-network. The use of this MACID is necessary to prevent duplication of MACIDs on the network when combining AP switching of interfaces and DR board insertion activities. The meta-network defaults to the MACID of the active alternate on boot. To ensure that the MACID is set properly at boot time, place ifconfig(1M) commands in the /etc/rcs.d/S30rootusr.sh start-up script.
Finally, bring up the meta-network in the usual manner, but use the meta-network name instead of the physical network name. This may be done by either rebooting the machine or manually configuring the network as in the following example:

  # ifconfig mle0 plumb  
  # ifconfig mle0 inet 136.162.65.30 up netmask + broadcast +  
  Setting netmask of mle0 to 255.255.255.0  
  # ifconfig -a  
  lo0: flags=849<UP,LOOPBACK,RUNNING,MULTICAST> mtu 8232  
      inet 127.0.0.1 netmask ff000000  
  mle0: flags=843<UP,BROADCAST,RUNNING,MULTICAST> mtu 4352  
      inet 136.162.65.30 netmask ffffff00 broadcast 136.162.65.255  
      ether 0:0:be:0:8:c5  

At this point, the device node, such as /dev/mle0, can be used to access the network from Solaris commands such as snoop(1M).

Switch Ethernet or FDDI Pathgroup

To perform a switch on an Ethernet or FDDI pathgroup, use the apconfig(1M) command:

  # apconfig -P mle0 -a le2  
  # apconfig -N  
  
  metanetwork:    mle0  
  physical devices:  
                  le2  A  
                  le0  P  

-P specifies the pathgroup and -a specifies the alternate that you want to become active. As you can see in the listing produced by apconfig -N, the active alternate has been switched to le2, as indicated by the A following le2. You can perform a switch like this even when the network contains traffic.

Warning - When you switch paths, AP does not check to verify that data can be transmitted over the path to which you are switching (although it does determine whether or not that path is detached or offline). You may wish to
verify the status of the path before switching to it by performing an I/O operation such as snoop(1M). AP does not produce any error or warning messages if you switch to a path that is not functioning properly.

Deleting Network Pathgroups

To delete a network pathgroup, remove all usage of the corresponding meta-network, and use apnet -d:

  # ifconfig mle0 down unplumb  
  # apnet -d mle0  
  # apconfig -N  
  
  metanetwork:    mle0  D  
  physical devices:  
                  le2  A  
                  le0  P  

In the listing produced by apconfig -N, a D follows mle0, indicating that the pathgroup is marked as deleted. To complete the deletion, commit the entries in the database with apdb -C:

  # apdb -C  
  # apconfig -N  
  #  

As you can see, the apconfig -N command produces no listing, indicating that the network pathgroup (the only one that existed previously) has been deleted.
You can undo a deletion if the deletion is uncommitted. To undo a deletion, run apnet -z, specifying the same meta-network interface that you previously deleted.

Note - When an apnet -m -r or apnet -m -a command is executed, AP marks the current pathgroup configuration as deleted and creates a new uncommitted pathgroup definition. Once the database change is committed via apdb -C, the new definition replaces the old.

Alternately Pathing the Primary Network Interface

The primary network interface between your Sun server and the other machines on the network is the Ethernet interface that is on the same subnet as the SSP. One way to identify the primary network is to look in the /etc/hostname.xxx files until you find the one that contains the IP name that matches the IP name found in the file /etc/nodename. The corresponding xxx network (e.g., qe0) is the primary network.
You can alternately path the primary network, if you wish. The primary network is the only network interface that can be auto-switched at boot-time. During the boot process, if the active alternate for the primary network fails, the system attempts to find a working alternate. Note that the AP database on your Sun server is used for this purpose.
Recall that a subset of the host's AP database that resides on the SSP is used at boot time to automatically switch to a functional path to the boot disk. By the time the system is ready to start using the network, the file systems on the host are already up and running, so the main AP database can be used.
When you configure an alternately pathed network, you must not configure the meta-network while the underlying driver is still active. When you configure AP for a network that you are currently using, the transition period between configuring the physical interface down and the AP interface up generates a loss of network service for your Sun server. To perform this transition, you should use one of the following procedures, which are shown in order of preference:
  • Create the appropriate AP database entries, create a new /etc/hostname.mxxx file, remove (or rename) the corresponding /etc/hostname.xxx file, and then reboot your Sun server.
  • Set up a script file to perform the transition on your Sun server.
  • Log into your Sun server via another network interface to allow commands to be issued when the network service is lost on the network interface that you are bringing up under AP.
The following example shows how to reconfigure the primary network using all three of these approaches. This example assumes you have a Sun server named hmb with a primary network interface on qe0, and that you want to have a meta-network interface composed of qe0 and qe4.
First, verify that the primary network interface is qe0:

  # cat /etc/nodename  
  hmb  
  # cat /etc/hostname.qe0  
  hmb  
  #  

Next, create the new network pathgroup and commit the changes:

  # apnet -c -p qe0 -a qe4  
  # apdb -C  

Verify the new pathgroup by looking at committed network entries in the AP database:

  # apconfig -N  
  metanetwork:    mqe0  
  physical devices:  
                     qe4  
                     qe0  P A  

Create the new hostname.mxxx file so the network will be automatically configured at boot time:

  # cat > /etc/hostname.mqe0  
  hmb  
  ^D  
  # cat /etc/hostname.mqe0  
  hmb  

Remove the configuration files for the physical network interfaces:

  # rm -f /etc/hostname.qe0 /etc/hostname.qe4  

The next step is to bring down the physical network interfaces and bring up the meta-network interface. As mentioned earlier, the underlying physical network interfaces must be taken down before you bring up the meta-network. You could follow any of the following three procedures:
  1. Reboot the machine. The qe0 and qe4 network interfaces are automatically taken down, and /etc/hostname.mqe0 causes the meta-network interfaces to be started automatically on reboot. The individual interfaces qe0 and qe4 will not be automatically started, since their /etc/hostname files have been deleted.

  2. Generate a script to configure the qe0 and qe4 interfaces down, then configure up the meta-network interface. You can use ifconfig -a to determine the parameters that you need to enter into the script:


  # ifconfig -a  
  lo0: flags=849<UP,LOOPBACK,RUNNING,MULTICAST> mtu 8232  
  inet 127.0.0.1 netmask ff000000  
  qe0: flags=863<UP,BROADCAST,NOTRAILERS,RUNNING,MULTICAST> mtu  
  1500  
  inet 136.162.22.45 netmask ffffff00 broadcast 136.162.22.255  
  ether 0:0:be:0:8:c5  
  # cat > /tmp/hmb.restart  
  ifconfig qe0 down unplumb  
  ifconfig qe4 down unplumb  
  ifconfig mqe0 plumb  
  ifconfig mqe0 inet 136.162.22.45 broadcast + netmask + up  
  ^D  
  # chmod 755 /tmp/hmb.restart  
  # nohup /tmp/hmb.restart &  

  1. If the machine supports another active interface, log into your Sun server via one of the alternate interfaces and issue the following commands:


  # ifconfig qe0 down unplumb  
  # ifconfig qe4 down unplumb  
  # ifconfig mqe0 plumb  
  # ifconfig mqe0 inet 136.162.22.45 broadcast + netmask + up