domingo, 5 de julio de 2009

CCNP3. Cap3.Cont. Configuring Link Aggregation with EtherChannel

3.4 Configuring Link Aggregation with EtherChannel
3.4.1 Describing EtherChannel
Companies require greater and cheaper bandwidth to run their networks, and users are becoming more impatient with any latency that occurs. The insatiable appetite for faster networks and higher availability has intensified the competition among vendors. Some years ago, Cisco came up with a method to provide substantially higher bandwidth with lower cost overhead.

Cisco originally developed EtherChannel as a LAN switch-to-switch technique of inverse multiplexing of multiple Fast or Gigabit Ethernet switch ports into one logical channel. It is effectively cheaper than higher speed media while using existing switch ports.

EtherChannel has developed into a cross-platform method of load balancing between servers, switches, and routers. EtherChannel can bond two, four, or eight ports (Cisco Catalyst 6500) to develop one logical connection with redundancy. The major aspects of EtherChannel are:

  • Frame distribution

  • Management of EtherChannel

  • Logical port

EtherChannel does not do frame-by-frame forwarding in a round-robin fashion on each of the links. The load-balancing policy or frame distribution used is contingent upon the switch platform used. For instance, in a Cisco Catalyst 5500 switch platform, load balancing performs an X-OR calculation on the two lowest order bits of the source and destination MAC address. An X-OR operation between a given pair of addresses uses the same link for all frames. One of the primary benefits of the X-OR operation is to prevent out-of-order frames on the downstream switch. The other advantage is redundancy. If the active channel used by a connection is lost, the existing traffic can traverse over another active link on that EtherChannel. The one disadvantage of an X-OR operation is that the load on the channels might not be equal because the load-balancing policy is done on a specific header as defined by the platform or user configuration. On a Cisco Catalyst 6500 switch, load balancing can be performed on MAC addresses, IP addresses, or IP + TCP/UDP, depending on the type of Supervisor/PFC used. Use the show port capabilities command to check the module for EtherChannel feature.

The default frame distribution behavior for the Cisco Catalyst 6500 is IP.

EtherChannel bundles individual Ethernet links into a single logical link that provides bandwidth up to 1600 Mbps (Fast EtherChannel, full duplex) or 16 Gbps (Gigabit EtherChannel) between two Cisco Catalyst switches. All interfaces in each EtherChannel must be the same speed and duplex, and both ends of the channel must be configured as either a Layer 2 or Layer 3 interface.

If a link within the EtherChannel bundle fails, traffic previously carried over the failed link is carried over the remaining links within the EtherChannel.

The configuration applied to the individual physical interfaces that are to be aggregated by EtherChannel affects only those interfaces. Each EtherChannel has a logical port channel interface. A configuration applied to the port channel interface affects all physical interfaces assigned to that interface. (These can be STP commands or commands to configure a Layer 2 EtherChannel as a trunk.)

EtherChannel provides the following features and benefits:

  • Allows for the creation of a very high bandwidth logical link

  • Load balances among the physical links involved

  • Provides automatic failover

  • Simplifies subsequent logical configuration (configuration is per logical link instead of per physical link)

3.4.2 Describing PAgP and LACP
Cisco’s proprietary Port Aggregation Protocol (PAgP) and the IEEE standard Link Aggregation Protocol (LACP) automatically create bundled Ethernet links.

PAgP packets are sent between Fast EtherChannel-capable ports to negotiate the forming of a channel. When PAgP identifies matched Ethernet links, it groups the links into an EtherChannel. The EtherChannel is then added to the spanning tree as a single bridge port.

PAgP manages EtherChannel. PAgP packets are sent every 30 seconds using multicast group MAC address 01-00-0C-CC-CC-CC with protocol value 0x0104. PAgP checks for configuration consistency and manages link additions and failures between two switches. It ensures that when an EtherChannel is created that all ports have the same type of configuration, because it is mandatory that all ports have the same speed, duplex setting, and VLAN information. Any port modification after the creation of the channel will also change all the other channel ports.

