Вы находитесь на странице: 1из 35

Configuring Link

Aggregation with
Etherchannel

Chapter 2
2007 2010, Cisco Systems, Inc. All rights reserved.

Cisco Public

EtherChannel Technology
Up to 8 physical links can be bundled
into a single logical EtherChannel
link.
Usually EtherChannel is used for
trunk links.
Configuration applied to port channel
interface affects all physical
interfaces assigned to the port
channel.
Load balancing takes place between
the physical links in an EtherChannel.
EtherChannels can be L2 or L3
interfaces.
Chapter 2
2007 2010, Cisco Systems, Inc. All rights reserved.

Cisco Public

EtherChannel Management Protocols


Port Aggregation Protocol (PAgP) is a Cisco-proprietary protocol that aids in
the automatic creation of Fast EtherChannel links.
When an EtherChannel link is configured using PAgP, 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. Spanning
tree adds the EtherChannel as a single bridge port.

Link Aggregation Control Protocol (LACP) is part of an IEEE specification


(802.3ad) that also enables several physical ports to be bundled together to
form an EtherChannel.
LACP enables 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, you can use it to facilitate EtherChannels in
mixed-switch environments. In a Cisco environment, both protocols are supported.

Chapter 2
2007 2010, Cisco Systems, Inc. All rights reserved.

Cisco Public

PAgP Modes

Mode

Purpose

Auto

Places an interface in a passive negotiating state in which the interface responds to the
PAgP packets that it receives but does not initiate PAgP negotiation (default).

Desirable

Places an interface in an active negotiating state in which the interface initiates negotiations
with other interfaces by sending PAgP packets. Interfaces configured in the on mode do
not exchange PAgP packets.

On

Forces the interface to channel without PAgP.

Non-silent

If a switch is connected to a partner that is PAgP-capable, configure the switch interface for
non-silent operation. The non-silent keyword is always used with the auto or desirable
mode. If you do not specify non-silent with the auto or desirable mode, silent is assumed.
The silent setting is for connections to file servers or packet analyzers; this setting enables
PAgP to operate, to attach the interface to a channel group, and to use the interface for
transmission.

Chapter 2
2007 2010, Cisco Systems, Inc. All rights reserved.

Cisco Public

LACP Modes

Mode

Purpose

Passive

Places a port in a passive negotiating state. In this state, the port responds
to the LACP packets that it receives but does not initiate LACP packet
negotiation (default).

Active

Places a port in an active negotiating state. In this state, the port initiates
negotiations with other ports by sending LACP packets.

On

Forces the interface to the channel without PAgP or LACP.

Chapter 2
2007 2010, Cisco Systems, Inc. All rights reserved.

Cisco Public

Configuring EtherChannel
Step 1. Specify the interfaces that will compose the EtherChannel group. Using the range
commands enables you to select several interfaces and configure them all together. A
good practice is to start by shutting down these interfaces, so that incomplete
configuration will not start to create activity on the link:
Switch(config)# interface range interface_type [interface_range]

Step 2. Specify the channeling protocol to be used. This command is not applicable to all
Catalyst platforms. You can also specify the channeling protocol at Step 3:
Switch(config-if-range)# channel-protocol {pagp | lacp}

Step 3. Create the port-channel interface, if necessary, and assign the specified interfaces
to it:
Switch(config-if-range)# channel-group number mode {active | on | {auto
[non-silent]} | {desirable [non-silent]} | passive

Step 4. Specify the port-channel interface. When in the interface configuration mode, you
can configure additional parameters. The physical interfaces will inherit these parameters.
When this configuration is complete, you can reenable the physical ports in the
EtherChannel bundle:
Switch(config)# interface port-channel number
Switch(config-if)# interface parameters

Chapter 2
2007 2010, Cisco Systems, Inc. All rights reserved.

Cisco Public

Example: EtherChannel Configuration


