Etherchannel on Cisco IOS Catalyst Switch

Hello Giovanni

LAG stands for Link Aggregation Group. This is the name given to any group of physical links that are aggregated into a single etherchannel/portchannel. The LAG is defined in a Cisco switch by issuing the channel-group command on the interfaces you want to be included in the LAG.

LACP on the other hand stands for Link Aggregation Control Protocol which is a protocol used to negotiate and control the automatic bundling of the physical links to create a LAG.

I hope this has been helpful!

Laz

CCNP Switch, Unit 6, Intro.pdf (52.4 KB)
This attachment has an error circled where SW1 hostname magically changed to SW2 simply by issuing an interface command! Never seen this before! Was a macro magically invoked through this command?!
Brad

Hello Brad

Thanks for pointing that out! I’ll let @ReneMolenaar know to fix it.

Laz

Hello folks

To create the ether channel, the speed and ports of the interfaces must be the same right? I won’t be able to form an ether channel with 2 differences speeds?
It means that if I had two interfaces 1 fast Ethernet and 1 gigabit Ethernet , the port channel wont work because the difference?

Hello Rodrigo

In order for an etherchannel to form correctly, all interfaces in a particular port channel must be of the same speed. The term ā€œspeedā€ here does not only denote the configured speed on the port, but the type of port. Even if you configure a GigabitEthernet port to function at 100 Mbps, it would still not be able to be bundled with a FastEthernet port. So maybe a more appropriate statement is to say that all interfaces within an etherchannel bundle must have the same maximum speed (100 Mbps, 1000 Mbps, 10Gbps, 40Gbps etc…)

I hope this has been helpful!

Laz

2 Likes

The load balancing for etherchannel is really confusing. I still don’t get it after reading the article as I’m not sure which one is source or destination.

From the given example, it says the default is ā€œsrc-macā€, hence all traffic from one MAC address will be sent down one and same interface. So the source MAC address is referring to the MAC address on each host (AAA to DDD).

However, on SW2, we configured ā€œdst-macā€, what is this destination MAC address referring to?

Thank you in advance.

Hello Po

When we talk about load balancing between physical connections of etherchannels, we must use some criteria to determine which physical link a particular frame will go over. Take a look at the following diagram:


Devices in Network A will be communicating with devices in Network B. Each of the frames traversing the link will have a source and destination MAC, and at Layer 3, will have a source and destination IP address.

Remember first of all that load balancing must be employed on a per direction basis. This means that for the above topology, you must configure the load balancing that will be employed for each direction. For traffic from SW1 to SW2, you configure the load balancing on SW1. For traffic from SW2 to SW1, you configure the load balancing on SW2.

Now let’s say you have 60 hosts on Network A, and you have a single host, say a default gateway, on Network B.

Let’s take a look at traffic going from Network A to Network B. If load balancing by source MAC address is configured, then the traffic going from all the hosts on Network A over the etherchannel, will be load balanced well. Specifically, traffic from 10 hosts will use each single physical connection. (60 source MAC addresses, 6 physical links). That’s good right? But what if you used the destination MAC as the criteria? There’s only one destination MAC on Network B, which is the default gateway. So whenever SW1 sees that destination MAC, it will always send the traffic over a single physical link.

So the source and destination MAC and IP addresses used for the algorithm are those found within the frame/packet for the particular direction of travel of that packet.

You might find these posts helpful as well:

I hope this has been helpful!

Laz

Hi

I noticed,at work, that Dell swicthes form the port-channel with the auto mode on each side.

example of configuration can be found here

However, based on Rene’s scheme, it should not happen, I’m bit confused because I’m not expected to find the auto mode ( Pagp) on Dell switches, but even with auto -auto should not bring up the port-channel, but it works.

Can you help me to explain this?

Thanks

Hello Giovanni

Keep in mind that the specific commands on each platform (Cisco and Dell) do not necessarily mean that they function in the same way. The modes available on the Dell switches are ā€œactiveā€, ā€œautoā€. According to Dell Documentation, ā€œactiveā€ should be used when configuring the Dell switch to interoperate with a Cisco device, while ā€œautoā€ should be used when connecting to another Dell switch. The Dell switches don’t have additional parameters like the Cisco devices do where you must specify which will be desirable and which will be auto. So configuring auto on both Dell switches is not the same thing as configuring auto on both Cisco switches.

The Dell switches seem to negotiate LACP without any additional information. It could be that they automatically choose which device will function as the active device and which as the passive device, as far as the operation of LACP goes. But that’s just an assumption, as I do not know more about the inner workings of the particular switch series.

I hope this has been helpful!

Laz

1 Like

Hi Laz,

Thank you very much for your detailed explanation.

According to what you’ve mentioned in the example, let’s say 60 hosts on Network A and a single host in Network B. If I want to config load balancing in this case, I will need to put src-mac on SW1 as there are 60 macs, on the other hand, Network B has only one host so I will need to put dest-ip as the traffic will be sent to 6 different physical links.

Please correct me if I’m wrong.

Hello Po

Yes, you are correct. Actually, in this case, if this is a layer 2 etherchannel, and the devices on both ends of the link are on the same subnet, you can either use src-mac or src-ip for traffic from Network A to Network B, and dest-mac or dest-ip for the other direction, the results would be the same. If however you have a layer 3 etherchannel, or much of your traffic is destined for networks outside of the current subnet (which is often the case), you may find that using the IP address instead of the MAC address will give you a better distribution of traffic. This depends on the nature of the traffic involved, and can vary widely. It’s always a good idea, in a production network, to periodically examine the way the traffic is being distributed so that you can tweak it appropriately for maximum efficiency.

I hope this has been helpful!

Laz

Hi Laz,

First of all, thank you for the reply.
Why src-ip for Network A to B and dest-mac on Network B to A work the same way as src-mac and dest-ip respectively?

Is it because both src-ip and dest-ip are referring to the IP addresses of the 60 hosts?

Hello Po

Let me explain with an example. If we have this topology:


…and there is traffic going between all of the hosts on the left and the server on the right, then all traffic in both directions will have:

  1. source and destination MAC addresses of the hosts and of the server.
  2. source and destination IP addresses of the hosts and of the server.

In this case, src-ip for Network A to B (IP addresses of the 60 hosts) and src-mac for Network A to B (MAC addresses of the 60 hosts) will have the same result. The IP addresses correspond exactly to the MAC addresses.

In the other direction, dest-ip on Network B to A (IP addresses of the 60 hosts) and dest-mac on network B to A (MAC addresses of the 60 hosts) will also work the same way for the same reason.

I hope this has been helpful!

Laz

Hi,
Can you explain me when is better ti use an ip load balancing against mac load balancing in a etherchannel?

Thanks

Hello Giovanni

In order to know which load balancing algorithm is best to use for your particular situation, it must be made clear that each algorithm must be applied in a particular direction on the etherchannel. And this direction will also affect the choice you make. For example, take a look at the following diagram:

This is a network with many hosts on Network A, and only one host (the edge router) on Network B. The edge router is the default gateway for all of the hosts on Network A. The majority of traffic from the hosts will be to the Internet.

So for traffic travelling from Network A to Network B, let’s take a look at what each algorithm would achieve:

  1. If we use destination MAC, then only one of the 6 physical links would be used, and the others would remain idle. This is because for all traffic from Network A to Network B, there will only be one destination MAC, that of the edge router. So all frames will be mapped to a single physical link.
  2. If we use source MAC, then we have many source MACs, one from each of the hosts. This means that each host on Network A would use a different physical link of the etherchannel, thus spreading the traffic over multiple links.
  3. If we use source IP, this would have the same result as source MAC, since we have multiple hosts with multiple IP addresses, thus each IP address would be mapped to a different physical link, distributing the traffic evently.
  4. If we use destination IP, and we assume all traffic is to the Internet, then we can assume that the destination IPs of all this traffic will be many different destinations, so an even distribution of traffic over the physical links would be experienced as well.

I hope this has been helpful!

Laz

Hi,
Sometimes my collegues talk about fiber channels configuration.
So I have a question about that.
Are fiber channels the same of port-channels? Is the configuration the same ? ( and for sure differents interfaces)

So to check a fiber-channel Do i should give the command ā€œshow etherchannel summaryā€?
Thanks

Hello Giovanni

Fiber channel is something completely different than etherchannel. Fiber channel is a high speed layer 2 data transfer technology that is used primarily to connect computer data storage to servers in storage area networks (SANs). For this reason, you will find it primarily in datacenters and for short distance applications (on the order of several meters).

Fiber channel is an alternative to Ethernet, and is available at speeds of multiples of two (1, 2, 4, 8, 16, 32, 64 and 128 Gbps.) You require a particular interface on a device to be able to run Fiber channel. There are technologies however that allow you to run fiber channel over Ethernet (FCoE) which enables you to use an Ethernet infrastructure to carry Fiber channel traffic.

Suffice it to say here that Ethernet and Fiber Channel are two distinct Layer 2 data transfer protocols, each of which has its particular uses. You can further research Fiber Channel online to find out more about it.

I hope this has been helpful!

Laz

1 Like

Hi,

New member here, love the site so far!

Question about etherchannel load balancing. Is there a way to take advantage of multiple links if you are doing multiple parallel file copies to and from the same systems (i.e. copying several large files from one desktop to the same server)? As far as I can tell, using the source/destination IP or MAC or even a combination of each will always result in the same link being used.

Actually, would using the source port do the trick?

Hello Aaron

Great to have you with us Aaron!

The load balancing algorithms that are available for etherchannel depend on the platform being used. Most lower end platforms will only use source and destination MAC and IP addresses. Higher end devices such as the 4500/9400/6500/6800/9600 series devices allow you to use algorithms that also take into account the source and destination Layer 4 ports. The following is an example of a Cisco command reference that further describes this.

So in your scenario, of one host and one server, and if you are using FTP for example, you could theoretically create multiple FTP file transfers, each of which will have a different source port (from the point of view of the client) and a single destination port (from the point of view of the FTP server). If your load balancing algorithm is configured to use source ports (for the client → server direction) or destination ports (for the server → client direction) , then each file transfer may use a different physical link.

The load balancing feature needs to have each individual session go over a single link. A session is a communication between two hosts with the same source and destination MAC, IP, and Port numbers. There is no way that etherchannel can separate a session over two or more links. This is done in order to avoid out of order delivery.

I hope this has been helpful!

Laz