The last component of EtherChannel is the creation of the logical port. The logical port, or Agport, is composed of all the ports that make up the EtherChannel. The Agport’s functionality and behavior are no different than any other port. For instance, the spanning tree algorithm treats Agport as a single port.

LACP is part of an IEEE specification (802.3ad) that allows several physical ports to be bundled together to form a single logical channel. LACP allows a switch to negotiate an automatic bundle by sending LACP packets to the peer. It performs a similar function as PAgP with Cisco EtherChannel. Because LACP is an IEEE standard, it can be used to facilitate EtherChannels in mixed-switch environments.

Interfaces can be set in any of several modes to control EtherChannel formation. Figure shows the settings for PAgP and LACP. The following parameters are used in configuring LACP:

  • System priority: Each switch running LACP must have a system priority, which can be specified automatically or through the CLI. The switch uses the MAC address and the system priority to form the system ID.

  • Port priority: Each port in the switch must have a port priority, which can be specified automatically or through the CLI. The port priority and the port number form the port identifier. The switch uses the port priority to decide which ports to put in standby mode when a hardware limitation prevents all compatible ports from aggregating.

  • Administrative key: Each port in the switch must have an administrative key value, which can be specified automatically or through the CLI. The administrative key defines the ability of a port to aggregate with other ports, determined by the following:

    • The port’s physical characteristics, such as data rate, duplex capability, and point-to-point or shared medium

    • The configuration constraints that you establish

LACP attempts to configure the maximum number of compatible ports in a channel. In some instances, LACP is not able to aggregate all the ports that are compatible; for example, the remote system might have more restrictive hardware limitations. When this occurs, all the ports that cannot be actively included in the channel are put in hot standby state and used only if one of the channeled ports fails.

3.4.3 Describing EtherChannel Configuration Commands
The commands in Figures and are used to configure and verify EtherChannel.
3.4.4 Configuring Port Channels Using EtherChannel
Figure illustrates the configuration of Layer 2 EtherChannel. Figure shows the steps for configuring and verifying an EtherChannel interface.

Figure illustrates the configuration of Layer 3 EtherChannel. Figure shows the steps for configuring and verifying a Layer 3 EtherChannel interface.

Use the show running-config interface port-channel num command to display the configuration specific to the port channel.

Use the show interfaces [interface] [num] etherchannel command to display information about the port channel and the specific EtherChannel interfaces.

The following example demonstrates how to verify the configuration of a Layer 3 EtherChannel.

Switch#show interfaces fastethernet 5/4 etherchannel

Port state = EC-Enbld Up In-Bndl Usr-Config
Channel group = 1 Mode = Desirable Gcchange = 0
Port-channel = Po1 GC = 0x00010001 Pseudo-port-channel = Po1
Port indx = 0 Load = 0x55

Flags: S - Device is sending Slow hello. C - Device is in Consistent state.
A - Device is in Auto mode. P - Device learns on physical port.
Timers: H - Hello timer is running. Q - Quit timer is running.
S - Switching timer is running. I - Interface timer is running.

Local information:
Hello Partner PAgP Learning Group
Port Flags State Timers Interval Count Priority Method Ifindex
Fa5/4 SC U6/S7 30s 1 128 Any 55

Partner's information:
Partner Partner Partner Partner Group
Port Name Device ID Port Age Flags Cap.
Fa5/4 JAB031301 0050.0f10.230c 2/45 1s SAC 2D

Age of the port in the current state: 00h:54m:52s

The following two command outputs show how to verify the configuration of Fast Ethernet interface 5/6 for Layer 2 EtherChannel.

Switch#show running-config interface fastethernet 5/6

Building configuration...
Current configuration:
!
interface FastEthernet5/6
switchport access vlan 10
switchport mode access
channel-group 2 mode desirable
end

