For a L2 Etherchannel, if I have 4 links configured for an etherchannel and the 3rd link goes down than how would the ratio change. If it is 4 link than it is 1:1:1:1, if the last link is down, it is 2:1:1, but what if one of the middle link is down and not the last link.
The ratios that you are suggesting here are those used by the 6500/6000 series Catalyst switches using the CatOS operating system. In this system, the hashing algorithm is used to compute a value between 0 and 7. Using this value as a basis, a specific port in the PortChannel is chosen to be used. When you set up the ports, you also use what is known as a mask, which is the ratio notation that you shared.
Now these switches use specific load balancing ratios depending upon the number of ports in the EtherChannel. CatOS supports up to 8 ports, so the corresponding load balancing masks are as follows:
Number of Ports in the EtherChannel Load Balancing Mask
8 1:1:1:1:1:1:1:1
7 2:1:1:1:1:1:1
6 2:2:1:1:1:1
5 2:2:2:1:1
4 2:2:2:2
3 3:3:2
2 4:4
Note that the CatOS is rarely used today.
The more modern devices that use Cisco IOS and IOS XE, load balancing algorithms donât follow this logic of using such load balancing masks, but rather on a hash result of the packetâs header. This means that if a link goes down, the traffic that would have been sent over that link is redistributed generally evenly over the remaining links.
So, if you have a 4-link EtherChannel and one link goes down, regardless of whether itâs the first, second, third, or fourth link, the traffic will be redistributed over the remaining three links according to the hash algorithm.
For more information on how load balancing is achieved, and how it differs from platform to platform, take a look at this Cisco documentation:
I have a few rather complex questions regarding EC (Etherchannel).
With PAGP, what exactly does the PAGP priority do? From my understanding, a port with a higher priority will transmit PAGP messages? But this doesnât make much sense to me. Shouldnât all ports do this regardless of the priority? Since thatâs how you know whether the port and the link are still active/whether they need to be removed from the bundle.
Iâve configured it to be 45 yet the neighbors are still alive even after this timer expires?? Itâs always a bit higher than what I configure it to be.
PAGP has two modes of learning MAC addresses - physical and aggregate. Physical is when you literally learn the MAC on the physical port and not on the PO itself
while aggregate is when you learn the MAC on the PO? I also donât know whether this is a CML thing or not but the learning method here is set to physical yet the MACs are learned through the PO as a whole.
You have some great questions regarding EtherChannel and PAGP. Letâs dive into them:
PAGP Priority: The PAGP priority is used to determine which end of the EtherChannel will become the master. The device with the lower priority value will become the master. The master device is responsible for sending PAGP packets to its partner device to negotiate EtherChannel formation. While itâs true that all ports should be transmitting PAGP messages, the priority is used to decide which end takes the active role in the formation of the EtherChannel.
PAGP Timer: The pagp timer command is used to determine after how long PAgP informational packets are considered valid.
The age value indicates the time in seconds since the last PAgP packet was received from the neighbor. Now it does seem strange that your Age value should exceed the PAgP timer. I labbed this up and did some experimentation and in no case did the value exceed 30 seconds. And this makes sense, because there is another value that is involved here, which is the hello timer. This has a value of 30 seconds, and cannot be changed. You can see this value in the output of the show pagp internal command. Can you share with us the full configuration of the physical interfaces and the portchannel interface of your configuration? For your reference, here is the command reference for the pagp timer command:
PAGP Learning Modes: Youâre correct in your understanding of the two learning modes. In physical mode, MAC addresses are learned on the physical port, while in aggregate mode, MAC addresses are learned on the Port-Channel interface. I tried recreating your scenario by configuring the learning to physical on the interfaces in CML and found I got the same results as you. I donât know why, but Iâd be interested to try this out on real devices at some point.
I wish I could have been more helpful with your questions, but in the meantime, I hope this helped you to further understand the technology of EtherChannel.
PAGP Priority: The PAGP priority is used to determine which end of the EtherChannel will become the master. The device with the lower priority value will become the master. The master device is responsible for sending PAGP packets to its partner device to negotiate EtherChannel formation
I might have gotten this part wrong. Here is what a Cisco doc says:
You also can configure a single port within the group for all transmissions and use other ports for hot-standby. The unused ports in the group can be swapped into operation in just a few seconds if the selected single port loses hardware-signal detection. You can configure which port is always selected for packet transmission by changing its priority with the pagp port-priority interface configuration command. The higher the priority, the more likely that the port will be selected.
So it basically determines which port will forward⌠all of the data? Iâve tried to lab this up in CML but I saw other ports being used as well. Is it possible for you to verify this too, please?
Now it does seem strange that your Age value should exceed the PAgP timer.
I was running a default PAGP configuration and just shutdown the link in a way where it wouldnât go down (otherwise the timer would expire immediately). I think this is a CML thing because CML is not as fast as real hardware when it comes to timers
I tried recreating your scenario by configuring the learning to physical on the interfaces in CML and found I got the same results as you. I donât know why, but Iâd be interested to try this out on real devices at some point.
Yeah, I am thinking that this is just a CML thing. L2 and such works a bit worse on virtual IOS.
To be honest, the Cisco documentation is not that clear. My understanding is that the priority command for PAgP tells the switch to use a particular port for all traffic, and causes the other ports to remain idle in a hot standby status. I tried labbing this up and found that the priority I set did not seem to affect the port that was chosen to be used. So Iâve reproduced your results in CML.
It look like for some of these features, CML is not quite the best solution. This has been interesting, thanks!