Wednesday, October 12, 2016

Leave a Comment

EtherChannel Theory

Let’s imagine that, we have a couple of Cisco Catalyst Switches interconnected with of couple of links, like we see pictured here.
          Well if “Spanning Tree Protocol” is in effect, we know that traffic is only going to be flowing over one of these links, otherwise we could have a layer2 topological loop, however this sort of seems like wasted does it, seems like we got potential bandwidth there, that’s just standing by, for the other link to fail. We could use the feature called “Ether Channel”.
                     To logically bundle together these links.
            We can simultaneously pass traffic over both links without ‘Spanning Tree Protocol” shutting one of links down.This is going to allow us to have higher bandwidth between our switches.
         We going to be able to have “Load-Balancing” between the switches.
                       And we are not giving up “Redundancy” by doing this, if one link goes down, the other link can continue to carry traffic and from the perspective of Spanning Tree Protocol, this ether channel bundle appears as a single Port, a single interface. It’s a “Port Channel” interface and that’s why “Spanning Tree Protocol” is blocking one of these links because, from its prospective this appears to be one connection, and this ability to logically bundle together multiple Physical links into a single logical link. That’s something Cisco came out with its original and they called it “Ether channel”, but now there is an industry standard, it’s the “IEEE 802.3AD” Standard, and if we are in the mixed vendor environment, we might wanna be use that standard. Our Cisco Catalyst switches is going to support either Approach, and they work in similar fashion. There is one concept, I want to really focus on the topic, that’s very misunderstood.
                          Many People will look at this at this ether channel and assume that, because we doing load-balancing, that we doing equal “Load-Balancing", one packet goes over one link and, another packet goes over the next link and so on, back and forth taking turns, that’s actually no the way it works.          
The Way Cisco Catalyst switches going to select which physical path to send a particular packer or frame over.
               Is based on its “Load-Balancing Algorithms” and there are several option. Let’s look at a few. One Load-Balancing algorithms is based on the “Destination IP Address”.
                   And what this means is “We going to look at the, last few bits of that IP Address in binary”. In this topology on picture, we have 4 links, and the question is “How many binary bits would it take to give us 4 possible values”.
         Ø  And the answer is “2”
         Ø   22=4
With 2 binary bits, we can represent 4 different values, and since we have 4 links in this “Etherchannel”, if we were “Load-Balancing”, based on a “Destination IP Address”, we would be looking at the last “2 binary bits” of that IP Address. Notice the possible values 00, 01, 10 and 11.
And if we going to “Destination IP Address”, what if we have, lots of traffic going to a high Powered Server and that’s connected to Switch B, maybe a gig link, and we had multiple fastethernet links between switches A and B, and for going to the same “Destination IP Address”, all packets going to Switch B, going to that Server. They will be using same link, same thing with “Dst-Mac-Address”.
                          Personally i want to add a bit of randomness to this, where we considering both “Source and Destination Addresses”.
                       It could be based on the “Source and Destination IP Address”, or the “Source and Destination Mac-Address”.
                      What’s gonna happen is, we do a “Boolean Operation”, as it’s called an “Exclusive OR”, we do an Exclusive OR, and this case last 2 bits of the “Source and Destination IP Addresses or Mac-Addresses”, and just like we could make “Load-Balancing decision based on Destination IP and Mac-Addresses”, we can make our decision based on “Source IP Address”, “Source Mac-Address”.
                     Let’s take a look in this example through, a using “dst-mac-address” “Load-Balancing Algorithms” for the readability say, i did not type out the entire, “48 Bits Hex Mac-Address” for these 3 Servers on Switch B, instead i just showed their last Hexadecimal digit, we got Hexadecimal digits of 1, 5 and D.


                             And i have given you, “Hex to Binary Conversion Chart”.
                      And if you will notice, the 2 digits in binary for the Hex digit of 1,5 and D, the last 2 digits are “01”, they match and, what this means is, if traffic is going from Switch A to Switch B, and that traffic is destined for any of these Servers, based on the “Destination Mac-Address”, we gonna using this one link, that second link from top of our example.


Every frame, based on the “destination mac-address” going to one of these 3 servers, it’s gonna be flowing over that same link.
                        That is not giving is any “Load-Balancing” as it, that’s not giving us extra throughput between the switches, Of course return traffic hopefully that would be bit more random, we going back to different clients, where we going end of server farm, we do not doing load-balancing.
                           And I really want, you to keep the concept of load-balancing algorithms in mind, as you doing your configuration in the real world, because it easier to get a false sense of assurance thinking, that we doing load-balancing fairly, evenly when we really were no, in this case, I got 4 links and, we were looking at the last 2 bits, in this case the last bits of the “Mac-Address”.
What if we had 2 links, if we had 2 links, we would only be looking at the last bit because that one bit has 2 Possible value.

 We could have 8 links an ether channel, how many bits we looking at them, it would be 3, because 23=8, we can represent 8 different value, a value for each of those 8 links making up the ether channel bundle by using those 3 bits.




If You Like the Post. Don’t forget to “Subscribe/Share/Comment”. Thank You.

0 comments:

Post a Comment