天天看点

配置Etherchannel二层通道

【实验拓扑】

配置Etherchannel二层通道

【实验要求】

     一般是把核心交换机之间的线路捆绑成Etherchannel(以太通道),防止spanning-tree的情况,解决核心交换机之间的瓶颈。两交换之间最多支持捆绑8条线路成以太通道。既可以配成2层的,也可以配置3层的以太通道。

以下在模拟器中只能配置2层的以太通道

【实验配置】

首先通过show cdp neighbor来查看交换机之间通过哪些接口连接

sw1(config)#do sh cdp neighbor

Capability Codes: R - Router, T -

Trans

Bridge

, B -

Source

Route

                  S - Switch, H - Host, I - IGMP, r - Repeater

Device ID        Local Intrfce     Holdtme    Capability  Platform  Port ID

Router           Fas 0/15           149        R S I      3640      Fas 0/15

Router           Fas 0/14           149        R S I      3640      Fas 0/14

Sw1:      

sw1(config)#interface range f0/14 -15

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

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

sw1(config-if-range)#

*Mar  1 00:05:35.095: %DTP-5-TRUNKPORTON: Port Fa0/14-15 has become dot1q trunk

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

Creating a port-channel interface Port-channel1

*Mar  1 00:05:46.931: %EC-5-BUNDLE: Interface Fa0/14 joined port-channel Po1

*Mar  1 00:05:47.183: %EC-5-BUNDLE: Interface Fa0/15 joined port-channel Po1

*Mar  1 00:05:49.783: %LINEPROTO-5-UPDOWN: Line protocol on Interface Port-channel1, changed state to up

Sw2:

sw2(config)#int range f0/14 -15

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

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

sw2(config-if-range)#

*Mar  1 00:06:42.503: %DTP-5-TRUNKPORTON: Port Fa0/14-15 has become dot1q trunk

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

*Mar  1 00:06:50.931: %EC-5-BUNDLE: Interface Fa0/14 joined port-channel Po1

*Mar  1 00:06:51.199: %EC-5-BUNDLE: Interface Fa0/15 joined port-channel Po1

*Mar  1 00:06:53.675: %LINEPROTO-5-UPDOWN: Line protocol on Interface Port-channel1, changed state to up

我们通过show etherchannel summary来验证

sw1(config-if-range)#do show etherchannel summary

Flags:  D - down        P - in port-channel

        I - stand-alone s - suspended

        R - Layer3      S - Layer2

        U - in use

Group Port-channel  Ports

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

1     Po1(SU)     Fa0/14(P)  Fa0/15(P) 

以及通过show etherchannel 1 detail 查看具体的信息

sw1(config-if)#do show etherchannel 1 detail

Group state = L2

Ports: 2   Maxports = 8

Port-channels: 1 Max Port-channels = 1

                Ports in the group:

                -------------------

Port: Fa0/14

------------

Port state    = Up Mstr In-Bndl

Channel group = 1           Mode = On/FEC     Gcchange = 0

Port-channel  = Po1         GC   = 0x00010001    Pseudo port-channel = Po1

Port index    = 0

Age of the port in the current state: 00d:00h:05m:50s

Port: Fa0/15

Port-channel  = Po1         GC   = 0x00010001    Pseudo port-channel = Po1

Port index    = 1

Age of the port in the current state: 00d:00h:05m:49s

                Port-channels in the group:

                ----------------------

Port-channel: Po1

Age of the Port-channel   = 00d:00h:05m:52s

Logical slot/port   = 8/0           Number of ports = 2

GC                  = 0x00010001      HotStandBy port = null

Port state          = Port-channel Ag-Inuse

Ports in the Port-channel:

Index   Port   EC state

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

  0     Fa0/14   on        

  1     Fa0/15   on        

Time since last port bundled:    00d:00h:05m:52s    Fa0/15

继续阅读