Switch(config)# interface fastethernet 0/23
Switch(config-if)# channel-group 2 mode active
Switch(config)# interface fastethernet 0/24
Switch(config-if)# channel-group 2 mode active
Switch(config)# interface port-channel 2
Switch(config-if)# switchport mode trunk
Switch(config-if)# switchport trunk native VLAN 99
Switch(config-if)# switchport trunk allowed VLAN 2,3,99

Remote Switch configuration


RSwitch(config)# interface fastethernet 0/23
RSwitch(config-if)# channel-group 5 mode on
RSwitch(config)# interface fastethernet 0/24
RSwitch(config-if)# channel-group 5 mode on
RSwitch(config)# interface port-channel 5
RSwitch(config-if)# switchport mode trunk
RSwitch(config-if)# switchport trunk native VLAN 99
Chapter 2
2007 2010, Cisco Systems, Inc. All rights reserved.

Cisco Public

Verifying EtherChannel (1)


You can use several commands to verify an EtherChannel
configuration. On any physical interface member of an EtherChannel
bundle, the show interfaces interface_id etherchannel
command provides information on the role of the interface in the
EtherChannel.
Interface FastEthernet 0/24 below is part of EtherChannel bundle 1.
The protocol for this EtherChannel is LACP.
Switch# show interfaces fa0/24 etherchannel
Port state = Up Sngl-port-Bndl Mstr Not-in-Bndl
Channel group = 1
Mode = Active
Gcchange = Port-channel = null GC = Pseudo port-channel = Po1
Port index = 0
Load = 0x00 Protocol = LACP

Chapter 2
2007 2010, Cisco Systems, Inc. All rights reserved.

Cisco Public

Verifying EtherChannel (2)


The show etherchannel number port-channel command can
be used to display information about a specific port-channel.
Below Port-channel 1 consists of two physical ports, Fa0/23 and
Fa0/24.
It uses LACP in active mode.
It is properly connected to another switch with a compatible
configuration.This is why the port-channel is said to be in use.
Switch# show etherchannel 1 port-channel
Port-channels in the group:
--------------------------Port-channel: Po7
(Primary Aggregator)
Age of the Port-channel = 195d:03h:10m:44s
Logical slot/port = 0/1
Number of ports = 2
Port state = Port-channel Ag-Inuse
Protocol = LACP
Ports in the Port-channel:
Index
Load
Port
EC state
No of bits
------+------+--------+--------------+----------0
55
fa0/23
Active
4
1
45
fa0/24
Active
4
Chapter 2
2007 2010, Cisco Systems, Inc. All rights reserved.

Cisco Public

Verifying EtherChannel (3)


When several port-channel interfaces are configured on the same device, the
show etherchannel summary command is useful for displaying one-line
information per port-channel.
As shown below; the switch has three EtherChannels configured: Groups 2 and
7 use LACP and Group 9 uses PAgP. Each EtherChannel has the member
interfaces listed. All three groups are Layer 2 EtherChannels and are all in use
(SU next to the port-channel number).
Switch# show 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: 2
Number of aggregators: 2
Group
Port-channel Protocol
Ports
------+-------------+-----------+-------------------------------------------2
Po2(SU)
LACP g0/49(P) g0/50(P) g0/51(P) g0/52(P)
7
Po7(SU)
LACP g0/47(P) g0/48(P)
9
Po9(SU)
PAgP g0/8(P) g0/9(P)
Chapter 2
2007 2010, Cisco Systems, Inc. All rights reserved.

Cisco Public

10

Verifying EtherChannel (4)


The show running-config interface
interface_id command displays sections of your
configuration relevant to EtherChannel. The interface
argument can be physical or logical.
Switch# show running-config interface g0/48
Building configuration...
Current configuration : 154 bytes
interface GigabitEthernet0/48
switchport access vlan 41
switchport trunk encapsulation dot1q
switchport mode trunk
channel-group 7 mode active
Switch# show running-config interface port-channel 7
Building configuration...
Current configuration : 92 bytes
interface Port-channel7
switchport trunk encapsulation dot1q
switchport mode trunk
Chapter 2
2007 2010, Cisco Systems, Inc. All rights reserved.

Cisco Public

11

EtherChannel Load Balancing

