Operating System - HP-UX
1833772 Members
2131 Online
110063 Solutions
New Discussion

How to find Master/Slave card on HPUX 11i ?

 
Prakash Achuthan
Occasional Advisor

How to find Master/Slave card on HPUX 11i ?

Hi,

This question is on autoport aggregation.

I want to know if there is a way to find whether my nic card is a Master/Slave (linux bonding terminology) using ioctl calls on HPUX 11i.

Basically, I would like to find, whether the card is n a link aggregate using IOCTL calls ?.

On linux, I can do it this way:

if ((skfd = socket(AF_INET, SOCK_DGRAM, 0)) >= 0)
{
strcpy(ifr.ifr_name, mInterfaceName.c_str());
if (ioctl(skfd, SIOCGIFFLAGS, &ifr) >= 0)
{
if (ifr.ifr_flags & IFF_SLAVE)
{
bond = BondSlave;
}
else {
if (ifr.ifr_flags & IFF_MASTER)
{
bond = BondMaster;
}
else
{
bond = BondNone;
}
}
foundBondState = true;
}
close(skfd);

Thanks,
Prakash
1 REPLY 1
sven verhaegen
Respected Contributor

Re: How to find Master/Slave card on HPUX 11i ?

HI

I think I do not understand your question completely but the data you provide makes me think that you expect one card to be the master of all the others in APA agregation thus steering the data transmission on the agregate with load balancing, this isn't the case as far as I know in APA , in fact it is the APA software which handles this and it just equally distributes the data stream over the available interfaces without priority , the only thing in which one card is put up as "primary or masterlike" is with the mac address used as reference in the packets leaving any of the agregated interfaces, that mac address is normally taken from the card with the lowest instance number in the agregate and might change to the next if that card gets defective ... in case of hotstandby it is fairly clear who is the master card , the one which is active in the system , that shouldn't be hard to find with IOCTL
...knowing one ignores a greath many things is the first step to wisdom...