Learn APA configuration in HPUX. Auto port aggregation logic is similar to network teaming in Linux. Used for network card hardware-level redundancy.
APA stands for Auto Port aggregation. It is software i.e. operating system level configuration which offers NIC (Network Interface Card also referred to as LAN card) redundancy. We have already briefed about APA in this post, refer to the first paragraph.
Also read : Network bonding-teaming in Linux
Let’s run down to configuration steps for APA in HPUX in failover group mode.
Step 1.
You need to have teaming software installed on your system. The Teaming (Auto PORT Aggregation) application is inbuild in HP-UX 11i V2 EOE. If not you can download it from the HP software repository and install it on your HPUX server.
Step 2.
Make sure your primary network interface card (NIC) is configured with a proper IP address, mask, and gateway. Use netstat -in
command.
# ioscan -funC lan
Class I H/W Path Driver S/W State H/W Type Description
===================================================================
lan 1 1/1/0 gelan CLAIMED INTERFACE HP A4926A PCI 1000Base-SX Adapter
/dev/gelan4
Let’s assume we have identified lan1
as a secondary NIC for our config. lan0
being the primary one.
Secondly, identify your second NIC which can be used as secondary card in APA configuration (Use ioscan -fnClan
command). Make sure this card is connected to a different network switch, configured with the same VLAN as primary on the network end, and is physical does not reside in the same hardware module of primary NIC. This ensures high availability in case of network, switch, or card hardware failure.
To confirm both cards have same network reachability (i.e. on same VLAN) use below command :
# linkloop -i PPA_pri StationAddr_sec
# linkloop -i 1 0x00108323463C
Link connectivity to LAN station: 0x00108323463C
-- OK
---- failure output means no connectivity----
Link connectivity to LAN station: 0x00108323463C
error: get_msg2 getmsg failed, errno = 4
-- FAILED
frames sent : 1
frames received correctly : 0
reads that timed out : 1
where station address is MAC (can be obtained from lanscan
output) and PPA number is lan0
, lan1
number. Try in both ways. using MAC of primary and PPA of secondary and vice versa to make sure you have connectivity between both cards. If you get shown failed error then those two cards cant be used in APA config together.
Step 3.
Edit configuration file /etc/rc.config.d/hp_apaportconf
and mention interface names (lan0
and lan1
in our case) like below:
HP_APAPORT_INTERFACE_NAME[0]=lan0
HP_APAPORT_CONFIG_MODE[0]=LAN_MONITOR
HP_APAPORT_INTERFACE_NAME[1]=lan1
HP_APAPORT_CONFIG_MODE[1]=LAN_MONITOR
Step 4.
Start APA services.
# /sbin/init.d/hpapa start
/sbin/init.d/hpapa started.
Please be patient. This may take about 40 seconds.
HP_APA_DEFAULT_PORT_MODE = MANUAL
/usr/sbin/hp_apa_util -S 0 LAN_MONITOR
/usr/sbin/hp_apa_util -S 1 LAN_MONITOR
/sbin/init.d/hpapa Completed successfully.
# /sbin/init.d/hplm start
Step 5.
Now, we will create a LAN configuration file that can be applied later to both NIC to make them aware they are working in a group under the same IP umbrella. lanqueryconf
command creates ASCII file at /etc/lanmon/lanconfig.ascii
# lanqueryconf -s
# more /etc/lanmon/lanconfig.ascii
NODE_NAME teststation
POLLING_INTERVAL 10000000
DEAD_COUNT 3
FAILOVER_GROUP lan900
STATIONARY_IP 10.10.2.5
PRIMARY lan0 5
STANDBY lan1 3
See the content of this ASCII file. It has node name, polling interval (microseconds, default is 10 sec). The dead count is the number of polling packets missed to consider failure and initiate failover (default is 3). The failover group is lan name which will be visible systemwide. lan900
will have our primary NIC address and lan0
, lan1 will work together as lan900
. IP is IP taken up by lan900
. lan0
will be treated as primary NIC and lan1 as standby. Number 5,3 denotes priorities of respective NIC.
You can make changes in this file if you dont want to go with default values.
Step 6.
The above file is generated for admin to edit if any changes required. After that, the file will be checked for integrity and then can be applied to APA configuration like below :
# lancheckconf
Reading ASCII file /etc/lanmon/lanconfig.ascii
Verification of input file /etc/lanmon/lanconfig.ascii is complete.
# lanapplyconf
Reading ASCII file /etc/lanmon/lanconfig.ascii
Creating Fail-Over Group lan900
Updated binary file /etc/lanmon/lanconfig
Here lan900
is created and you APA is complete.
Step 7.
Now you can see lan0
and lan1
vanish from lanscan -q
output and instead lan900
appeared with 0 and 1 as its members.
# lanscan -q
2
3
900 0 1
901
You can verify that lan900
will have an IP address which was configured on primary NIC lan0
before configuration (in netstat -in
output).
You can even test if APA failover is happening correctly. Follow this testing procedure to make sure your APA works properly. Sometimes lan900
won’t appear and you need to restart your system. The rebooting system takes up a new APA configuration and you will able to see lan900
in action.
If there is more than one APA configured on the system then it will follow the series of lan901
, lan902
, and so on.
Share Your Comments & Feedback: