实验目的:

1、掌握L2 Etherchannle的基本配置。

2、理解Etherchannel的协商协议。

实验拓扑:

实验步骤:

1、依据图中拓扑,在SW1和SW2上部署L2 Etherchannel,实现链路捆绑并提供链路带宽,可以通过三种方式部署,如下:

①强制方式:直接绑定,无需任何协商。

②Pagp方式:通过Cisco私有协议Pagp进行协商。

③Lacp方式:通过行业标准协议Lacp进行协商。

2、依据强制方式部署L2 Etherchannel,配置如下:

SW1上

SW1(config)#int range f0/1 - 2

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

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

SW1(config-if-range)#channel-group 1 mode on  

SW1(config-if-range)#exit

SW2上

SW2(config)#int range f0/1 - 2

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

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

SW2(config-if-range)#channel-group 1 mode on

SW2(config-if-range)#exit

此时查看以太通道信息,如下:

SW1#show etherchannel summary

Flags:  D - down        P - 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

        u - unsuitable for bundling

        w - waiting to be aggregated

        d - default port



Number of channel-groups in use: 1

Number of aggregators:           1


Group  Port-channel  Protocol    Ports

------+-------------+-----------+----------------------------------------------


1      Po1(SU)           -      Fa0/1(P) Fa0/2(P)

此时以太通道已经成功建立,查看以太通道物理信息,如下:

SW1#show interfaces port-channel 1

Port-channel1 is up, line protocol is up

  Hardware is EtherChannel, address is cc03.0a28.f000 (bia cc03.0a28.f000)

  MTU 1500 bytes, BW 200000 Kbit, DLY 1000 usec,

     reliability 255/255, txload 1/255, rxload 1/255

  Encapsulation ARPA, loopback not set

  Keepalive set (10 sec)

  Full-duplex, 100Mb/s

  Members in this channel: Fa0/0 Fa0/1

  ARP type: ARPA, ARP Timeout 04:00:00

  Last input 00:00:01, output never, output hang never

  Last clearing of "show interface" counters never

  Input queue: 0/75/0/0 (size/max/drops/flushes); Total output drops: 0

  Queueing strategy: fifo

  Output queue: 0/40 (size/max)

  5 minute input rate 0 bits/sec, 0 packets/sec

  5 minute output rate 0 bits/sec, 0 packets/sec

     0 packets input, 0 bytes, 0 no buffer

     Received 0 broadcasts, 0 runts, 0 giants, 0 throttles

     0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored

     0 input packets with dribble condition detected

     0 packets output, 0 bytes, 0 underruns

     0 output errors, 0 collisions, 1 interface resets

     0 babbles, 0 late collision, 0 deferred

     0 lost carrier, 0 no carrier

     0 output buffer failures, 0 output buffers swapped out

可以看到以太通道的带宽为200M。

3、采用Pagp方式进行协商绑定,配置如下:

SW1上

SW1(config)#int range f0/1 – 2

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

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

SW1(config-if-range)#channel-protocol pagp

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

SW2上

SW2(config)#int range f0/1 – 2

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

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

SW2(config-if-range)#channel-protocol pagp

SW2(config-if-range)#channel-group 1 mode auto

查看以太通道状态,如下:

SW1#show etherchannel summary

Flags:  D - down        P - 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

        u - unsuitable for bundling

        w - waiting to be aggregated

        d - default port



Number of channel-groups in use: 1

Number of aggregators:           1


Group  Port-channel  Protocol    Ports

------+-------------+-----------+----------------------------------------------


1      Po1(SU)           PAgP   Fa0/1(P) Fa0/2(P)

可以看到,通过PagP协议实现了L2 Etherchannel的捆绑,同样也可以采用Lacp实现,此处略过。此实验完成。