端口聚合——精选推荐

合集下载
  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。

端⼝聚合
实训六端⼝聚合
实验名称:端⼝聚合。

实验⽬的:掌握链路聚合的配置及原理,理解端⼝聚合的作⽤和特点。

技术原理:端⼝聚合(Aggregate-port)⼜称链路聚合,是指两台交换机之间在物理上将多个端⼝连接起来,将多条链路聚合成⼀条逻辑链路,形成⼀个拥有较⼤宽带的端⼝,从⽽形成⼀条⼲路,增⼤链路带宽,可以实现均衡负载,并提供冗余链路。

实现功能:实现链路备份聚合,增加交换机之间的传输带宽,可在冗余链路上实现均衡负载。

实验设备:cisco2960⼀台,cisco2950⼀台,PC四台,直连线2根,交叉线2根,配置线2根。

实验拓朴:
1.端⼝聚合提供冗余备份链路
背景描述:
某企业采⽤两台交换机组成⼀个局域⽹,由于很多数据流量是跨交换机进⾏转发的,因此需要提⾼交换机之间的传输带宽,并实现链路冗余备份,为此⽹络管理员在两台交换机之间采⽤两根⽹线互连,并将相应的两个端⼝聚合为⼀个逻辑端⼝,现在要在交换机上做适当配置来实现这⼀⽬标。

技术原理:
端⼝聚合(Aggregate-port)⼜称链路聚合,是指两台交换机之间在物理上将多个端⼝连接起来,将多条链路合成⼀条逻辑链路。

从⽽增⼤链路带宽,解决交换⽹络中因带宽引起的⽹络瓶颈问题。

多条物理链路之间能够相互冗余备份,其中任意⼀条链路断开,不会影响其他链路的正常转发数据。

实验注意事项:
按照拓扑图连接⽹络时,两台交换机都配置完端⼝聚合后,再将两台交换机连接起来,如果先连线再配置会造成⼴播风暴,影响交换机的正常⼯作。

实验步骤:
步骤1:switch0的基本配置
Switch0>
Switch0>enable
Switch0#configure terminal
Switch0(config)#vlan 10
Switch0(config-vlan)#name test10
Switch0(config-vlan)#exit
Switch0(config)#interface fastethernet 0/5
Switch0(config-if)#switchport access vlan 10
Switch0(config-if)#end
Switch0#show vlan
VLAN Name Status Ports
---- -------------------------------- --------- -------------------------------1 default active Fa0/1, Fa0/2, Fa0/3, Fa0/4 Fa0/6, Fa0/7, Fa0/8, Fa0/9
Fa0/10, Fa0/11, Fa0/12, Fa0/13
Fa0/14, Fa0/15, Fa0/16, Fa0/17
Fa0/18, Fa0/19, Fa0/20, Fa0/21
Fa0/22, Fa0/23, Fa0/24
10 test10 active Fa0/5
步骤2:switch0上配置聚合端⼝
Switch0(config)#interface port-channel 1
Switch0(config-if)#switchport mode trunk
Switch0(config-if)#exit
Switch0(config)#interface range fastethernet 0/1-2
Switch0(config-if-range)#channel-group 1 mode on
upSwitch0(config-if-range)#end
Switch0#show run //查看端⼝聚合信息Building configuration...
Current configuration : 990 bytes
!
version 12.1
no service password-encryption
!
hostname Switch0
!
!
!
interface FastEthernet0/1
channel-group 1 mode on
!
interface FastEthernet0/2
channel-group 1 mode on
!
interface FastEthernet0/3
!
interface FastEthernet0/4
!
interface FastEthernet0/5
switchport access vlan 10
步骤3.在Switch1的基本配置Switch1>
Switch1>enable
Switch1#config ter
Switch1(config)#vlan 10
Switch1(config-vlan)#name sales Switch1(config-vlan)#exit
Switch1(config)#interface fastethernet 0/5
Switch1(config-if)#switchport access vlan 10
Switch1(config-if)#end
Switch#show vlan id 10
步骤4.在switch1上配置聚合端⼝
Switch1#config ter
Switch1(config)#interface port-channel 1
Switch1(config-if)#switchport trunk
Switch1(config-if)#switchport mode trunk
Switch1(config-if)#exit
Switch1(config)#interface range fastethernet 0/1-2
Switch1(config-if-range)#channel-group 1 mode on
upSwitch1(config-if-range)#end
Switch1#show etherchannel
步骤5.验证当交换机之间的⼀条链路断开时,PC1和PC2仍能互相通信. C:\>ping 192.168.10.20 Pinging 192.168.10.20 with 32 bytes of data:
Reply from 192.168.10.20: bytes=32 time=94ms TTL=128
Reply from 192.168.10.20: bytes=32 time=93ms TTL=128
Reply from 192.168.10.20: bytes=32 time=94ms TTL=128
Reply from 192.168.10.20: bytes=32 time=94ms TTL=128
2.核⼼交换机(三层交换)和⼆层交换之间的端⼝聚合
2950
Switch>en
Switch#conf t
Enter configuration commands, one per line. End with CNTL/Z.
Switch(config)#int f0/1
Switch(config-if)#channel-group 1 mode on
%LINK-5-CHANGED: Interface Port-channel 1, changed state to up %LINEPROTO-5-UPDOWN: Line protocol on Interface Port-channel 1, changed state to upSwitch(config-if)#int f0/2
Switch(config-if)#channel-group 1 mode on
3560
Switch(config)#int port-channel 1
Switch(config-if)#exit
Switch(config)#ip routing(默认已经启⽤了路由功能)
Switch(config)#int port-channel 1
Switch(config-if)#no switchport
Switch(config-if)#ip add 1.1.1.1 255.0.0.0
Switch(config-if)#no shut
Switch(config-if)#exit
Switch(config)#int f0/1
Switch(config-if)#no switchport
%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 upSwitch(config-if)#
Switch(config-if)#no ip add
Switch(config-if)#channel-group 1 mode ?
active Enable LACP unconditionally
auto Enable PAgP only if a PAgP device is detected
desirable Enable PAgP unconditionally
on Enable Etherchannel only
passive Enable LACP only if a LACP device is detected
Switch(config-if)#channel-group 1 mode on
%LINK-5-CHANGED: Interface Port-channel 1, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface Port-channel 1, changed state to upSwitch(config-if)#
Switch(config-if)#int f0/2
Switch(config-if)#no switchport
%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 upSwitch(config-if)#no ip add Switch(config-if)#no ip address
Switch(config-if)#channel-group 1 mode on
Switch(config-if)#exit
Switch(config)#int f0/3
Switch(config-if)#no switchport
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/3, changed state to down
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/3, changed state to upSwitch(config-if)#ip add 2.2.2.1 255.0.0.0
Switch(config-if)#no shut
端⼝聚合可使流量在多条物理链路上负载均衡,同时也起到了链路的备份作⽤。

但是在某些设备⾥,应注意聚合链路两端接⼝的速率,⼯作模式,例如在快以中,可将各个端⼝设置为speed 100,duplex full。

相关文档
最新文档