链路聚合是将两个或更多数据信道结合成
个单个的信道,该信道以
个单个的更高 带宽的逻辑链路出现。链路聚合一般用来连接一个或多个带宽需求大的设备,其实质 是将两台设备间的数条物理链路“组合“成逻辑上的一条数据通路,称为一条聚合链路 AP1。该链路在逻辑上是一个整体。
![](https://img-blog.csdnimg.cn/e6fbf5a8f3ba43c5b309323b24ad62b2.png?x-oss-process=image/watermark,type_d3F5LXplbmhlaQ,shadow_50,text_Q1NETiBAd2VpeGluXzUzNDQxNzEz,size_16,color_FFFFFF,t_70,g_se,x_16)
首先对左边的switch2交换机进行配置
Switch#
Switch#config t
Enter configuration commands, one per line. End with CNTL/Z.
Switch(config)#interface range f0/1-2
Switch(config-if-range)#channel-group 1 mode des
Switch(config-if-range)#channel-group 1 mode desirable #给接口加入一个AP,desirable主动发起表白
Switch(config-if-range)#
Creating a port-channel interface Port-channel 1
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/1, changed state to down
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/1, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/2, changed state to down
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/2, changed state to up
Switch(config-if-range)#end
Switch#
%SYS-5-CONFIG_I: Configured from console by console
%LINK-5-CHANGED: Interface Port-channel 1, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface Port-channel 1, changed state to up
配置switch3
Switch>
Switch>en
Switch#config t
Enter configuration commands, one per line. End with CNTL/Z.
Switch(config)#interface range f0/1-2
Switch(config-if-range)#channel-group 1 mode auto #auto被动接受,一个发起一个接受,建立聚合
Switch(config-if-range)#
Creating a port-channel interface Port-channel 1
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/1, changed state to down
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/1, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/2, changed state to down
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/2, changed state to up
%LINK-5-CHANGED: Interface Port-channel 1, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface Port-channel 1, changed state to up
Switch(config-if-range)#
Switch(config-if-range)#end
Switch#
%SYS-5-CONFIG_I: Configured from console by console
Switch#