码迷,mamicode.com
首页 > 其他好文 > 详细

Lab - Configure EtherChannel

时间:2016-01-21 19:36:56      阅读:253      评论:0      收藏:0      [点我收藏+]

标签:

技术分享

 

Objective

  • Configure Etherchannel

 

Background

Four switches have just been installed. The distribution layer switches are Catalyst 3560 switches, and the access layer switches are Catalyst 2960 switches. There are redundant uplinks between the access layer and distribution layer. Usually, only one of these links could be used; otherwise, a bridging loop might occur. However, using only one link utilizes only half of the available bandwidth. EtherChannel allows up to eight redundant links to be bundled together into one logical link. In this lab, you configure Port Aggregation Protocol (PAgP), a Cisco EtherChannel protocol, and Link Aggregation Control Protocol (LACP), an IEEE 802.3ad open standard version of EtherChannel.

 

 

Step 1: Prepare the switches for the lab.

Delete vlan.dat, erase the startup configuration, and reload all your switches.

 

 

Step 2: Configure basic switch parameters

  1. Assign each switch a hostname according to the topology diagram.
  2. Configure ports Fa0/7 through Fa0/12 as trunks. On the 3560 switches, you must first set the trunk encapsulation to 802.1Q. On the 2960s, only dot1q is supported, therefore the switchport trunk encapsulation command is unavailable, but the mode still needs to be changed to trunk.

 

Note: If the ports are configured with dynamic auto mode and you do not set the mode of the ports to trunk, the links do not form trunks and remain access ports. The default mode on a 3560 or 2960 switch is dynamic auto. The default mode on a 3550 or 2950 switch is dynamic desirable.

 

DLS1 example:

DLS1# configure terminal

Enter configuration commands, one per line. End with CNTL/Z.

DLS1(config)# interface range fastEthernet 0/7 - 12

DLS1(config-if-range)# switchport trunk encapsulation dot1q

DLS1(config-if-range)# switchport mode trunk

 

 

 

Step 3: Configure an EtherChannel with Cisco PAgP.

Note: When configuring EtherChannels, it is a recommended best practice to shutdown the physical ports being grouped on both devices before configuring them into channel groups. Otherwise, the EtherChannel Misconfig Guard may place these ports into err-disabled state. The ports and port channel can be re-enabled after the EtherChannel is configured.

 

  1. The first EtherChannel created for this lab aggregates ports Fa0/11 and Fa0/12 between ALS1 and ALS2. Make sure that you have a trunk link active for those two links with the show interfaces trunk command技术分享技术分享

 

  1. On both switches, add ports Fa0/11 and Fa0/12 to port channel 1 with the channel-group 1 mode desirable command. The mode desirable option indicates that you want the switch to actively negotiate to form a PAgP link.

ALS1(config)# interface range fastEthernet 0/11 - 12

ALS1(config-if-range)# channel-group 1 mode desirable

Creating a port-channel interface Port-channel 1

 

  1. Configure the logical interface to become a trunk by first entering the interface port-channel number command and then the switchport mode trunk command. Add this configuration to both switches.

ALS1(config)# interface port-channel 1

ALS1(config-if)# switchport mode trunk

 

  1. Verify that EtherChannel is working by issuing the show etherchannel summary command on both switches. This command displays the type of EtherChannel, the ports utilized, and port states技术分享

 

 

  1. If the EtherChannel does not come up, you might want to try “flapping” the physical interfaces on both ends of the EtherChannel. This involves using the shut command on those interfaces, followed by a no shut command a few seconds later.

 

The show interfaces trunk and show spanning-tree commands also show the port channel as one logical link.

 

技术分享

 

技术分享

 

 

Step 4: Configure an 802.3ad LACP EtherChannel.

  1. In 2000, the IEEE passed 802.3ad, which is an open standard version of EtherChannel. Using the previous commands, configure the link between DLS1 and ALS1 on ports Fa0/7 and Fa0/8 as an LACP EtherChannel. You must use a different port channel number on ALS1 than 1, because you already used that in the previous step. To configure a port channel as LACP, use the interface-level command channel-group number mode active. Active mode indicates that the switch actively tries to negotiate that link as LACP, as opposed to PAgP.

ALS1(config)# interface range fastEthernet 0/7 - 8

ALS1(config-if-range)# channel-group 2 mode active

Creating a port-channel interface Port-channel 2

ALS1(config-if-range)# interface port-channel 2

ALS1(config-if)# switchport mode trunk

 

  1. Apply a similar configuration on DLS1. Verify the configuration with the show etherchannel summary command.

技术分享

 

技术分享

 

Step 5: Configure a Layer 3 EtherChannel.

In the previous steps, you configured EtherChannels as Layer 2 trunk connections between switches. You can also configure EtherChannels as Layer 3 (routed) connections on switches that support routed ports. Because DLS1 and DLS2 are both multilayer switches, they can support routed ports.

 

  1. Use the no switchport command on Fa0/11 and Fa0/12 to make them Layer 3 ports, and then add them to the channel group with the channel-group number mode desirable command. On the logical interface, issue the no switchport command to make it a Layer 3 port. Add the IP address 10.0.0.1 for DLS1 and 10.0.0.2 for DLS2. Configure both with a /24 subnet mask.

DLS1(config)# interface range fastEthernet 0/11 - 12

DLS1(config-if-range)# no switchport

DLS1(config-if-range)# channel-group 3 mode desirable

Creating a port-channel interface Port-channel 3

DLS1(config-if-range)# interface port-channel 3

DLS1(config-if)# no switchport

DLS1(config-if)# ip address 10.0.0.1 255.255.255.0

 

  1. Verify that you have Layer 3 connectivity by attempting to ping the other side of the link.

技术分享

 

  1. If you look at the output of the show etherchannel summary command, you see that it lists the port channel as a routed port, not a switched port. The RU in parentheses next to the name means routed and up, as opposed to switched and up (SU).

技术分享

 

 

Step 6: Configure load balancing.

The switches can use different methods to load-balance traffic going through a port channel. The available methods as well as the default method used varies by hardware platform. By default, Cisco Catalyst 3560 and Catalyst 2960 switches load-balance using the source MAC address.

 

  1. You can view the current load-balancing configuration with the show etherchannel load-balance command.

技术分享

Other methods of load balancing are based on the destination MAC address, both source and destination MAC addresses, source IP address, destination IP address, and both source and destination IP addresses. Some older platforms, such as the Cisco Catalyst 2950 and Catalyst 3550 switches, may not support all of these methods.

 

  1. For this scenario, configure ALS1 to load-balance by both source and destination MAC addresses using the global configuration command port-channel load-balance method, where the method is src-dst-mac.

ALS1(config)# port-channel load-balance src-dst-mac

 

  1. Verify the configuration with the show etherchannel load-balance command.

技术分享

 

Challenge

The topology still has redundant links that you can aggregate. Experiment with the other port channel modes using the question mark on the interface-level command channel-group number mode ?. Look at the descriptions and implement some port channels in different ways. If The port mode is set to desirable, auto, active or passive (when PAgP or LACP are used), the command channel-protocol can be used. It cannot be used with channel-group number mode on command. The “on” mode statically sets the EtherChannel protocol without negotiation.

 

Lab - Configure EtherChannel

标签:

原文地址:http://www.cnblogs.com/elewei/p/5148623.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!