Chapter 2
2007 2010, Cisco Systems, Inc. All rights reserved.

Cisco Public

12

EtherChannel Load Balancing Example


Here the EtherChannel load-balancing mechanism is configured to use
source and destination IP address pairs.
This rule is applied to IPv4 and IPv6 traffic, whereas the non-IP loadbalancing mechanism uses source and destination MAC address pairs.
It was observed that with source-destination IP load balancing, the
balancing ends up more like 70-30 on the links!

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


Switch(config)# exit
Switch# show etherchannel load-balance
EtherChannel Load-Balancing Configuration:
src-dst-ip
EtherChannel Load-Balancing Addresses Used Per-Protocol:
Non-IP: Source XOR Destination MAC address
IPv4: Source XOR Destination IP address
IPv6: Source XOR Destination IP address
Chapter 2
2007 2010, Cisco Systems, Inc. All rights reserved.

Cisco Public

13

Understanding
First Hop
Redundancy
Protocols

Chapter 2
2007 2010, Cisco Systems, Inc. All rights reserved.

Cisco Public

14

Introduction to First Hop Redundancy

Proxy ARP
Static Default Gateway
HSRP
VRRP
GLBP

Chapter 2
2007 2010, Cisco Systems, Inc. All rights reserved.

Cisco Public

15

Proxy ARP
Legacy solution.
Enabled by default.
Used before default
gateways were supported
on IP clients.
End station acts as if
destination were on same
network segment.
Relatively slow due to
reliance on aging out of
ARP cache.

Chapter 2
2007 2010, Cisco Systems, Inc. All rights reserved.

Cisco Public

16

Static Default Gateway


Not dynamic.
Does not provide
secondary path.

Chapter 2
2007 2010, Cisco Systems, Inc. All rights reserved.

Cisco Public

17

Hot Standby Router Protocol (HSRP)


Cisco-proprietary gateway
redundancy protocol.
Participating routers talk to
each other and agree on a
virtual router with a virtual
IP address which end
systems use as a default
gateway.

Chapter 2
2007 2010, Cisco Systems, Inc. All rights reserved.

Cisco Public

18

HSRP Failover
When active router or links
between routers fail, the
standby router stops
seeing hello messages
from active router. Standby
router then assumes role
of forwarding router.
Because new forwarding
router assumes both IP
and MAC address of
virtual router, end stations
see no disruption in
service.
Chapter 2
2007 2010, Cisco Systems, Inc. All rights reserved.

Cisco Public

19

HSRP Operation
HSRP active and standby routers send hello messages to
multicast address 224.0.0.2 UDP port 1985.
Hello messages used to communicated between routers
within HSRP group.
All routers in HSRP group need to be L2-adjacent.
All routers in an HSRP group have specific roles and
interact in specific ways:

Virtual router
Active router
Standby router
Other routers

Chapter 2
2007 2010, Cisco Systems, Inc. All rights reserved.

Cisco Public

20

HSRP MAC Address

Router A assumes the active role and forwards all frames


addressed to the assigned HSRP MAC address of
0000.0c07.acxx, where xx is the HSRP group identifier.
Chapter 2
2007 2010, Cisco Systems, Inc. All rights reserved.

Cisco Public

21

HSRP States
State

Definition

Initial

The beginning state. The initial state indicates that HSRP does not
run. This state is entered via a configuration change or when an
interface first comes up.

Listen

The router knows the virtual IP address, but the router is neither the
active router nor the standby router. It listens for hello messages
from those routers.

Speak

The router sends periodic hello messages and actively participates


in the election of the active or standby router. A router cannot enter
speak state unless the router has the virtual IP address.

Standby

The router is a candidate to become the next active router and


sends periodic hello messages. With the exclusion of transient
conditions, there is, at most, one router in the group in standby
state.

Active

The router currently forwards packets that are sent to the group
virtual MAC address. The router sends periodic hello messages.
With the exclusion of transient conditions, there must be, at the
most, one router in the active state in the group.

Chapter 2
2007 2010, Cisco Systems, Inc. All rights reserved.

Cisco Public

22

HSRP State Transition

Router A starts. As it is the first router for standby Group 1 in the subnet,
it transits through the listen and speak states and then becomes the
active router.
Router B starts after Router A. While Router B is in listen state, Router A
is already assuming the standby and then the active role. As there is
already an existing active router, Router B assumes the standby role.
Chapter 2
2007 2010, Cisco Systems, Inc. All rights reserved.

Cisco Public

23

HSRP Active Router and Spanning Tree Topology

In a redundant spanning-tree topology, some links are blocked. The spanningtree topology has no awareness about the HSRP configuration. There is no
automatic relationship between the HSRP active router election process and the
Spanning Tree Root Bridge election.
When configuring both spanning tree and HSRP (or any other first hop
redundancy protocol), you must make sure that the active router is the same as
the root bridge for the corresponding VLAN. When the root bridge is different
from the HSRP active router, a suboptimal path can result, as illustrated.
Chapter 2
2007 2010, Cisco Systems, Inc. All rights reserved.

Cisco Public

24

Configuring HSRP
Configure HSRP on the interface.
Switch(config-if)#
standby group-number ip ip-address

The group number is optional and indicates the HSRP


group to which this interface belongs.
Specifying a unique group number in the standby
commands enables the creation of multiple HSRP groups.
The default group is 0.
The IP address is that of the virtual router IP address for the
HSRP group.

Chapter 2
2007 2010, Cisco Systems, Inc. All rights reserved.

Cisco Public

25

Configuring HSRP Priority and Preempt


To set the HSRP priority value of a router, enter this command in
interface configuration mode:
standby group-number priority priority-value

The priority value can be from 0 to 255. The default value is 100.
During the election process, the router with the highest priority in an
HSRP group becomes the active router. If a tie occurs, the router with
the highest configured IP address becomes active.
If the routers do not have preempt configured, a router that boots up
significantly faster than the others in the standby group becomes the
active router, regardless of the configured priority. The former active
router can be configured to resume the forwarding router role by
preempting a router with a lower priority.
To enable a router to resume the forwarding router role, enter this
command in interface configuration mode:
standby [group-number] preempt
seconds sync seconds}]

