Jump to content United States-English
HP.com Home Products and Services Support and Drivers Solutions How to Buy
» Contact HP
More options
HP.com home
HP Auto Port Aggregation Administrator's Guide: HP-UX 11.0, 11i v1, 11i v2 > Appendix C  Configuring HP APA by Editing Files

Editing Configuration Files for Link Aggregates

» 

Technical documentation

Complete book in PDF
» Feedback
Content starts here

 » Table of Contents

 » Glossary

 » Index

This section shows how to configure the three modes associated with port aggregation.

For release-specific information, see the release notes on your system in the /opt/networkdocs directory or on the web at:

http://www.docs.hp.com

IMPORTANT: The following information applies to each of the hpapa start and hpapa stop sequences listed on the following pages.

If you are configuring more than one of the four port-configuration modes described here, minimize the number of times you must enter hpapa stop (which can interrupt traffic on existing link aggregates) by editing all configuration files first. You then only need to enter one series of hplm stop (optional), hpapa stop, hpapa start, and hplm start (optional) commands to activate the link aggregates and failover groups.

NOTE: HP APA also requires that you configure the trunking mode (AUTO or MANUAL) of your switches to match the mode being used on the server: Cisco Fast EtherChannel (FEC), IEEE 802.3ad Link Aggregation Control Protocol (LACP), or MANUAL mode.

Editing Files for MANUAL, FEC_AUTO, or LACP_AUTO Mode

  1. Ensure that the switch ports and the HP LAN card ports are set to the same APA (or trunking) mode (MANUAL or AUTO), speed, and duplex mode.

  2. Use the lanadmin command, if you need to verify that all HP LAN card ports intended for aggregation are connected to the LAN.

  3. Remember that APA instance numbers begin with 900 (all versions of HP-UX 11i) or 100 (HP-UX 11.0).

MANUAL Port Configuration Mode

To configure lan1 and lan2 in link aggregate 900 with MAC-based load balancing, do the following:

  1. Edit the /etc/rc.config.d/hp_apaconf file and add the following entries:

    HP_APA_INTERFACE_NAME[0]=lan900
    HP_APA_LOAD_BALANCE_MODE[0]=LB_MAC
    HP_APA_MANUAL_LA[0]="1,2"
  2. Edit the /etc/rc.config.d/hp_apaportconf file and add the following entries. If this is the first-time configuration, the configuration mode is already set to the default of MANUAL:

    HP_APAPORT_INTERFACE_NAME[0]=lan1
    HP_APAPORT_CONFIG_MODE[0]=MANUAL
    HP_APAPORT_INTERFACE_NAME[1]=lan2
    HP_APAPORT_CONFIG_MODE[1]=MANUAL
  3. Activate the new configuration by entering:

    # /sbin/init.d/hplm stop 1
    # /sbin/init.d/hpapa stop  2
    # /sbin/init.d/hpapa start
    # /sbin/init.d/hplm start 3
    1

    If failover groups are also configured.

    2

    This can interrupt traffic on existing link aggregates.

    3

    For configuring failover groups.

FEC_AUTO Port Configuration Mode

To configure load balancing and group capability for link aggregate 901 with MAC-based load balancing, do the following:

  1. Edit the /etc/rc.config.d/hp_apaconf file and add the following entries:

    HP_APA_INTERFACE_NAME[0]=lan901
    HP_APA_LOAD_BALANCE_MODE[0]=LB_MAC
    HP_APA_GROUP_CAPABILITY[0]=901
  2. Edit the /etc/rc.config.d/hp_apaportconf file and add the following entries to put lan1 and lan2 into link aggregate 901:

    HP_APAPORT_INTERFACE_NAME[0]=lan1
    HP_APAPORT_GROUP_CAPABILITY[0]=901
    HP_APAPORT_CONFIG_MODE[0]=FEC_AUTO
     
    HP_APAPORT_INTERFACE_NAME[1]=lan2
    HP_APAPORT_GROUP_CAPABILITY[1]=901
    HP_APAPORT_CONFIG_MODE[1]=FEC_AUTO
  3. Activate the new configuration by entering:

    # /sbin/init.d/hplm stop 1
    # /sbin/init.d/hpapa stop  2
    # /sbin/init.d/hpapa start
    # /sbin/init.d/hplm start 3
    1

    If failover groups are also configured.

    2

    This can interrupt traffic on existing link aggregates.

    3

    For configuring failover groups.

