show interface [interface] counters etherchannel


I was asked today to look up a command for an switch etherchannel load balancing stats and  one of the guys from my work kindly helped me go about this task. The command we both were not awaro of is : show interface [interface] counters etherchannel

You can run this command on your port-channel interface:

sw10#sh int po 4 counters etherchannel

Port            InOctets    InUcastPkts    InMcastPkts    InBcastPkts
Po4         416093645091     1867642763        4433924        1603365
Gi1/0/4     102227922264      711081872        2324341         721923
Gi2/0/4     313865724022     1156560899        2109586         881442

Port           OutOctets   OutUcastPkts   OutMcastPkts   OutBcastPkts
Po4        6558839819392     5024721306      517141870      175343111
Gi1/0/4    5393122121312     3998906032      333923277       87286596
Gi2/0/4    1165719887452     1025816735      183219142       88056676

If you run it on one of the bundled links, you’ll get an error message:

sw10#sh int fa0/19 count ether
Etherchannel not enabled on this interface

Clearing the counters for this command takes  a bit of work.  If you clear the counters on the port-channel interface, it will not clear the counters on the individual bundled links:

sw10#clear count po1
Clear “show interface” counters on this interface [confirm]
sw10#
*Mar  1 02:20:57: %CLEAR-5-COUNTERS: Clear counter on interface Port-channel1 by console
sw10#sh int po1 count eth

Port            InOctets   InUcastPkts   InMcastPkts   InBcastPkts
Po1                 1504             3            13             0 <-cleared
Fa0/19           1900270           838         18865             0
Fa0/20           1904240           838         18863             5
Fa0/21           1959175           838         19447             5

Port           OutOctets  OutUcastPkts  OutMcastPkts  OutBcastPkts
Po1                    0             0             0             0 <-cleared
Fa0/19            181500           837           534             5
Fa0/20            171426           837           495             0
Fa0/21            169886           837           470             0

You can clear each bundled link on its own:

sw10#clear count fa0/19
*Mar  1 02:25:35: %CLEAR-5-COUNTERS: Clear counter on interface FastEthernet0/19 by console
nap-wfd-sw1#sh int po1 count eth

Port            InOctets   InUcastPkts   InMcastPkts   InBcastPkts
Po1               136047            87          1311             0
Fa0/19                94             1             0             0 <-cleared
Fa0/20           1909733           866         18877             5
Fa0/21           2082732           866         20717             5

Port           OutOctets  OutUcastPkts  OutMcastPkts  OutBcastPkts
Po1                16479            84            42             0
Fa0/19                 0             0             0             0 <-cleared
Fa0/20            176919           865           509             0
Fa0/21            175379           865           484             0

You can use this command to illustrate the method that the switch is using to “load balance” over the etherchannel links:

First, let’s create an SVI on each side of the Etherchannel
sw10(config)#vlan 100
sw10(config-vlan)#int vlan 100
sw10(config-if)#ip address 100.0.0.4 255.255.255.0

sw11(config)#vlan 100
sw11(config-vlan)#int vlan 100
sw11(config-if)#ip address 100.0.0.3 255.255.255.0

Let’s clear etherchannel counters, then ping the hell out of the 100.0.0.3 address:
nap-wfd-sw1#sh int po1 count eth

Port            InOctets   InUcastPkts   InMcastPkts   InBcastPkts
Po1                 3760             0            40             0
Fa0/19               188             2             0             0
Fa0/20                94             1             0             0
Fa0/21              5828             1            61             0

Port           OutOctets  OutUcastPkts  OutMcastPkts  OutBcastPkts
Po1                  282             3             0             0
Fa0/19               188             2             0             0
Fa0/20               188             2             0             0
Fa0/21                94             1             0             0

sw10#ping 100.0.0.3 re 10000 si 1500
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
—–output truncated—–
Success rate is 100 percent (10000/10000), round-trip min/avg/max = 1/2/28 ms

Now let’s look at the etherchannel counters:
nap-wfd-sw1#sh int po1 count eth

Port            InOctets   InUcastPkts   InMcastPkts   InBcastPkts
Po1             15512981         10018           323             0
Fa0/19          15481343         10008             3             0 <-note
Fa0/20              1249             7             3             0
Fa0/21             32739             7           338             0

Port           OutOctets  OutUcastPkts  OutMcastPkts  OutBcastPkts
Po1             15483747         10021             9             0
Fa0/19          15481343         10008             3             0 <-note
Fa0/20              1343             8             3             0
Fa0/21              1249             7             3             0

So why did one interface handle all of the pings?  Let’s use another nifty little command to find out:

sw10#show etherchannel load-balance
EtherChannel Load-Balancing Operational State (src-mac):
Non-IP: Source MAC address
  IPv4: Source MAC address
  IPv6: Source IP address

sw10 sh arp | i 100.0.0.4
Internet  100.0.0.4               –   000a.8a1c.c400  ARPA   Vlan100

We are “load balancing” based on the source mac-address.  The ping is sourced by 100.0.0.4 and the source-mac address will not change, so all of our pings took the same route.  This is good to know for the real world as well.  Depending on the traffic source, that 8-gig etherchannel you set up to the server may only be giving you 1 gig of possible bandwidth.

Advertisements

About ccie4all
Hello, and welcome to the first post of my CCIE blog This blog has got one simple goal and that is to improve our skills in Cisco Networking field so we can become best engineers on a job market. Wordpress Blog https://ccie4all.wordpress.com/ information about the changes made to Gns3 BGP , MPLS and R&S CCIE labs. In order to access and download all provided materials and receive important updates from Gns3 BGP , MPLS and R&S CCIE labs under GNS3 tab in the main header please go ahead and subscribe to https://ccie4all.wordpress.com/ ! All other posts have not been affected and can be accessed at any given time. Enjoy ! Tom

2 Responses to show interface [interface] counters etherchannel

  1. Simon says:

    Niiice. But, you best not have tried that on the actual network and strip out the switch names and IP addresses please, it’s confidential stuff! Good work pretty boy

  2. Simon says:

    Good for the client end (workgroup side) but not so effective for the core side as core svi MAC always used in load balancing (default is src-mac) resulting in unequal load balancing

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: