Configurar EtherChannel en Switch Capa 2

Vamos a ver cómo configurar EtherChannel en un switch Capa 2 de Cisco, también conocido como LAG (link aggregation group).

Nota: En este capítulo veremos la configuración y funcionamiento de EtherChannel en la Capa 2, no en la Capa 3 (esto lo veremos en el capítulo 17).

Qués es EtherChannel y para qué Sirve

Dos switches vecinos pueden tener múltiples enlaces en paralelo entre ellos, como un único enlace lógico, llamado EtherChannel. Sin EtherChannel un switch maneja cada enlace por separado.

Sin EtherChannel, con enlaces en paralelo entre los switches, STP/RSTP podría bloquear todos los enlaces excepto uno, sin embargo con EtherChannel, el switch puede usar todos los enlaces balanceando el tráfico a través de los enlaces.

Cómo Configurar EtherChannel en un Switch Capa 2

Configuración Manual de EtherChannel

Paso 1. Usar el comando channel-group number mode on para agregar la interfaz física al channel.

Paso 2. Usar el mismo número en todas las interfaces físicas del switch. El número usado (channel-group number) puede diferir del usado en en los switches vecinos.

Cómo Configurar EtherChannel en un Switch Capa 2
Cómo Configurar EtherChannel en un Switch Capa 2
SW1# configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
SW1(config)# interface fa 0/14
SW1(config-if)# channel-group 1 mode on
SW1(config)# interface fa 0/15
SW1(config-if)# channel-group 1 mode on
SW1(config-if)# ^Z
SW1# show spanning-tree vlan 3

VLAN0003
 Spanning tree enabled protocol ieee
 Root ID    Priority    28675
 	    Address     0019.e859.5380
            Cost        12
            Port        72 (Port-channel1)
            Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
 
 Bridge ID Priority     28675 (priority 28672 sys-id-ext 3)
            Address     0019.e86a.6f80
            Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
            Aging Time  300

Interface 	    Role Sts Cost      Prio.Nbr Type
------------------- ---- --- --------- -------- --------------------------------
Po1 		    Root FWD 12        128.64   P2p Peer(STP)

SW1# show etherchannel 1 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 	N - not in use, no aggregation
	f - failed to allocate aggregator
	
	M - not in use, minimum links not met
 	m - not in use, port not aggregated due to minimum links not met
	u - unsuitable for bundling
	w - waiting to be aggregated
	d - default port
	
	A - formed by Auto LAG

Number of channel-groups in use: 1
Number of aggregators: 1
Group  Port-channel  Protocol    Ports
------+-------------+-----------+-----------------------------------------------
1      Po1(SU)          -        Fa0/14(P) Fa0/15(P)

Configuración Dinámica de EtherChannel

Para configurar dinámicamente un EtherChannel es necesario usar un protocolo. Cisco soporta dos protocolos para cumplir esta función; PAgP (Port Aggregation Protocol) y el estándar IEEE LACP (Link Aggregation Control Protocol), basado en el estándar 802.3ad.

Existen diferencias entre ambos protocolos.

PAgP VS LACP

LACP soporta más enlaces en un channel -16- comparado con PAgP que soporta un máximo de 8.

Con LACP, sólo 8 pueden estar activos al mismo tiempo, mientras que los otros quedan en estado de espera para ser usados en caso que un enlace activo falle.

Ambos protocolos se configuran usando un channel-group, pero cada protocolo usa una manera de iniciar una negociación y de esperando que el otro comience la negociación.

El siguiente ejemplo muestra el modo de configuración según el protocolo:

PAgP VS LACP
PAgP VS LACP – Configuración correcta para cada protocolo

Ejemplo de Verificación:

SW1# show etherchannel 1 port-channel
 		 Port-channels in the group:
 		 ---------------------------

Port-channel: Po1
------------
Age of the Port-channel = 0d:00h:04m:04s
Logical slot/port 	= 16/1 	Number of ports = 2
GC 			= 0x00020001 HotStandBy port = null
Port state 		= Port-channel Ag-Inuse
Protocol 		= PAgP
Port security 		= Disabled
Load share deferral 	= Disabled

Ports in the Port-channel:

