Nov 2, 2012

Switching-Ether


Switching - EtherChannels

We have covered that I would consider the basics of switching. We've seen how to make a switchport an access port that an end user would connect to. We've setup trunks between switches utilizing DTP and with static configurations. We've taken a basic look at 802.1q, we've created a router-on-a-stick so we could route traffic between vlans, and we've setup VTP so we could tell all out network switches about vlans. Now let's get into some of the advanced topics. I'll start with EtherChanneling and go from there.
EtherChanneling, also know as PortChanneling, is taking multiple links and creating a single logical link. This is mostly for spanning-tree benefit. I won't go over STP as this blog is about etherchannels and not STP. If you have questions on STP feel free to shoot me a message.
There are 3 types of EtherChannels, 1)static 2)PAgP 3)LACP. Static is just creating an etherchannel and putting it in the on mode. PAgP is the Cisco proprietary negotiation method of creating an etherchanel and LACP is the IEEE standard method of etherchannel negotiation. When using one of the etherchannel negotiation methods PAgP and LACP these act similar to DTP in that at least one end needs to be desireable or active. The other end can be in auto or passive, but if both ends are auto or passive then neither side will start the etherchannel negotiation.


Let's take a look at the first method of creating an etherchannel using the static method.
SW1(config)#int range fa0/13-15
SW1(config-if-range)#switchport mode dynamic desireable
SW1(config-if-range)#channel-group 12 mode on
SW2(config)#int range fa0/13-15
SW2(config-if-range)#switchport mode dynamic auto
SW2(config-if-range)#channel-group 12 mode on
I'm creating an etherchannel between switch 1 and 2 so I'm going to call it portchannel 12.
SW1#sho etherchannel sum
Flags: D - down P - bundled in port-channel
I - stand-alone s - suspended
H - Hot-standby (LACP only)
R - Layer3 S - Layer2
U - in use f - failed to allocate aggregator
M - not in use, minimum links not met
u - unsuitable for bundling
w - waiting to be aggregated
d - default port
Number of channel-groups in use: 1
Number of aggregators: 1

Group Port-channel Protocol Ports
------+-------------+-----------+-----------------------------------------------
12 Po12(SU) - Fa0/13(P) Fa0/14(P) Fa0/15(P)
We can see that the portchannel has 3 interfaces bundled in the portchannel. Each interface in the bundle is listed with a (P). We can see that this is a Layer 2 portchannel and that it's up. Notice the protocol field is - this means we didn't use a negotiation like PAgP or LACP in order to create this. We just turned on etherchanneling on both sides.
Next let's take a look at using PAgP to create an etherchannel. Remember PAgP is Cisco proprietary so it only works between Cisco switches. If you have HP or Juniper switches you won't be able to use PAgP.
SW1(config)#int range fa0/16-19
SW1(config-if-range)#channel-group 13 mode desireable
SW3(config)#int range fa0/13-15
SW3(config-if-range)#channel-group 13 mode auto
I'm creating the PAgP etherchannel between SW1 and SW3 therefore I'm using portchannel 13.
SW3#sho etherchannel sum
Flags: D - down P - bundled in port-channel
I - stand-alone s - suspended
H - Hot-standby (LACP only)
R - Layer3 S - Layer2
U - in use f - failed to allocate aggregator
M - not in use, minimum links not met
u - unsuitable for bundling
w - waiting to be aggregated
d - default port
Number of channel-groups in use: 1
Number of aggregators: 1
Group Port-channel Protocol Ports
------+-------------+-----------+-----------------------------------------------
13 Po13(SU) PAgP Fa0/13(P) Fa0/14(P) Fa0/15(P)


Again we see the portchannel is up and is Layer 2. We see the ports that are bundled in the portchannel, but now we see PAgP listed in the Protocol column. So we created an etherchannel, but we let the Cisco switches negotiate it and bring it up.
Our 3rd method of etherchannel is the LACP negotiation method. LACP is the IEEE open standard, so if you have a network with multiple vendor switches this is the one to use for negotiating etherchannels.
SW1(config)#int range fa0/19-21
SW1(config-if-range)#channel-group 14 mode active
SW4(config)#int range fa0/13-15
SW4(config-if-range)#channel-group 14 mode passive
I'm sure you've noticed a pattern with the portchannel numbers I'm using.
SW4#sho etherchannel summary
Flags: D - down P - bundled in port-channel
I - stand-alone s - suspended
H - Hot-standby (LACP only)
R - Layer3 S - Layer2
U - in use f - failed to allocate aggregator
M - not in use, minimum links not met
u - unsuitable for bundling
w - waiting to be aggregated
d - default port
Number of channel-groups in use: 1
Number of aggregators: 1
Group Port-channel Protocol Ports
------+-------------+-----------+-----------------------------------------------
14 Po14(SU) LACP Fa0/13(P) Fa0/14(P) Fa0/15(P)
Once again we see the port channel is up at Layer 2 and we see the ports in the portchannel. This time the Protocol column lists LACP as the protocol used to bring up the etherchannel.
So far we have create 3 Layer 2 etherchannels utilizing the 3 different methods 1) static 2)PAgP 3)LACP.
Now let's create another etherchannel, but this time lets create a Layer 3 etherchannel.
Before we get to excited about creating a Layer 3 etherchannel you must remember the order of operations for this one. Before you can add the ports that will be in the bundle you have to make them routed ports first.
SW2(config)#int port-channel 24
SW2(config-if)#no switchport
SW2(config-if)#ip address 155.10.108.8 255.255.255.0
SW2(config-if)#int fa0/19
SW2(config-if)#no switchport
SW2(config-if)#channel-group 24 mode passive
SW2(config-if)#int fa0/20
SW2(config-if)#channel-group 24 mode passive
SW4(config)#int port-channel 24
SW4(config-if)#no switchport
SW4(config-if)#ip address 155.10.108.10 255.255.255.0
SW4(config-if)#int fa0/16
SW4(config-if)#no switchport
SW4(config-if)#channel-group 24 mode active
SW4(config-if)#int fa0/17
SW4(config-if)#no switchport
SW4(config-if)#channel-group 24 mode active
Let's take a look at what I did here. First I created the portchannel and made it a routed interface by adding the no switchport. Then I gave it an IP address.
Next I went to the interfaces that are going to be in this portchannel and I made them routed interfaces as well. Then I put those interfaces into the port channel. Let's see what this looks like:
SW2#sho etherchannel sum
Flags: D - down P - bundled in port-channel
I - stand-alone s - suspended
H - Hot-standby (LACP only)
R - Layer3 S - Layer2
U - in use f - failed to allocate aggregator
M - not in use, minimum links not met
u - unsuitable for bundling
w - waiting to be aggregated
d - default port
Number of channel-groups in use: 2
Number of aggregators: 2
Group Port-channel Protocol Ports
------+-------------+-----------+-----------------------------------------------
12 Po12(SD) - Fa0/13(D) Fa0/14(D) Fa0/15(D)
24 Po24(RU) LACP Fa0/19(P) Fa0/20(P)
I still have my Layer 2 etherchannel between SW2 and SW1 we see that. Now I have added a Layer 3 etherchannel between SW2 and SW4,seen with the R next to the port-channel number, and hence the portchannel number of 24. We also see that I used LACP as the negotiaion method for my Layer 3 etherchannel.
And to confirm everything is working I'll ping SW4 from SW2.
SW2#ping 155.10.108.10
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 155.10.108.10, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/2/8 ms
Booyah!! EtherChannels are up and working.

No comments: