APA - Auto Port Aggregation

domingo, 8 de janeiro de 2012

HP APA, the HP link aggregation or trunking product, provides the ability to logically group two or more physical network ports into a single “Fat Pipe”, often called a “trunk”. Network traffic is load balanced across all of the links in the aggregation, which allows you to build large bandwidth logical links into the server that are highly available and completely transparent to the client and server applications. This version of HP APA is available for HP-UX 11i v3. For HP-UX 11i v1 and v2, use the HP APA product at HP Auto Port Aggregation - J4240AA.
You have three ways to configure APA, you can do it through SAM/SMH, command line or editing the configuration files.


1. Log in the server and call the smh:
# smh
Choose Networking and communication.
2. Choose network interface configuration
3. Choose network interface card
Ensure that none of the two interfaces have IP address.
Select network card and press enter.
4. Choose Auto port Aggregation
5. Choose c - create link aggregate.
6. Select Mode = LACP_AUTO and choose both network card and select OK.
Click on OK
7. Now you get aggregated network interface name.
8. Press Enter and assign IP address and other details.
Choose p – View / Modify IP Attributes and put your IP address.

Command line (11.31)

In addition to the preferred SMH GUI and TUI interfaces for configuring and managing HPAPA, HP-UX provides the nwmgr command for managing all LAN-basedand IB-basednetworkinterfaces.The
nwmgr command serves as a single tool for performing all network interface-related tasks, offering the functionality provided by the lanscan, lanadmin, linkloop, lanapplyconf and landeleteconf commands.

Check the current configuration:

# nwmgr -g
This command will show your configuration/status of your NIC and APA if you have it configurated

# nwmgr -g -S apa
This command show just the APA configuration/status.

Now you can choose any configuration mothoods, follow two options useful:

To create a MANUAL mode link aggregate lan900 from ports lan1 and lan2, enter the following command:
# nwmgr -a -A links=1,2 -A mode=MANUAL -I 900 -S apa

# nwmgr -s -S apa -A all --saved --from cu

The port's priority if the link aggregation mode will be MANUAL and will use Hot Standby. The port with thehighest priority will be the primary port.

Now proceed with the creation of the new failover group for lan0 and lan1:

# nwmgr -a -S apa -c lan900 -A links=0,1 -A mode=LAN_MONITOR

# nwmgr -s -S apa -A all --saved --from cu

HP APA enables you to combine 2 to 32 physical link ports into one failover group. A fail over group is a link aggregate in LAN_MONITOR mode.

Check yours interfaces:

# netstat -ni
Check the APA configuration:

# nwmgr -g -S apa

Check if all ports are active:

# nwmgr -v -c lanXXX

Remove a interface from the group:

# nwmgr -d -S apa -c lan901 -A links=1


(nwmg) Make changes persist across reboots with the --saved option.You can also use the lanadmin (lanadm was replaced by nwmgr in the 11.31) command from the HP-UX command line prompt to make temporary changes to APA. However, if you change some variables using the lanadmin command, those changes are not preserved across reboots.

Editing the configuration files

Follow the APA configuration files:

 /etc/rc.config.d/hp_apaconf -  This file contains configurationvalues for link aggregates.
 /etc/rc.config.d/hp_apaportconf - This file contains configuration values for specific physical ports that are supported by HP APA.

APA Parms for Link Aggregates — hp_apaconf

In preparing an APA configuration, special attention should be given to the load balancing policy, protocol settings, and lan selections.
Determine the Load Balancing Policy
Use LB_MAC based load balancing for Server-to-Switch configurations. This algorithm uses a portion of the MAC address to determine how data is distributed across physical ports. This is the default and most common algorithm for all link aggregates.

Use LB_IP for Server-to-Router configurations. Be careful with this option because many routers do not support APA. Additionally, if switches are used between the server and the router expect additional complexity.

Use LB_PORT for server-to-server configurations. LB_PORT uses the TCP/UDP protocol to distribute traffic across the aggregate ports. If you don’t have a capable router or switch, this is your only option.

Determine the Protocol Settings
Your choice is determined by the capabilities of the switch, router, or server. APA is not supported on all routers and switches. Check with you networking group to determine your switch/router’s APA capabilities. The switch and server must have matching protocols.

* FEC_AUTO – Cisco’s proprietary Fast EtherChannel (FEC/PAgP) technology). This is NOT standard for all CISCO switches.
* lACP_AUTO – IEEE 802.2ad link aggregation control protocol (LACP)
* MANUAL configured port trunks (Default)


Configure lans 1,2 and 3 into an aggregate called lan900 for each of the three configuration modes. Where values are not entered, assume the defaults.

For MANUAL configuration:

Edit the hp_apaconf file

HP_APA_MANUAL_LA[0]=”1,2,3″ <— lans 1, 2 and 3

Edit the hp_apaportconf file


FEC_AUTO Port Configuration Mode

Edit hp_apaconf

HP_APA_GROUP_CAPABILITY[0]=900 <– Any integer value pointing to the physical ports in the hp_apaportconf

Edit hp_apaportconf
HP_APAPORT_GROUP_CAPABILITY[0]=900 <— must be the same value as in hp_apaconf

LACP_AUTO Port Configuration Mode

Edit hp_apaconf

HP_APA_KEY[0]=900 <— an integer value pointing to the physical ports in hp_apaportconf

Edit hp_apaportconf
HP_APAPORT_KEY[0]=900 < — must be the same value as HP_APA_KEY in hp_apaconf

To stop/start the new configuration (APA doesn’t require a reboot to take effect)

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

Assign an ipaddress to lan900.

# ifconfig lan900 ipaddress netmask netmaskaddress
# ifconfig lan900 # # to check
# modify /etc/rc.config.d/netconf ##to make the ipaddress permanent

Verify the status of the link aggregate

* lanadmin -x -v 900 ## will show the number of ports, state, mode
* lanscan -v ## verify which link aggregates have been configured.
* lanadmin –x –p 2 900 ## verify the status of a particular port.

Editing configurations files can minimize the number of stops (which caninterrupt traffic on existing link aggregates). You will then only need to run one series of hplm stop(optional);
hpapa stop
hpapa start
hplm start (optional) to activate the link aggregates and (optionally) fail over groups.