Switch#show interfaces fastethernet 5/6 etherchannel
Port state = EC-Enbld Up In-Bndl Usr-Config
Channel group = 1 Mode = Desirable Gcchange = 0
Port-channel = Po1 GC = 0x00010001
Port indx = 0 Load = 0x55

Flags: S - Device is sending Slow hello. C - Device is in Consistent state.
A - Device is in Auto mode. P - Device learns on physical port.
Timers: H - Hello timer is running. Q - Quit timer is running.
S - Switching timer is running. I - Interface timer is running.

Local information:
Hello Partner PAgP Learning Group
Port Flags State Timers Interval Count Priority Method Ifindex
Fa5/6 SC U6/S7 30s 1 128 Any 56
Partner's information:

Partner Partner Partner Partner Group
Port Name Device ID Port Age Flags Cap.
Fa5/6 JAB031301 0050.0f10.230c 2/47 18s SAC 2F

Age of the port in the current state: 00h:10m:57s

Use the show etherchannel command to display port-channel information after configuration.

The next example shows how to verify the configuration of port-channel interface 1 after the interfaces have been configured.

Switch#show etherchannel 1 port-channel

Channel-group listing:
----------------------
Group: 1
------------

Port-channels in the group:
----------------------
Port-channel: Po1
------------

Age of the Port-channel = 01h:56m:20s
Logical slot/port = 10/1 Number of ports = 2
GC = 0x00010001 HotStandBy port = null
Port state = Port-channel L3-Ag Ag-Inuse

Ports in the Port-channel:

Index Load Port
-------------------
1 00 Fa5/6
0 00 Fa5/7

Time since last port bundled: 00h:23m:33s Fa5/6

This example shows how to verify the configuration of port-channel interface 1 (a Layer 2 EtherChannel) after the interfaces have been configured.

Switch#show etherchannel 1 port-channel

Port-channels in the group:
----------------------

Port-channel: Po1
------------

Age of the Port-channel = 00h:23m:33s
Logical slot/port = 10/2 Number of ports in agport = 2
GC = 0x00020001 HotStandBy port = null
Port state = Port-channel Ag-Inuse

Ports in the Port-channel:

Index Load Port
-------------------
1 00 Fa5/6
0 00 Fa5/7

Time since last port bundled: 00h:23m:33s Fa5/6

Follow these guidelines and restrictions when configuring EtherChannel interfaces:

  • EtherChannel support: All Ethernet interfaces on all modules support EtherChannel (maximum of eight interfaces), with no requirement that interfaces be physically contiguous or on the same module.

  • Speed and duplex: Configure all interfaces in an EtherChannel to operate at the same speed and in the same duplex mode. Also, if one interface in the bundle is shut down, it is treated as a link failure, and traffic traverses other links in the bundle.

  • Switched port analyzer (SPAN) and EtherChannel: An EtherChannel will not form if one of the interfaces is a SPAN destination port.

  • Layer 3 EtherChannels: Assign Layer 3 addresses to the port-channel logical interface, not to the physical interfaces in the channel.

  • VLAN match: All interfaces in the EtherChannel bundle must be assigned to the same VLAN or be configured as a trunk.

  • Range of VLANs: An EtherChannel supports the same allowed range of VLANs on all the interfaces in a trunking Layer 2 EtherChannel. If the allowed range of VLANs is not the same, the interfaces do not form an EtherChannel, even when set to auto or desirable mode. For Layer 2 EtherChannels, either assign all interfaces in the EtherChannel to the same VLAN or configure them as trunks.

  • STP path cost: Interfaces with different STP port path costs can form an EtherChannel as long they are otherwise compatibly configured.

  • Port channel versus interface configuration: After you configure an EtherChannel, any configuration you apply to the port-channel interface affects the EtherChannel. Any configuration you apply to the physical interfaces affects only the specific interface you configured.

The example illustrated in Figure shows how to configure an EtherChannel following the guidelines.