NOTE: Set the group capability in the previous examples to be the same as that of the link aggregate to which it belongs. Ports going to different link aggregates should have different group capabilities.

LACP_AUTO Port Configuration Mode

To configure load balancing and the port key for link aggregate 902 with MAC–based load balancing, do the following:

  1. Edit the /etc/rc.config.d/hp_apaconf file and add the following entries:

    HP_APA_INTERFACE_NAME[0]=lan902
    HP_APA_LOAD_BALANCE_MODE[0]=LB_MAC
    HP_APA_KEY[0]=902
  2. Edit the /etc/rc.config.d/hp_apaportconf file and add the following entries to put lan1 and lan2 into link aggregate 902 and set the APA port key and the configuration mode:

    HP_APAPORT_INTERFACE_NAME[0]=lan1
    HP_APAPORT_KEY[0]=902
    HP_APAPORT_CONFIG_MODE[0]=LACP_AUTO
    HP_APAPORT_INTERFACE_NAME[1]=lan2
    HP_APAPORT_KEY[1]=902
    HP_APAPORT_CONFIG_MODE[1]=LACP_AUTO
    NOTE: Set the LACP_AUTO key in the previous examples to be the same as that of the link aggregate to which it belongs. Ports going to different link aggregates should have different keys.
  3. Activate the new configuration by entering:

    # /sbin/init.d/hplm stop 1
    # /sbin/init.d/hpapa stop  2
    # /sbin/init.d/hpapa start
    # /sbin/init.d/hplm start 3
    1

    If failover groups are also configured.

    2

    This can interrupt traffic on existing link aggregates.

    3

    For configuring failover groups.

Editing Configuration Files for Failover Groups

If you are configuring a failover group for the first time, or if you have changed the failover group configuration, do the following:

  1. Connect the physical devices that are to be in the failover group to the same switch, or to different switches or hubs on the same subnet to achieve switch/hub redundancy.

    NOTE: Be sure that trunking is not enabled on the switch ports.
  2. Check that there is link connectivity between the devices (linkloop). If it fails, resolve the physical connection between the devices.

  3. Edit the /etc/rc.config.d/hp_apaportconf file and assign the and standby physical ports to LAN_MONITOR mode. For example, the following entries put lan1 and lan2 into a failover group:

    HP_APAPORT_INTERFACE_NAME[0]=lan1
    HP_APAPORT_CONFIG_MODE[0]=LAN_MONITOR
    
    HP_APAPORT_INTERFACE_NAME[1]=lan2
    HP_APAPORT_CONFIG_MODE[1]=LAN_MONITOR
  4. Activate the configuration by entering:

    # /sbin/init.d/hplm stop 
    # /sbin/init.d/hpapa stop
    # /sbin/init.d/hpapa start
    # /sbin/init.d/hplm start

  5. If the device to be the link does not have the desired IP address, add the IP address for the port or link aggregation to /etc/rc.config.d/netconf. Editing that file or using SAM will preserve the IP address permanently (across reboots).

    Alternatively, you can also temporarily assign an IP address to the link and change the mode of the link and all standby links to LAN_MONITOR. For example, ifconfig lan1 192.5.5.138

  6. Query the system for possible link failover groups by entering the lanqueryconf -s -c /tmp/filename command.

    CAUTION: Running lanqueryconf -s will overwrite the original /etc/lanmon/lanconfig.ascii file.

    This command queries the system and network for all possible failover groups. The results of the query are placed in the /tmp/filename configuration file. This file contains data similar to the following:

    POLLING_INTERVAL                10000000
    DEAD_COUNT                      3
    LM_RAPID_ARP                    off
    LM_RAPID_ARP_INTERVAL           1000000
    LM_RAPID_ARP_COUNT              10
    FAILOVER_GROUP                  lan900
            STATIONARY_IP   192.1.1.1
            STANDBY         lan11   3
            PRIMARY         lan10   5
  7. Compare the /etc/lanmon/lanconfig.ascii file with the /tmp/filename file.

    If they are not the same, decide which file you want to use. If you want to use the file in /tmp, copy that file to /etc/lanmon/lanconfig.ascii.

  8. Edit the /etc/lanmon/lanconfig.ascii file and change the number of ports in the failover groups, the dead count, poll interval, rapid ARP setting, rapid ARP interval, rapid ARP count, and stationary IP address. The following example shows a failover group entry that contains an IPv6 address:

    FAILOVER_GROUP                  lan901
                STATIONARY_IP   fe80::1
                STANDBY         lan11   3
                PRIMARY         lan4    5
                PRIMARY         lan1    3
                PRIMARY         lan2    3
                PRIMARY         lan3    3
  9. Verify that the configuration in /etc/lanmon/lanconfig.ascii is still valid by using the lancheckconf command.

  10. Create the failover groups specified in the configuration file by using the lanapplyconf command.

    This command creates the specified failover groups.

    Check the failover groups by using the lanscan -q and netstat -in commands.

    NOTE: If you later want to delete all the failover groups created, enter the landeleteconf command.
  11. The failover group is now operational. A reboot will restart the failover group as long as the /etc/lanmon/lanconfig.ascii file is intact.