Index   Load   Port   EC state          No of bits
------+------+------+------------------+-----------
 0 	00     Gi0/1 Desirable-Sl 	0
 0 	00     Gi0/2 Desirable-Sl 	0

Time since last port bundled: 0d:00h:03m:57s Gi0/2

Configuración Física de Interfaces y EtherChannel

Aunque todo esté configurado correctamente, otras configuraciones del switch podría evitar que un puerto sea parte de un EtherChannel. A continuación explico las razones.

Primero, antes de usar un puerto físico en un EtherChannel, el switch compara la configuración del nuevo puerto físico con los puertos existentes en el channel.

La configuración de esa nueva interfaz física debe ser la misma que la configuración de los puertos existentes; de lo contrario, el conmutador no agrega el nuevo enlace a la lista de interfaces aprobadas y en funcionamiento en el canal.

Es decir, la interfaz física permanece configurada como parte del PortChannel, pero no se usa como parte del channel, a menudo se coloca en un estado no operativo.

La lista de elementos que verifica el switch incluye lo siguiente:

  • Velocidad
  • Duplex
  • Acceso operacional o estado del trunking (todos deben ser puertos -access- de acceso, o todos deben ser puertos -trunks- troncales)
  • Si es un puerto de acceso (switchport mode access), verifica la VLAN de acceso
  • Si es un puerto trunk, verifica la lista de VLAN permitida (comando switchport trunk allowed)
  • Si es un puerto trunk, verifica la VLAN nativa
  • Configuraciones de STP en la interfaz

Adicionalmente los switches verifican las configuraciones del switch vecino.

Para esto los switches usan PAgP o LACP ó Cisco Discovery Protocol (CDP) si están usando una configuración EtherChannel manual.

Cuando hacen esta verificación con el vecino, todas las configuraciones deben ser iguales, a excepción de STP.

Ejemplo de fallo

*Mar 1 23:18:56.132: %PM-4-ERR_DISABLE: channel-misconfig (STP) error detected on
 Po1, putting Gi0/1 in err-disable state
*Mar 1 23:18:56.132: %PM-4-ERR_DISABLE: channel-misconfig (STP) error detected on
 Po1, putting Gi0/2 in err-disable state
*Mar 1 23:18:56.132: %PM-4-ERR_DISABLE: channel-misconfig (STP) error detected on Po1,
putting Po1 in err-disable state
*Mar 1 23:18:58.120: %LINK-3-UPDOWN: Interface GigabitEthernet0/1, changed state to
 down
*Mar 1 23:18:58.137: %LINK-3-UPDOWN: Interface Port-channel1, changed state to down
*Mar 1 23:18:58.137: %LINK-3-UPDOWN: Interface GigabitEthernet0/2, changed state to
 down

SW1# 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 	N - not in use, no aggregation
 	f - failed to allocate aggregator
	
	M - not in use, minimum links not met
 	m - not in use, port not aggregated due to minimum links not met
 	u - unsuitable for bundling
 	w - waiting to be aggregated
	d - default port
 	
	A - formed by Auto LAG

Number of channel-groups in use: 1
Number of aggregators: 1

Group  Port-channel  Protocol    Ports
------+-------------+-----------+-----------------------------------------------
1      Po1(SD)          -        Gi0/1(D) Gi0/2(D)

Distribución de Carga en EtherChannel

Puedes configurar la distribución de carga de un EtherChannel usando el comando port-channel load-balance method.

Comando de configuración (method)Lógica que usa…Capa
src-macDirección MAC de origen2
dst-macDirección MAC de destino2
src-dst-macAmbos, origen y destino de la dirección MAC2
src-ipDirección IP de origen3
dst-ipDirección IP de destino3
src-dst-ipAmbos, origen y destino de la dirección IP3
src-portPuerto origen de TCP o UDP4
dst-portPuerto destino de TCP o UDP4
src-dst-portAmbos, origen y destino de TCP o UDP4
Métodos de distribución de carga en EtherChannel
Valora este artículo

Libro Oficial Cert Guide Library

Libro CCNA

Comprá el libro digital y oficial de Cisco CCNA 200-301 Library

Deja un comentario