当前位置:文档之家› 端口聚合

端口聚合

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

实验目的:掌握链路聚合的配置及原理,理解端口聚合的作用和特点。

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

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

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

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

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

从而增大链路带宽,解决交换网络中因带宽引起的网络瓶颈问题。

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

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

实验步骤:步骤1:switch0的基本配置Switch0>Switch0>enableSwitch0#configure terminalSwitch0(config)#vlan 10Switch0(config-vlan)#name test10Switch0(config-vlan)#exitSwitch0(config)#interface fastethernet 0/5Switch0(config-if)#switchport access vlan 10Switch0(config-if)#endSwitch0#show vlanVLAN Name Status Ports---- -------------------------------- --------- -------------------------------1 default active Fa0/1, Fa0/2, Fa0/3, Fa0/4Fa0/6, Fa0/7, Fa0/8, Fa0/9Fa0/10, Fa0/11, Fa0/12, Fa0/13Fa0/14, Fa0/15, Fa0/16, Fa0/17Fa0/18, Fa0/19, Fa0/20, Fa0/21Fa0/22, Fa0/23, Fa0/2410 test10 active Fa0/5步骤2:switch0上配置聚合端口Switch0(config)#interface port-channel 1Switch0(config-if)#switchport mode trunkSwitch0(config-if)#exitSwitch0(config)#interface range fastethernet 0/1-2Switch0(config-if-range)#channel-group 1 mode onupSwitch0(config-if-range)#endSwitch0#show run //查看端口聚合信息Building configuration...Current configuration : 990 bytes!version 12.1no service password-encryption!hostname Switch0!!!interface FastEthernet0/1channel-group 1 mode on!interface FastEthernet0/2channel-group 1 mode on!interface FastEthernet0/3!interface FastEthernet0/4!interface FastEthernet0/5switchport access vlan 10步骤3.在Switch1的基本配置Switch1>Switch1>enableSwitch1#config terSwitch1(config)#vlan 10Switch1(config-vlan)#name sales Switch1(config-vlan)#exitSwitch1(config)#interface fastethernet 0/5Switch1(config-if)#switchport access vlan 10Switch1(config-if)#endSwitch#show vlan id 10步骤4.在switch1上配置聚合端口Switch1#config terSwitch1(config)#interface port-channel 1Switch1(config-if)#switchport trunkSwitch1(config-if)#switchport mode trunkSwitch1(config-if)#exitSwitch1(config)#interface range fastethernet 0/1-2Switch1(config-if-range)#channel-group 1 mode onupSwitch1(config-if-range)#endSwitch1#show etherchannel步骤5.验证当交换机之间的一条链路断开时,PC1和PC2仍能互相通信. C:\>ping 192.168.10.20Pinging 192.168.10.20 with 32 bytes of data:Reply from 192.168.10.20: bytes=32 time=94ms TTL=128Reply from 192.168.10.20: bytes=32 time=93ms TTL=128Reply from 192.168.10.20: bytes=32 time=94ms TTL=128Reply from 192.168.10.20: bytes=32 time=94ms TTL=1282.核心交换机(三层交换)和二层交换之间的端口聚合2950Switch>enSwitch#conf tEnter configuration commands, one per line. End with CNTL/Z.Switch(config)#int f0/1Switch(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/2Switch(config-if)#channel-group 1 mode on3560Switch(config)#int port-channel 1Switch(config-if)#exitSwitch(config)#ip routing(默认已经启用了路由功能)Switch(config)#int port-channel 1Switch(config-if)#no switchportSwitch(config-if)#ip add 1.1.1.1 255.0.0.0Switch(config-if)#no shutSwitch(config-if)#exitSwitch(config)#int f0/1Switch(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 addSwitch(config-if)#channel-group 1 mode ?active Enable LACP unconditionallyauto Enable PAgP only if a PAgP device is detecteddesirable Enable PAgP unconditionallyon Enable Etherchannel onlypassive Enable LACP only if a LACP device is detectedSwitch(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/2Switch(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 addSwitch(config-if)#no ip addressSwitch(config-if)#channel-group 1 mode onSwitch(config-if)#exitSwitch(config)#int f0/3Switch(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.0Switch(config-if)#no shut端口聚合可使流量在多条物理链路上负载均衡,同时也起到了链路的备份作用。

相关主题