How to find the active network inteface on etherchannel

I have a server with multiple network interfaces. 2 of these interfaces, lets say en2 and en6 make up an etherchannel interface, which let's say en8.

when I run the command

lsattr -El ent8

I can see the designated primary and backup interfaces as ent6 and ent2, in the given order. But since I have no control over the network switches, I do not see if a switch had problems and my etherchannel failed over to the backup interface or not and, to my surprise, this happens more often than one might think.

So far, the only method I found to determine which physical interface is actively handling the network traffic passing thru the etherchannel'ed IP address is, running the command

entstat -d en8

in few second intervals while watching the individual interface while watching the transmit and receive statistics of individual network adapters in the channel, determining the active one depending on which adapter's numbers are increasing.

I was wondering if there is a command that tells me straight out, which interface in the etherchannel is actually active and which is acting as a backup adapter at any given time. Is there such a command ?

Thanks for all help in advance

Hi thenomad,

netstat -v should be the command you're searching for

Kind regards
zxmaus

The output for this comman is quite long and provides pretty much the same information as entstat -d enX command for ann exX values. How can I tell the status of my 2 etherchannel'ed interfaces telling which one is up and which on is in backup mode from the output of this command ?

errpt should tell you if the primary has failed over and when it fails back.

Yeah that is a good idea but going thru the errpt output for interface failures is not something I really want to do. In addition, this command I am looking for, will be given to the folks with no way of having root access (weblogic admins) to assist them in their troubleshooting efforts. So, I need to know at any given time which one interface out of a two interface etherchannel (configured in active/passive way) is the active one at any given moment.

Is there a light at the end of the tunnel for me ?

The info you need is in the 'entstat -d' output (or netstat -v). Here's what I use to check our systems.

# entstat -d ent5 | egrep "Active|Backup|ETH"
ETHERNET STATISTICS (ent5) :
Active channel: backup adapter
ETHERNET STATISTICS (ent3) :
Switch ID: ETHERNET0
Backup adapter - ent2:
ETHERNET STATISTICS (ent2) :
Switch ID: ETHERNET0

So this shows me that my etherchannel (ent5) is comprised of ent2 and ent3, and that the current Active channel is the backup adapter which is adapter ent2.

HTH!

But my question is, when the active interface fails for some reason (say someone unplugged the wrong cabe on the switch side, simple mistake) will the ent2 and ent3 change positions in the entstat output, i.e., will I see ent2 as my active adapter and ent3 as the backup (or maybe in a failed state) ?

Yes - the 'Active channel' line will show 'primary channel' to begin with and when it fails over it shows 'backup adapter' instead.

Thank you for the information. I will test this on my first maintenance day/night.

Cheers,

you'll find more information about the state of you're channel in the errpt. Also look at the automatic failback feature of this channel so that incase the problem was solved the channel automaticly failsback to its original state

@raba: DukeSSD already mentioned it^^