Cisco Training 200-125 CCNA v3.0. Day 38 EtherChannel Protocol for OSI Layer 2

Today we will look at the operation of the Layer 2 EtherChannel link aggregation protocol for layer 2 of the OSI model. This protocol is not too different from the Layer 3 protocol, however, before I start learning about Layer 3 EtherChannel, I need to introduce you to a few concepts, so we will move on to the third layer later. We continue to follow the CCNA course schedule, so today we will cover Section 1.5 "Configuring, Verifying, and Troubleshooting Layer 2/3 EtherChannel" and Sections 1.5a "Static EtherChannel", 1.5b "PAGP Protocol" and 1.5c "Open Standard IEEE-LACP" .

Cisco Training 200-125 CCNA v3.0. Day 38 EtherChannel Protocol for OSI Layer 2

Before we go any further, we need to understand what an EtherChannel is. Suppose we have switch A and switch B, redundantly connected by three communication lines. If you use the STP protocol, the two extra lines will be logically disabled to prevent loops.

Let's say we have FastEthernet ports providing 100 Mbps of traffic, so the total throughput is 3 x 100 = 300 Mbps. We leave only one communication channel, because of which it will drop to 100 Mbps, that is, in this case, STP will degrade the network performance. In addition, 2 extra channels will be idle in vain.

To prevent this, KALPANA, the company that created the Cisco Catalist switches and later bought by Cisco, developed a technology called EtherChannel in the 1990s.

Cisco Training 200-125 CCNA v3.0. Day 38 EtherChannel Protocol for OSI Layer 2

In our case, this technology turns three separate communication channels into one logical channel with a bandwidth of 300 Mbps.

The first mode of EtherChannel technology is manual or static mode. In this case, the switches will not do anything under any transmission conditions, relying on the fact that all manual settings for the operation parameters are made correctly. The channel simply turns on and works, fully trusting the settings of the network administrator.

The second mode is the proprietary Cisco PAGP link aggregation protocol, the third mode is the IEEE standard LACP link aggregation protocol.

In order for these modes to work, the EtherChannel must be made available. The static version of this protocol is very easy to activate: you need to go to the switch interface settings and enter the channel-group 1 mode command.

If we have switch A with two interfaces f0 / 1 and f0 / 2, we must enter the settings of each port and enter this command, and the EtherChannel interface group number can have a value from 1 to 6, the main thing is that this value be the same for all ports on the switch. In addition, the ports must operate in the same modes: both in access mode or both in trunk mode and have the same native VLAN or allowed VLANs.

Cisco Training 200-125 CCNA v3.0. Day 38 EtherChannel Protocol for OSI Layer 2

EtherChannel aggregation will only work if the channel group consists of identically configured interfaces.

Let's connect switch A with two communication lines to switch B, which also has two interfaces f0/1 and f0/2. These interfaces form their own group. You can configure them to work in EtherChannel using the same command, and the group number does not matter, since they are located on the local switch. You can designate this group number 1, and everything will work. However, remember that for both channels to work without problems, all interfaces must be configured in exactly the same way, for one mode - access or trunk. After you have entered the settings of both interfaces of switch A and switch B and entered the channel-group 1 mode on command, EtherChannel link aggregation will be completed.

Both physical interfaces of each of the switches will work as one logical interface. If we look at the STP parameters, we will see that switch A will show one common interface, grouped from two physical ports.

Let's move on to PAGP, a port aggregation protocol developed by Cisco.

Cisco Training 200-125 CCNA v3.0. Day 38 EtherChannel Protocol for OSI Layer 2

Imagine the same picture - two switches A and B, each with interfaces f0 / 1 and f0 / 2, connected by two communication lines. To enable PAGP use the same channel-group 1 mode command with parameters . In manual static mode, you simply enter the channel-group 1 mode on command on all interfaces, and the aggregation starts working, here you need to specify the desirable or auto parameter. If you enter the channel-group 1 mode command with a ? sign, the system will display a prompt with options: on, desirable, auto, passive, active.

If you issue the same channel-group 1 mode desirable command on both ends of the link, EtherChannel mode will be enabled. Similarly, it will happen if at one end of the channel the interfaces are configured with the channel-group 1 mode desirable command, and at the other end with the channel-group 1 mode auto command.

However, if the interfaces at both ends of the channels are set to auto with the channel-group 1 mode auto command, no link aggregation will occur. Therefore, remember - if you want to use EtherChannel over the PAGP protocol, the interfaces of at least one of the parties must be in the desirable state.

When using the open LACP protocol for link aggregation, the same channel-group 1 mode command is used with parameters .

Cisco Training 200-125 CCNA v3.0. Day 38 EtherChannel Protocol for OSI Layer 2

Possible combinations of settings on both sides of the channels are as follows: if the interfaces are set to active mode or one side is set to active and the other to passive, the EtherChannel mode will work, if both groups of interfaces are set to passive, no link aggregation will occur. It must be remembered that in order to organize link aggregation using the LACP protocol, at least one of the interface groups must be in the active state.

Let's try to answer the question: if we have switches A and B connected by communication lines, and the interfaces of one switch are in the active state, and the other in the auto or desirable state, will EtherChannel work?

Cisco Training 200-125 CCNA v3.0. Day 38 EtherChannel Protocol for OSI Layer 2

No, it will not, because the same protocol must operate on the network - either PAGP or LACP, since they are not compatible with each other.

Let's look at a few commands used to organize an EtherChannel. First of all, you need to assign a group number, it can be anything. For the first channel-group 1 mode command, 5 options can be selected as an option: on, desirable, auto, passive, or active.
In interface subcommands, we use the channel-group keyword, but if, for example, you want to specify load balancing, the port-channel keyword is used. Let's take a look at what load balancing is.

Suppose we have switch A with two ports that are connected to the corresponding ports of switch B. 3 computers are connected to switch B - 1,2,3, and one computer No. 4 is connected to switch A.

Cisco Training 200-125 CCNA v3.0. Day 38 EtherChannel Protocol for OSI Layer 2

When traffic moves from computer #4 to computer #1, switch A will start transmitting packets on both communication lines. The load balancing method uses hashing the source MAC address in such a way that all traffic on the fourth computer will go through only one of the two communication lines. If we connect computer No. 5 to switch A, thanks to load balancing, all the traffic of this computer will move only along one, lower communication line.

Cisco Training 200-125 CCNA v3.0. Day 38 EtherChannel Protocol for OSI Layer 2

However, this is not a typical situation. Let's say we have a cloud-Internet and a device to which switch A with three computers is connected. Internet traffic will be directed to the switch with the MAC address of this device, that is, with the address of a specific port, because this device is a gateway. Thus, all outgoing traffic will have the MAC address of this device.

Cisco Training 200-125 CCNA v3.0. Day 38 EtherChannel Protocol for OSI Layer 2

If switch B is located in front of switch A, connected to it by three communication lines, then all the traffic of switch B in the direction of switch A will rush along one of the lines, which does not correspond to our goals. Therefore, we need to set the balancing parameters for this switch.

Cisco Training 200-125 CCNA v3.0. Day 38 EtherChannel Protocol for OSI Layer 2

This is done using the port-channel load-balance command, where the option parameter is the destination IP address. If this is the address of computer No. 1, traffic will rush along the first line, if No. 3 - along the third, and if you specify the IP address of the second computer, then along the middle link.

Cisco Training 200-125 CCNA v3.0. Day 38 EtherChannel Protocol for OSI Layer 2

To do this, the command uses the port-channel keyword in global configuration mode.

If you want to see what links are involved in the channel and what protocols are used, then in privileged mode you need to enter the show etherchannel summary command. You can view load balancing settings with the show etherchannel load-balance command.

Now let's look at all this in the Packet Tracer program. We have 2 switches connected by two links. STP will start its work and one of the 4 ports will be blocked.

Cisco Training 200-125 CCNA v3.0. Day 38 EtherChannel Protocol for OSI Layer 2

Let's go to the SW0 settings and enter the show spanning-tree command. We see that STP is working and we can check the Root ID and Bridge ID. Using the same command for the second switch, we will see that the first switch, SW0, is the root switch, since, unlike SW1, it has the same Root and Bridge identifier values. In addition, there is a message here that SW0 is the root - "This bridge is the root".