3.4.5 Configuring Load Balancing over EtherChannel
In Figure , an EtherChannel of four workstations communicates with a router. Because the router is a single-MAC-address device, source-based forwarding on the switch’s EtherChannel ensures that the switch uses all available bandwidth to the router. The router is configured for destination-based forwarding, because the large number of workstations ensures that the traffic is evenly distributed from the router EtherChannel.

Use the option that provides the greatest variety in your configuration. For example, if the traffic on a channel is going only to a single MAC address, using the destination MAC address always chooses the same link in the channel; using source addresses might result in better load balancing.

EtherChannel balances the traffic load across the links in a channel by reducing part of the binary pattern formed from the addresses in the frame to a numerical value that selects one of the links in the channel. EtherChannel load balancing can use either source-MAC or destination-MAC address forwarding.

With source-MAC address forwarding, when packets are forwarded to an EtherChannel, they are distributed across the ports in the channel based on the source MAC address of the incoming packet. Therefore, to provide load balancing, packets from different hosts use different ports in the channel, but packets from the same host use the same port in the channel (and the MAC address learned by the switch does not change).

With destination-MAC address forwarding, when packets are forwarded to an EtherChannel, they are distributed across the ports in the channel based on the destination MAC address of the frame. Therefore, packets to the same destination are forwarded over the same port, and packets to a different destination are sent on a different port in the channel. You configure the load balancing and forwarding method by using the port-channel load-balance global configuration command.

EtherChannel balances traffic load across the links in a channel. The default and load balancing method varies among the Cisco Catalyst models.

Load balancing is applied globally for all EtherChannel bundles in the switch. To configure EtherChannel load balancing, use the port-channel load-balance command. Load balancing can be based on the following variables:

  • src-mac: Source MAC address

  • dst-mac: Destination MAC address

  • src-dst-mac: Source and destination MAC addresses

  • src-ip: Source IP address

  • dst-ip: Destination IP address

  • src-dst-ip: Source and destination IP addresses (default)

  • src-port: Source TCP/User Datagram Protocol (UDP) port

  • dst-port: Destination TCP/UDP port

  • src-dst-port: Source and destination TCP/UDP ports

This example shows an example of how to configure and verify EtherChannel load balancing.

Switch(config)# port-channel load-balance src-dst-ip
Switch(config)# exit
Switch# show etherchannel load-balance

Source XOR Destination IP address




3.5 Spanning Tree Lab Exercises
3.5.1 Lab 3-1 Spanning Tree Protocol (STP) Default Behavior
Lab Activity

Lab Exercise: Lab 3-1 Spanning Tree Protocol (STP) Default Behavior

The purpose of this lab is to observe the default behavior of STP.



3.5.2 Lab 3-2 Modifying Default Spanning Tree Behavior

Lab Activity

Lab Exercise: Lab 3-2 Modifying Default Spanning Tree Behavior

The purpose of this lab is to observe what happens when the default spanning tree behavior is modified.



3.5.3 Lab 3-3 Per-VLAN Spanning Tree Behavior

Lab Activity

Lab Exercise: Lab 3-3 Per-VLAN Spanning Tree Behavior

The purpose of this lab is to observe what happens when there is a separate spanning tree instance per VLAN. This lab also looks at changing spanning tree mode to rapid spanning tree.


3.5.4 Lab 3-4 Multiple Spanning Tree

Lab Activity

Lab Exercise: Lab 3-4 Multiple Spanning Tree

The purpose of this lab is to observe the behavior of MST (multiple spanning tree).



3.5.5 Lab 3-5 Configuring Etherchannel
Lab Activity

Lab Exercise: Lab 3-5 Configuring Etherchannel

The purpose of this lab is to configure and observe Etherchannel.



Summary

This module reviewed the fundamentals of the STP operation in a switched network. Many enhancements have been made to the original 802.1D STP. A switched network can quickly adapt to topology changes by implementing RSTP. MSTP implements a minimal number of STP instances in a switched environment. Recommended practices and guidelines for EtherChannel were examined.

No hay comentarios:

Publicar un comentario