Example: Configuring a Failover Group

Suppose you want to configure a simple, two-port LAN Monitor failover group on a K-class system. You enter the netstat and ioscan commands as follows:

# netstat -in
Name Mtu  Network    Address      Ipkts      Opkts
lan1 1500 192.1.1.0  192.1.1.153  9504123    12437048
lan0 1500 191.1.1.0  191.1.1.1    11202      257458
lo0  4136 127.0.0.0  127.0.0.1    417        417
# ioscan -fkC lan
Class     I  H/W Path  Driver      S/W State   H/W Type     Description
========================================================================
lan       1  8/8/1/0   igelan      CLAIMED     INTERFACE    HP PCI 1000Base-T Core
lan       2  8/8/2/0   igelan      CLAIMED     INTERFACE    HP PCI 1000Base-T Core
lan       3  8/12/1/0  igelan      CLAIMED     INTERFACE    HP PCI 1000Base-T Core
lan       4  8/12/2/0  igelan      CLAIMED     INTERFACE    HP PCI 1000Base-T Core
lan       0  10/12/6   lan2        CLAIMED     INTERFACE    Built-in LAN
#

The netstat output shows that lan1 is currently configured with IP address 192.1.1.153. The ioscan output shows spare 1000Base-T devices lan2, lan3, and lan4.

You decide that lan2 will be the standby link for the failover group, with lan1 as the device.