Cisco Training 200-125 CCNA v3.0. Day 38 EtherChannel Protocol for OSI Layer 2

Both ports of the root switch are in the Designated state, the blocked port of the second switch is designated as Alternative, and the second as the root port. You can see how STP flawlessly does all the necessary work, automatically configuring the connection.

We activate the PAGP protocol, for this, in the SW0 settings, we sequentially enter the int f0 / 1 and channel-group 1 mode commands with one of the 5 possible parameters, I use desirable.

Cisco Training 200-125 CCNA v3.0. Day 38 EtherChannel Protocol for OSI Layer 2

You can see that the line protocol first turned off and then turned on again, that is, the changes made took effect and the Port-channel 1 interface was created.

Cisco Training 200-125 CCNA v3.0. Day 38 EtherChannel Protocol for OSI Layer 2

Now let's go to the f0 / 2 interface and enter the same channel-group 1 mode desirable command.

Cisco Training 200-125 CCNA v3.0. Day 38 EtherChannel Protocol for OSI Layer 2

You can see that now the ports of the top link are marked with a green marker, and the ports of the bottom link are marked with orange. In this case, there cannot be a mixed port mode desirable - auto, because all interfaces of one switch must be configured with the same command. The auto mode can be used on the second switch, but on the first switch all ports must work in the same mode, in this case it is desirable.

Let's go to the SW1 settings and use the command for the range of interfaces int range f0 / 1-2, so as not to manually enter commands separately for each of the interfaces, but to configure both with one command.

I use the channel-group 2 mode command, but I can use any number from 1 to 6 to designate the interface group of the second switch. Since the other side of the link is set to desirable mode, the interfaces of this switch must be in desirable or auto mode. I select the first option, type channel-group 2 mode desirable and hit enter.
We see a message that the Port-channel 2 channel interface has been created, and ports f0/1 and f0/2 have successively switched from the down state to the up state. This is followed by a message that the Port-channel 2 interface has transitioned to the up state and that the line protocol of this interface has also turned on. Now we have an aggregated EtherChannel.

You can verify this by going to the SW0 switch settings and entering the show etherchannel summary command. You see the various flags that we will look at later, and then group 1 using 1 channel, the number of aggregators is also 1. Po1 means PortChannel 1, and the designation (SU) stands for S - layer 2 flag, U - used. Next, the PAGP protocol used and the physical ports aggregated into the channel are Fa0 / 1 (P) and Fa0 / 2 (P), where the P flag indicates that these ports are part of the PortChannel.

I use the same commands for the second switch, and the same information for SW1 appears in the CLI window.

Cisco Training 200-125 CCNA v3.0. Day 38 EtherChannel Protocol for OSI Layer 2

I enter the show spanning-tree command in the SW1 configuration and you can see that PortChannel 2 is a single logical interface, and its cost has decreased from the cost of two separate ports 19 to 9.

Cisco Training 200-125 CCNA v3.0. Day 38 EtherChannel Protocol for OSI Layer 2

Let's do the same with the first switch. You can see that the Root parameters have not changed, but now there is one Po1-Po2 logical interface between two switches instead of two physical links.

Cisco Training 200-125 CCNA v3.0. Day 38 EtherChannel Protocol for OSI Layer 2

Let's try to replace PAGP with the LACP protocol. To do this, in the settings of the first switch, I use the command for the range of interfaces int range f0 / 1-2. If I now issue the channel-group1 mode active command to enable LACP, it will be rejected because ports Fa0/1 and Fa0/2 are already part of a channel using a different protocol.

Cisco Training 200-125 CCNA v3.0. Day 38 EtherChannel Protocol for OSI Layer 2

Therefore, I must first enter the no channel-group 1 mode active command and only after that use the channel-group1 mode active command. Let's do the same with the second switch by first issuing the no channel-group 2 command and then the channel-group 2 mode active command. If you look at the parameters of the interfaces, you can see that Po2 has turned on again, but it is still in PAGP protocol mode. This is not true, because we currently have LACP in effect, and in this case, the parameters are incorrectly displayed by the Packet Tracer program.
To resolve this inconsistency, I use a temporary solution - creating another PortChannel. To do this, I type the commands int range f0/1-2 and no channel-group 2, and then the command channel-group 2 mode active. Let's see how this affects the first switch. I issue the show etherchannel summary command and see that Po1 is again shown as using PAGP. This is a Packet Tracer simulation problem because PortChannel is now disabled and we shouldn't have a channel at all.

