Chapter 4: EtherChannel and HSRP
Scaling Networks
Presentation_ID © 2008 Cisco Systems, Inc. All rights reserved. Cisco Confidential 1
Chapter 4 – Sections & Objectives
§ 4.1 Link Aggregation Concepts
• Explain link aggregation operation in a switched LAN environment.
§ 4.2 Link Aggregation Configuration
• Implement link aggregation to improve performance on high-traffic
switch links.
§ 4.3 First Hop Redundancy Protocols
• Implement HSRP to provide first hop redundancy.
Presentation_ID © 2008 Cisco Systems, Inc. All rights reserved. Cisco Confidential 2
4.1 Link Aggregation Concepts
Presentation_ID © 2008 Cisco Systems, Inc. All rights reserved. Cisco Confidential 3
Link Aggregation Concepts Link Aggregation
§ Introduction to Link Aggregation
• Links with higher bandwidth must be available between the access and
distribution switches.
• Link aggregation combines a number of physical links between the switches to increase the overall bandwidth between two devices.
• However, by default, STP is enabled on Layer 2 devices such as switches. STP will block redundant links to prevent routing loops.
• Solution: Implement EtherChannel
Presentation_ID © 2008 Cisco Systems, Inc. All rights reserved. Cisco Confidential 4
Link Aggregation Concepts Link Aggregation
§ Advantages of EtherChannel
• Originally developed by Cisco as an inter switch technique of grouping
several Fast Ethernet or Gigabit Ethernet ports into one logical channel.
• When configured, physical interfaces are bundled together into a virtual interface called a port channel interface.
• EtherChannel advantages:
ü Configuration tasks configured on port channel ensuring configuration consistency throughout the links.
ü Uses existing switch ports therefore no need to upgrade links/switch.
ü Load balancing occurs between EtherChannel bundled links.
ü EtherChannel works with STP. Presentation_ID
© 2008 Cisco Systems, Inc. All rights reserved.
Cisco Confidential 5
Link Aggregation Concepts EtherChannel Operation
§ Implementation Restrictions
• EtherChannel interface types cannot be mixed. for example, Fast
Ethernet and Gigabit Ethernet cannot be mixed in a port channel.
• Up to 8 physical ports can be bundled together providing either up to 800 Mb/s (Fast EtherChannel) or 8 Gb/s (Gigabit EtherChannel)
• The Cisco IOS switch support up to six EtherChannels.
• Individual EtherChannel group member port configuration must be consistent on both devices. For example, if the physical ports of one side are configured as trunks, the physical ports of the other side must also be configured as trunks within the same native VLAN.
• Interfaces do not have to be physically contiguous, or on the same module.
• There are two main protocols used to help configure EtherChannels: Port Aggregation Protocol (PAgP) and Link Aggregation Control Protocol (LACP).
Presentation_ID © 2008 Cisco Systems, Inc. All rights reserved. Cisco Confidential 6
Link Aggregation Concepts EtherChannel Operation
§ Port Aggregation Protocol
• Cisco-proprietary protocol used to negotiate the forming of a channel.
• PAgP sends packets every 30 seconds to check for configuration consistency and manages link additions and failures.
• PAgP supports three modes.
o Desirable – Port actively initiates negotiations with other interfaces
by sending PAgP packets.
o Auto – Port passively negotiates state, but does not initiate PAgP negotiation.
o On – Creates a channel member without negotiation.
• The modes must be compatible on each side. For example, desirable – desirable or desirable – auto. Note that auto – auto will not created a bundle.
Presentation_ID © 2008 Cisco Systems, Inc. All rights reserved. Cisco Confidential 7
Link Aggregation Concepts EtherChannel Operation
§ Link Aggregation Control Protocol
• IEEE specification (802.3ad) protocol used to negotiate the forming of a
channel with non-Cisco switches.
• LACP sends packets every 30 seconds to check for configuration consistency and manages link additions and failures.
• LACP supports three modes.
o Active – Port actively initiates negotiations with other interfaces by
sending LACP packets.
o Passive – Port passively negotiates state, but does not initiate LACP negotiation.
o On – Creates a channel member without negotiation.
• The modes must be compatible on each side. For example, active – active or active – passive. Note that passive – passive will not created a bundle.
Presentation_ID © 2008 Cisco Systems, Inc. All rights reserved. Cisco Confidential 8
4.2 Link Aggregation Configuration
Presentation_ID © 2008 Cisco Systems, Inc. All rights reserved. Cisco Confidential 9
Link Aggregation Configuration Configuring EtherChannel
§ Configuration Guidelines
• EtherChannel support – Bundle interfaces must support EtherChannel.
• Speed and duplex – Configure all bundle interfaces with the same speed and in the same duplex mode.
• VLAN match – Assign all bundle interfaces to the same VLAN (unlikely) or configure the bundle as a trunk (most likely).
• Range of VLANs – A trunking EtherChannel must allow the same VLAN range otherwise the interfaces do not form an EtherChannel, even when set to auto or desirable mode.
Presentation_ID © 2008 Cisco Systems, Inc. All rights reserved. Cisco Confidential 10
Link Aggregation Configuration Configuring EtherChannel
§ Configuring LACP Interfaces on S1
S1(config)# interface range fa0/1 – 2 S1(config-if-range)# speed 100 S1(config-if-range)# duplex full S1(config-if-range)# channel-group 1 mode active S1(config-if-range)# shutdown
%LINK-5-CHANGED: Interface FastEthernet0/1, changed state to administratively down %LINK-5-CHANGED: Interface FastEthernet0/2, changed state to administratively down S1(config-if-range)# exit
S1(config)#
S1(config)# interface port-channel 1
S1(config-if)# switchport mode trunk
S1(config-if)# switchport trunk native vlan 99 S1(config-if)# switchport trunk allowed vlan 2,20,99 S1(config-if)# exit
S1(config)#
S1(config)# interface range fa0/1 – 2
S1(config-if-range)# no shut
%LINK-5-CHANGED: Interface FastEthernet0/1, changed state to down
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/1, changed state to down %LINK-5-CHANGED: Interface FastEthernet0/2, changed state to down
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/2, changed state to down Creating a port-channel interface Port-channel 1
S1(config-if-range)#
Presentation_ID © 2008 Cisco Systems, Inc. All rights reserved. Cisco Confidential 11
Link Aggregation Configuration Configuring EtherChannel
§ Configuring LACP Interfaces on S2
S2(config)# interface range fa0/1 – 2 S2(config-if-range)# speed 100 S2(config-if-range)# duplex full S2(config-if-range)# channel-group 1 mode active S2(config-if-range)# shutdown
%LINK-5-CHANGED: Interface FastEthernet0/1, changed state to administratively down %LINK-5-CHANGED: Interface FastEthernet0/2, changed state to administratively down S2(config-if-range)# exit
S2(config)#
S2(config)# interface port-channel 1
S2(config-if)# switchport mode trunk
S2(config-if)# switchport trunk native vlan 99 S2(config-if)# switchport trunk allowed vlan 2,20,99 S2(config-if)# exit
S2(config)#
S2(config)# interface range fa0/1 – 2
S2(config-if-range)# no shut
S2(config-if-range)#
%LINK-5-CHANGED: Interface FastEthernet0/1, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/1, changed state to up %LINK-5-CHANGED: Interface FastEthernet0/2, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/2, changed state to up Creating a port-channel interface Port-channel 1
First Hop Redundancy Protocols HSRP Configuration
§ HSRP Verification
• Use the show standby command to verify the HSRP configuration. • Use the show standby brief command to verify the status of HSRP.
R1# show standby
GigabitEthernet0/0 – Group 1 (version 2)
State is Active
12 state changes, last state change 00:04:54
Virtual IP address is 172.16.10.1
Active virtual MAC address is 0000.0C9F.F001
Local virtual MAC address is 0000.0C9F.F001 (v2 default) Hello time 3 sec, hold time 10 sec
Next hello sent in 1.519 secs Preemption enabled
Active router is local
Standby router is 172.16.10.3 Priority 150 (configured 150)
Group name is hsrp-Gig0/0-1 (default)
R1#
R1# show standby brief
P indicates configured to preempt.
| Interface Grp Pri P Gig0/0 1 150 P
R1#
State Active Standby Active local 172.16.10.3
Virtual IP 172.16.10.1
Presentation_ID © 2008 Cisco Systems, Inc. All rights reserved. Cisco Confidential 23
First Hop Redundancy Protocols HSRP Troubleshooting
§ HSRP Failure
• Most HSRP failures will related to:
§ Failing to successfully elect the active router.
§ Failure of the standby router to successfully keep track of the active router.
§ Failing to determine when control of the virtual IP for the group should be handed over to another router.
§ Failure of end devices to successfully configure the virtual IP address as the default gateway.
§ HSRP Debug Commands
• Use debug standby packets to view the exchange of hello packets. • Use debug standby terse to view the HSRP events.
Presentation_ID © 2008 Cisco Systems, Inc. All rights reserved. Cisco Confidential 24
First Hop Redundancy Protocols HSRP Troubleshooting
§ Common HSRP Configuration Issues
• HSRP routers are not connected to the same network segment. Although this could be a physical layer issue, it could also be a VLAN subinterface configuration issue.
• HSRP routers are not configured with IPv4 addresses from the same subnet. Therefore, a standby router would not know when the active router fails.
• HSRP routers are not configured with the same virtual IPv4 address. The virtual IPv4 address is the default gateway for end devices.
• HSRP routers are not configured with the same HSRP group number. This will cause each router to assume the active role.
• End devices are not configured with the correct default gateway address.
Presentation_ID © 2008 Cisco Systems, Inc. All rights reserved. Cisco Confidential 25
4.3 Chapter Summary
Presentation_ID © 2008 Cisco Systems, Inc. All rights reserved. Cisco Confidential 26
Chapter Summary Summary
§ EtherChannel aggregates multiple switched links together to load balance over redundant paths between two devices. All ports in one EtherChannel must have the same speed, duplex setting, and VLAN information on all interfaces on the devices at both ends.
§ Settings configured in the port channel interface configuration mode will also be applied to the individual interfaces in that EtherChannel. Settings configured on individual interfaces will not be applied to the EtherChannel or to the other interfaces in the EtherChannel.
§ PAgP is a Cisco-proprietary protocol that aids in the automatic creation of EtherChannel links. PAgP modes are on, PAgP desirable, and PAgP auto.
§ LACP is part of an IEEE specification that also allows multiple physical ports to be bundled into one logical channel. The LACP modes are on, LACP active and LACP passive.
§ PAgP and LACP do not interoperate.
§ The on mode is repeated in both PAgP and LACP because it creates an EtherChannel unconditionally, without the use of PAgP or LACP. The default for EtherChannel is that no mode is configured.
§ First Hop Redundancy Protocols, such as HSRP, VRRP, and GLBP provide alternate default gateways for hosts in the redundant router or multilayer switched environment.
§ Multiple routers share a virtual IP address and MAC address that is used as the default gateway on a client. This ensures that hosts maintain connectivity in the event of the failure of one device serving as a default gateway for a VLAN or set of VLANs.
§ When using HSRP or VRRP, one router is active or forwarding for a particular group while others are in standby mode. GLBP allows the simultaneous use of multiple gateways in addition to providing automatic failover.
Presentation_ID © 2008 Cisco Systems, Inc. All rights reserved. Cisco Confidential 27