To configure the failover group, do the following:

  1. Connect lan1 and lan2 to the same switch or to different switches or hubs on the same subnet.

    NOTE: Be sure that trunking is not enabled on the switch ports.
  2. Obtain the station address for lan2 by issuing the lanscan command, as follows:

    # lanscan
    
    Hardware Station        Crd Hdw   Net-Interface  NM  MAC    HP-DLPI DLPI
    Path     Address        In# State NamePPA        ID  Type   Support Mjr#
    8/8/2/0  0x0060B04B7B83  2  UP    lan2 snap2     3   ETHER  Yes     119
    8/12/2/0 0x0060B04B7B82  4  UP    lan4 snap4     4   ETHER  Yes     119
    8/8/1/0  0x080009D43696  1  UP    lan1 snap1     5   ETHER  Yes     119
    10/12/6  0x001083953C1C  0  UP    lan0 snap0     6   ETHER  Yes     119
    8/12/1/0 0x001083953C1D  3  UP    lan3 snap3     7   ETHER  Yes     119
    LinkAgg0 0x000000000000  900 DOWN   lan900 snap900 9   ETHER  Yes     119
    LinkAgg1 0x000000000000  901 DOWN   lan901 snap901 10  ETHER  Yes     119
    LinkAgg2 0x000000000000  902 DOWN   lan902 snap902 11  ETHER  Yes     119
    LinkAgg3 0x000000000000  903 DOWN   lan903 snap903 12  ETHER  Yes     119
    LinkAgg4 0x000000000000  904 DOWN   lan904 snap904 13  ETHER  Yes     119

    The station address is 0x0060B04B7B83.

  3. Verify that there is link connectivity between lan1 and lan2, as follows:

    # linkloop -i 1 0x0060B04B7B83
    Link connectivity to LAN station: 0x0060B04B7B83
    -- OK
    #

    If there is no link connectivity, resolve the connectivity issue between the devices.

  4. Verify that an entry exists in the /etc/rc.config.d/hp_apaportconf file for the and standby interfaces that sets the interfaces' port configuration mode to LAN_MONITOR.

    HP_APAPORT_INTERFACE_NAME[0]=lan1
    HP_APAPORT_CONFIG_MODE[0]=LAN_MONITOR
    
    HP_APAPORT_INTERFACE_NAME[1]=lan2
    HP_APAPORT_CONFIG_MODE[1]=LAN_MONITOR
  5. Activate the configuration by entering:

    # /sbin/init.d/hplm stop 
    # /sbin/init.d/hpapa stop
    # /sbin/init.d/hpapa start
    # /sbin/init.d/hplm start

  6. If the device to be the link does not have the desired IP address, enter ifconfig to assign the IP address. Also add an entry to the /etc/rc.config.d/netconf file to assign the IP address permanently (or use SAM to do it).

    # ifconfig lan1 192.1.1.153
  7. Enter the lanqueryconf -s command to query the system for possible failover groups.

    # lanqueryconf -s

    ASCII output is in the /etc/lanmon/lanconfig.ascii file.

    1. Verify that the content of the ASCII file is valid. Enter lancheckconf:

      # lancheckconf
    2. View the contents of the /etc/lanmon/lanconfig.ascii file and verify that it contains the configuration information you want.

      # cat /etc/lanmon/lanconfig.ascii

      See “lanconfig.ascii File” for an example of this file.

    3. Verify that /etc/lanmon/lanconfig.ascii has the failover group configured, as planned.

      # cat /etc/lanmon/lanconfig.ascii
    4. Edit the file, if needed, and enter lancheckconf again.

  8. Use the lanapplyconf command to build the failover group, and check it with the lanscan -q and netstat -in commands:

    # lanapplyconf
    Reading ASCII file /etc/lanmon/lanconfig.ascii
    Creating Fail-Over Group lan900
    # lanscan -q
    4
    0
    3
    900        1 2
    901
    902
    903
    904
    # netstat -in
    Name      Mtu Network       Address       Ipkts   Opkts
    lan0     1500 191.1.1.0     191.1.1.1      1794    1173
    lo0      4136 127.0.0.0     127.0.0.1       390     390
    lan900   1500 192.1.1.0     192.1.1.153       0       0
    
  9. The failover group is now operational. A reboot will restart the failover group as long as the /etc/lanmon/lanconfig.ascii file is intact and the port or link aggregation has an IP address in /etc/rc.config.d/netconf that matches the failover group's Stationary IP entry in /etc/lanmon/lanconfig.ascii.

If lan1 fails, lan2 becomes the active port. Similarly, if the failover group consists of two link aggregates, failover from the link aggregate to the standby link aggregate occurs only when all ports in the link aggregate failed. However, the examples in the next section show how proactive failover gives you greater control of the failover.

Proactive Failover Examples

For the May 2005 and later releases of HP APA for HP-UX 11i v1 (B.11.11.20) and PHNE_33116 (B.11.11.17) patch release, proactive failover relies on measuring and calculating efficiency. The efficiency of a link aggregate or individual port in a failover group is affected by the following:

  • The number of ports in each member of the failover group

  • The effective throughput of the switch or router to which the failover group members are connected

The following examples show how each affects the proactive failover operation.

Example 1

You want to configure a failover group (lan902) for proactive failover. You decide that failover group consists of two link aggregates: lan900 and lan901. The lan900 aggregate consists of ports 1, 2, and 3; the lan901 aggregate consists of ports 4 and 5. Ports 1, 2, 3, 4, and 5 have speeds of 100 Mb/s. In addition, you want the link aggregate with the most operational ports at any point in time to be the active link in the failover group.

NOTE: You can apply the methodology in this example to failover groups consisting of any number of link aggregates and ports.

