Tuesday, December 11, 2012

Cisco CCNP tutorial: Link aggregation/bundling and failover

The last article was about layer 3 switches and how they can be useful in your network. Today I introduce another technology which is introduced in CCNA. Suppose I have  a switch connected to a server by a 1 gbps link. Now suppose two servers want to exchange data at very high speed but are not able to because of the limit on the carrier capacity. What if I could tell the switch to make (atleast) two links connected to it to behave as one? The inter-server communication can be done at 2 gbps now, utilizing both the links. Or suppose we have a switch which connects to an upstream switch. To provide redundancy we require that two links be connected to it so if one link fails the switch is automatically able to failover to the other link. If you try to simple connect two wires to a switch, one of them will get blocked because of STP and will not be utilized (a loop is being formed).To try and solve this problem a technology called Link aggregation/bundling/bonding was invented. Earlier each major vendor had its own proprietary protocol, but now that has changed. IEEE has come up with a standard known as IEEE 802.1ax LACP (Link aggregation control protocol) for Ethernet network. Please note that this technology can be used ONLY for ethernet networks. Since it is an open source protocol it can be used on a variety of devices from different vendors including HP,Juniper and  of course Cisco. Even today's servers can be configured to run LACP ( a thorough treatment of how to run LACP on servers in a future article). Refer to the below diagram which we strive to implement within a few more articles.

Topology having aggregate links, multilayer switches and gre tunneling

As you can clearly see the two links between Switch 0 and multilayer switch 2 are both active, indicated by the green light. This is because they are acting as an aggregate of a single link. STP and infact all the devices see this as one interface known as port-channel interface. To ensure a smooth formation of aggregate link a few steps are recommended.

  • Both the ports on the switch should be of the same type.
  • Similarly, one port of a switch should be connected to a similar port on the other switch. This means that their hardware properties, link speed, duplex mode, IOS version etc must be the same.
  • Any configuration after link aggregation should be done on the newly formed aggregate itnerface.
These steps should ensure that you have a robust aggregate pipe of multiple links. The number of links that can be aggregated depends on the switch being used.

Implementation of aggregate link


On switch 0:


enable  //we will define port channel bundle with id 1
conf t
interface range fa0/1-2 //change the itnerface number according to your needs
channel-group 1 mode active  //define a bundle of two links with LACP set 
channel-protocol lacp //ensure LACP is working
interface port-channel 1 //the logical aggregate interface

switchport mode trunk encapsulation dot1q //required
switchport mode trunk

On switch 1:


enable //we will define port channel bundle with id 2
conf t
interface range fa0/23-24
channel-group 2 mode active
channel-protocol lacp
interface port-channel 2
switchport mode trunk encapsulation dot1q //required
switchport mode trunk

On multilayer switch:


en
conf t
interface port-channel 1
switchport mode trunk encapsulation dot1q //required
switchport mode trunk
en 
conf t
interface port-channel 2
switchport mode trunk encapsulation dot1q  //required
switchport mode trunk

Spanning Tree shows no port is blocked even though two ports are connected to the same switch
The above diagram clearly exhibits that none of the ports were blocked even though in a normal configuration they would have.

Who would have thought that it was so easy to make multiple ports on your switch to behave as one giving far superior throughput and  network redundancy at the same time! Note that a device can have upto 16 ports bundled together. So if all the ports have a capacity of 1gbps, that is 16gbps of pipe in your network!

This was a quick rundown of what Ethernet bonding/aggregation is . In the next article in this series gre tunneling will be introduced which is also another interesting topic in CCNP curriculum.

Important Links:

1. Wiki on Ethernet Aggregation
2. Cisco page on LACP(802.3ad)
3. Part 1: Inter Vlan routing using layer 3 switch in Cisco

2 comments:

  1. Have you ever сonsiԁered publiѕhing an e-boоk
    or gueѕt authoгing on other ѕites?
    I haνе a blog centered on thе same ideas you
    ԁiѕcuss and ωould loνe to haνe yοu shаre some ѕtoгiеs/infοrmatiоn.

    І knoω my vieωers would enjoy yоuг
    ωork. If you are evеn remotely inteгesteԁ,
    fеel frее to send me an email.

    Here іs my blog ρoѕt - niсe flо ()

    ReplyDelete