[delay {minimum seconds reload

Chapter 2
2007 2010, Cisco Systems, Inc. All rights reserved.

Cisco Public

26

HSRP Configuration Example


Routers A and B are configured with priorities of 110 and 90,
respectively. The configuration of Router A is displayed.
The preempt keyword ensures that Router A will be the
HSRP active router as long its interface is active.

RouterA(config)# interface vlan 10


RouterA(config-if)# ip address 10.1.1.2 255.255.255.0
RouterA(config-if)# standby 10 ip 10.1.1.1
RouterA(config-if)# standby 10 priority 110
RouterA(config-if)# standby 10 preempt
Chapter 2
2007 2010, Cisco Systems, Inc. All rights reserved.

Cisco Public

27

HSRP Authentication Example


HSRP authentication prevents rogue routers on the network from joining
the HSRP group. HSRP authentication is enabled by configuration of an
authentication string on all member devices of the HSRP group.
The authentication string is a maximum of 8 characters and the default
keyword is cisco.

RouterA(config)# interface vlan 10


RouterA(config-if)# ip address 10.1.1.2 255.255.255.0
RouterA(config-if)# standby 10 ip 10.1.1.1
RouterA(config-if)# standby 10 priority 110
RouterA(config-if)# standby 10 preempt
RouterA(config-if)# standby 10 authentication xyz123
Chapter 2
2007 2010, Cisco Systems, Inc. All rights reserved.

Cisco Public

28

HSRP Timer Considerations and Configuration


Variable

Description

group-number

(Optional) Group number


on the interface to which
the timers apply.
The default is 0.

msec

(Optional) Interval in
milliseconds. Millisecond
timers allow for faster
failover.

hellotime

Hello interval in seconds.


This is an integer from 1
through 255. The
default is 3 seconds.

holdtime

Time, in seconds, before


the active or standby
router is declared to be
down. This is an integer
from 1 through 255. The
default is 10 seconds.

Chapter 2
2007 2010, Cisco Systems, Inc. All rights reserved.

Cisco Public

29

HSRP Timers Configuration Example

RouterA(config)# interface vlan 10


RouterA(config-if)# ip address 10.1.1.2 255.255.255.0
RouterA(config-if)# standby 10 ip 10.1.1.1
RouterA(config-if)# standby 10 priority 110
RouterA(config-if)# standby 10 preempt
RouterA(config-if)# standby 10 authentication xyz123
RouterA(config-if)# standby 10 timers msec 200 msec 750
RouterA(config-if)# standby 10 preempt delay minimum 225

Chapter 2
2007 2010, Cisco Systems, Inc. All rights reserved.

Cisco Public

30

HSRP Versions
HSRP version 1 is the default in IOS and it enables group numbers up to 255.
Because one can have up to 4095 VLANs, one has to reuse the same HSRP group
number on multiple interfaces if needed. This is allowed even though it might cause
some confusion.
HSRPv1 uses the Virtual MAC address of the form 0000.0C07.ACXX (XX = HSRP
group), and the HSRPv1 hello packets are sent to multicast address 224.0.0.2.
HSRP version 2 has been added to IOS since 12.2 46SE or later and it enables
group numbers up to 4095. This enables you to use the VLAN number as the group
number.
With HSRPv2, the MAC address of the virtual router and the multicast address for
the hello messages has been changed. The virtual MAC address is
0000.0C9F.FXXX (XXX=HSRP group), and hello packets are sent to multicast
address 224.0.0.102.
Also, HSRPv2 has a different packet format from HSRPv1. Ensure that the same
version is configured on all routers in a HSRP group. Otherwise hello messages are
not understood. Version 1 is the default.
Use the following command to change the version:
Switch(config-if)# standby <hsrp group number> version 2
Chapter 2
2007 2010, Cisco Systems, Inc. All rights reserved.

Cisco Public

31

HSRP Interface Tracking (1)

Enables priority of standby group router to be automatically


adjusted based on availability of tracked interfaces.
When tracked interface becomes unavailable, HSRP priority
is decreased.
Ensures the router with unavailable interface relinquishes
active router role.
Chapter 2
2007 2010, Cisco Systems, Inc. All rights reserved.

Cisco Public

32

HSRP Interface Tracking (2)


Configure interface tracking.
Switch(config-if)
standby [group-number] track interface-type interfacenumber [interface-priority]
Variable

Description

group-number

(Optional) Indicates the group number on the interface to


which the tracking applies. The default number is 0.

interface-type

Indicates the interface type (combined with the interface


number) that will be tracked.

interface-

Indicates the interface number (combined with the interface


type) that will be tracked.

number
interfacepriority

(Optional) Indicates the amount by which the hot standby


priority for the router is decremented when the interface
becomes disabled. The priority of the router is incremented
by this amount when the interface becomes available. The
default value is 10.

Chapter 2
2007 2010, Cisco Systems, Inc. All rights reserved.

Cisco Public

33

HSRP Interface Tracking (3)

To configure HSRP with interface tracking, follow these steps:


Step 1. Configure the standby group.
Step 2. Configure priority (default 100).
Step 3. Configure preempt on all devices within the HSRP group.
Step 4. Configure the tracked interfaces and decrement (default
decrement 10).
Chapter 2
2007 2010, Cisco Systems, Inc. All rights reserved.

Cisco Public

34

HSRP Interface Tracking (4)

SW4(config)# interface vlan 10


SW4(config-if)# ip address 10.1.1.2 255.255.255.0
SW4(config-if)# standby 10 ip 10.1.1.1
SW4(config-if)# standby 10 priority 110
SW4(config-if)# standby 10 preempt
SW4(config-if)# standby 10 track fastethernet0/23 20
SW4(config-if)# standby 10 track fastethernet0/24
Chapter 2
2007 2010, Cisco Systems, Inc. All rights reserved.

Cisco Public

35

Вам также может понравиться