To configure the failover group for proactive failover, do the following:

  1. Determine network efficiency.

    In this example, you assign both lan900 and lan901 a cost of 1.

  2. Assign a priority to the aggregates.

    If you prefer lan900 to be the active port when both link aggregates have the same number of operational ports, assign lan900 a higher priority. If you do not, the active port changes when one of the link aggregates becomes more efficient (has more operational ports or higher bandwidth). In this example, you assign lan900 a priority of 5 and lan901 a priority of 3.

  3. Edit the lanconfig.ascii configuration file.

    FAILOVER_GROUP                   lan902
    
            STATIONARY_IP    192.19.20.2
    #    Primary/Standby        Interface    Priority : Cost
    # –––––––––––––––––––––––+–––––––––––––+––––––––––––––––
            PRIMARY          lan900  5 : 1
            STANDBY          lan901  3 : 1
    
    

Table C-1 lists lan900 events for this example and how proactive failover determines the active port for lan902.

Table C-1 lan900 Events and Proactive Failover (Equal Network Costs)

lan900 Eventlan900 Normalized Port Costlan901 Normalized Port CostActive Port

Failover group constructed[1]

1/300, or .003

1/200, or .005

lan900[2]

1 port fails

1/200, or .005

1/200, or .005

lan900[3]

1 port fails

1/100, or .01

1/200, or .005

lan901[4]

DOWN port becomes active

1/200, or .005

1/200, or .005

lan900[5]

[1] All ports in the link aggregates are operational.

[2] Normalized port cost is lower than lan901.

[3] Normalized port cost is the same, but it has a higher priority than lan901.

[4] Normalized port cost is lower than lan900.

[5] Normalized port cost is the same, but it has a higher priority than lan901.

If the priorities were the same, lan901 would continue as the active port until the third port in lan900 became active.

 

Example 2

You want to configure a failover group (lan902) for proactive failover. You decide that the failover group consists of two link aggregates: lan900 and lan901. The lan900 aggregate consists of ports 2 and 3; the lan901 aggregate consists of ports 4 and 5. Ports 2, 3, 4, and 5 have speeds of 100 Mb/s. In addition, the link aggregates are connected to different routers using different speeds to connect to the network.

To configure the failover group for proactive failover, do the following:

  1. Determine network efficiency.

    In this example, you determine that the router connected to lan900 is 1.5 times more efficient at delivering traffic to the network than the router connected to lan901. You assign lan900 a cost of 1 and lan901 a cost of 1.5. However, you must express cost values in the lanconfig.ascii file using whole numbers (no decimal points). The ratio of 1 to 1.5 is the same as the ratio of 2 to 3. Therefore, lan900 has a cost of 2 and lan901 has a cost of 3.

  2. Assign a priority to the aggregates.

    Because you prefer lan900 over lan901, you assign lan900 a priority of 8 and lan901 a priority of 7. That way, if both ports have the same normalized port cost, lan900 has precedence over lan901.

  3. Edit the configuration file.

    FAILOVER_GROUP                  lan902
    
            STATIONARY_IP   10.0.1.60
    #    Primary/Standby        Interface    Priority : Cost
    # –––––––––––––––––––––––+–––––––––––––+––––––––––––––––
            PRIMARY         lan900  8 : 2
            STANDBY         lan901  7 : 3
    
    

Table C-2 lists lan900 events for this example and how proactive failover determines the active port for lan902.

Table C-2 lan900 Events and Proactive Failover (Unequal Network Costs)

Eventlan900 Normalized Port Costlan901 Normalized Port CostActive Port

Failover group constructed[1]

2/200, or .010

3/200, or .015

lan900[2]

Port 2 on lan900 is DOWN

2/100, or .020

3/200, or .015

lan901[3]

Port 2 on lan900 is UP

2/200, or .010

3/200, or .015

lan900[4]

Port 4 on lan901 is DOWN

2/200, or .010

3/100, or .030

lan900[5]

Port 4 on lan901 is UP

2/200, or .010

3/200, or .015

lan900[6]

Ports 2 and 3 on lan900 are DOWN

0

3/200, or .015

lan901[7]

[1] All ports in the link aggregates are operational.

[2] Normalized port cost is lower than lan901.

[3] Normalized port cost is lower than lan900.

[4] Normalized port cost is lower than lan901.

[5] Normalized port cost is lower than lan901.

[6] Normalized port cost is lower than lan901.

[7] This behavior is the same as if lan902 were a priority-based failover group.

 

Printable version
Privacy statement Using this site means you accept its terms Feedback to webmaster
© 2007 Hewlett-Packard Development Company, L.P.