I again go to the CLI window of the second switch and enter the show etherchannel summary command. Now Po2 is shown with an index (SD), where D means down, i.e. the channel is down. Technically, PortChannel is present here, but not used because no port is associated with it.
I enter the commands int range f0 / 1-2 and no channel-group 1 in the settings of the first switch, and then create a new channel group, this time at number 2, using the command channel-group 2 mode active. Then I do the same in the settings of the second switch, only now the channel group gets the number 1.

Now a new Port Channel 2 group has been created on the first switch, and Port Channel 1 on the second. I just swapped the group names. As you can see, technically I created a new Port Channel on the second switch, and now it is displayed with the correct parameter - after entering the show etherchannel summary command, we see that Po1 (SU) uses LACP.

We see exactly the same picture in the CLI window of the SW0 switch - the new Po2 group (SU) is running LACP.

Cisco Training 200-125 CCNA v3.0. Day 38 EtherChannel Protocol for OSI Layer 2

Consider the difference between an interface in the active state and an interface that is always in the on state. I will create a new channel group for switch SW0 with int range f0/1-2 and channel-group 3 mode on commands. Before that, you must delete channel groups 1 and 2 using the no channel-group 1 and no channel-group 2 commands, otherwise, when you try to use the channel-group 3 mode on command, the system will display a message stating that the interface is already enabled to work with another channel protocol.

We do the same with the second switch - delete channel-group 1 and 2 and create group 3 with the channel-group 3 mode on command. Now let's go to the SW0 settings and use the show etherchannel summary command. You will see that the new Po3 channel is already up and running and does not require any preliminary operations like PAGP or LACP.

Cisco Training 200-125 CCNA v3.0. Day 38 EtherChannel Protocol for OSI Layer 2

It turns on immediately, without turning off and then turning on the ports. Using the same command for SW1, we will see that Po3 does not use any protocol here either, that is, we have created a static EtherChannel.

Cisco says that for wide network availability, you need to forget about PAGP and use a static EtherChannel as a more reliable way of link aggregation.
How do we do load balancing? I return to the CLI window of the SW0 switch and enter the show etherchannel load-balance command. You can see that load balancing is done based on the source MAC address.

Cisco Training 200-125 CCNA v3.0. Day 38 EtherChannel Protocol for OSI Layer 2

Usually balancing uses exactly this parameter, but sometimes it does not suit our tasks. If we want to change this balancing method, we need to enter the global configuration mode and enter the port-channel load-balance command, after which the system will prompt with possible parameters for this command.

Cisco Training 200-125 CCNA v3.0. Day 38 EtherChannel Protocol for OSI Layer 2

If you specify the port-channel load-balance src-mac parameter, that is, specify the source MAC address, a hashing function will be enabled, which will then tell which of the ports that are part of this EtherChannel should be used to transfer traffic. Each time the source address is the same, the system will use that particular physical interface to send traffic.


Thank you for staying with us. Do you like our articles? Want to see more interesting content? Support us by placing an order or recommending to friends, 30% discount for Habr users on a unique analogue of entry-level servers, which was invented by us for you: The whole truth about VPS (KVM) E5-2650 v4 (6 Cores) 10GB DDR4 240GB SSD 1Gbps from $20 or how to share a server? (available with RAID1 and RAID10, up to 24 cores and up to 40GB DDR4).

Dell R730xd 2 times cheaper? Only here 2 x Intel TetraDeca-Core Xeon 2x E5-2697v3 2.6GHz 14C 64GB DDR4 4x960GB SSD 1Gbps 100 TV from $199 in the Netherlands! Dell R420 - 2x E5-2430 2.2Ghz 6C 128GB DDR3 2x960GB SSD 1Gbps 100TB - from $99! Read about How to build infrastructure corp. class with the use of Dell R730xd E5-2650 v4 servers worth 9000 euros for a penny?

Source: habr.com

Add a comment