一、 实验目的
1、了解链路聚合技术的使用场合;
(资料图)
2、熟练掌握链路聚合技术的配置。
二、 应用环境
两个实验室分别使用一台交换机提供20 多个信息点,两个实验室的互通通过一根级联
网线。每个实验室的信息点都是百兆到桌面。两个实验室之间的带宽也是100M,如果实验
室之间需要大量传输数据,就会明显感觉带宽资源紧张。当楼层之间大量用户都希望以100M
传输数据的时候,楼层间的链路就呈现出了独木桥的状态,必然造成网络传输效率下降等后
果。
解决这个问题的办法就是提高楼层主交换机之间的连接带宽,实现的办法可以是采用千
兆端口替换原来的100M 端口进行互联,但这样无疑会增加组网的成本,需要更新端口模块,
并且线缆也需要作进一步的升级。另一种相对经济的升级办法就是链路聚合技术。
顾名思义,链路聚合,是将几个链路作聚合处理,这几个链路必须是同时连接两个相同
的设备的,这样,当作了链路聚合之后就可以实现几个链路相加的带宽了。比如,我们可以
将4 个100M 链路使用链路聚合作成一个逻辑链路,这样在全双工条件下就可以达到800M
的带宽,即将近1000M 的带宽。这种方式比较经济,实现也相对容易。
三、 实验设备
1、DCS-3926S 交换机2 台
2、PC 机2 台
3、Console 线1-2 根
4、直通网线 4-8 根
四、 实验拓扑
五、 实验要求
如果链路聚合成功,则PC1 可以ping 通PC2。
六、 实验步骤
第一步:正确连接网线,交换机全部恢复出厂设置,做初始配置,避免广播风暴出现
交换机A:
Switch>enable
Switch#config t
Switch(config)#hostname SwitchA
SwitchA(config)#interface vlan 1
SwitchA(config-if)#ip address 192.168.1.11 255.255.255.0
SwitchA(config-if)#no shutdown
SwitchA(config-if)#exit
SwitchA(config)#spanning-tree vlan 1
SwitchA#write
Building configuration...
[OK]
SwitchA#
交换机B:
Switch>enable
Switch#config t
Switch(config)#hostname SwitchB
SwitchB(config)#interface vlan 1
SwitchB(config-if)#ip address 192.168.1.12 255.255.255.0
SwitchB(config-if)#no shutdown
SwitchB(config-if)#exit
SwitchB(config)#spanning-tree vlan 1
SwitchB(config)#exit
SwitchB#write
Building configuration...
[OK]
SwitchB#
第二步:创建port-channel
交换机A:
SwitchA(config)#interface port-channel 1 //创建链路组:port-channel 1
SwitchA(config-if)#exit
SwitchA#show etherchannel port-channel //查看已创建的链路组
交换机B:
SwitchB(config)#interface port-channel 1 //创建链路组:port-channel 1
SwitchB(config-if)#exit
SwitchB#show etherchannel port-channel //查看已创建的链路组
第三步:手工生成链路聚合组
交换机A:
SwitchA(config)#interface range f0/22 -f0/24 //进入F0/22-23-24号端口范围
SwitchA(config-if-range)#channel-group 1 mode on //手动生成链路组
SwitchA(config-if-range)#exit
SwitchA(config)#exit
SwitchA#write
Building configuration...
[OK]
SwitchA#
交换机B:
SwitchB(config)#interface range f0/22 -f0/24 //进入F0/22-23-24号端口范围
SwitchB(config-if-range)#channel-group 1 mode on //手动生成链路组
SwitchB(config-if-range)#exit
SwitchB(config)#exit
SwitchB#write
Building configuration...
[OK]
SwitchB#
验证配置:
交换机A:
SwitchA#show interface etherchannel
FastEthernet0/22:
Port state = 1
Channel group = 1 Mode = On Gcchange = -
Port-channel = Po1 GC = - Pseudo port-channel = Po1
Port index = 0 Load = 0x0 Protocol = -
Age of the port in the current state: 00d:01h:03m:51s
FastEthernet0/23:
Port state = 1
Channel group = 1 Mode = On Gcchange = -
Port-channel = Po1 GC = - Pseudo port-channel = Po1
Port index = 0 Load = 0x0 Protocol = -
Age of the port in the current state: 00d:01h:03m:51s
FastEthernet0/24:
Port state = 1
Channel group = 1 Mode = On Gcchange = -
Port-channel = Po1 GC = - Pseudo port-channel = Po1
Port index = 0 Load = 0x0 Protocol = -
Age of the port in the current state: 00d:01h:03m:51s
----
Port-channel1:Port-channel1
Age of the Port-channel = 00d:01h:03m:51s
Logical slot/port = 2/1 Number of ports = 3
GC = 0x00000000 HotStandBy port = null
Port state =
Protocol = 3
Port Security = Disabled
Ports in the Port-channel:
Index Load Port EC state No of bits
------+------+------+------------------+-----------
0 00 Fa0/22 On 0
0 00 Fa0/23 On 0
0 00 Fa0/24 On 0
Time since last port bundled: 00d:01h:03m:51s Fa0/24
SwitchA#
交换机B:
SwitchB#show interface etherchannel
FastEthernet0/22:
Port state = 1
Channel group = 1 Mode = On Gcchange = -
Port-channel = Po1 GC = - Pseudo port-channel = Po1
Port index = 0 Load = 0x0 Protocol = -
Age of the port in the current state: 00d:01h:04m:52s
FastEthernet0/23:
Port state = 1
Channel group = 1 Mode = On Gcchange = -
Port-channel = Po1 GC = - Pseudo port-channel = Po1
Port index = 0 Load = 0x0 Protocol = -
Age of the port in the current state: 00d:01h:04m:52s
FastEthernet0/24:
Port state = 1
Channel group = 1 Mode = On Gcchange = -
Port-channel = Po1 GC = - Pseudo port-channel = Po1
Port index = 0 Load = 0x0 Protocol = -
Age of the port in the current state: 00d:01h:04m:52s
----
Port-channel1:Port-channel1
Age of the Port-channel = 00d:01h:04m:52s
Logical slot/port = 2/1 Number of ports = 3
GC = 0x00000000 HotStandBy port = null
Port state =
Protocol = 3
Port Security = Disabled
Ports in the Port-channel:
Index Load Port EC state No of bits
------+------+------+------------------+-----------
0 00 Fa0/22 On 0
0 00 Fa0/23 On 0
0 00 Fa0/24 On 0
Time since last port bundled: 00d:01h:04m:52s Fa0/24
SwitchB#
第四步:使用ping命令验证
使用PC1 ping PC2
使用PC1 ping PC2
注意事项和排错
1、为使Port Channel正常工作,Port Channel的成员端口必须具备以下相同的属性:
a) 端口均为全双工模式;
b) 端口速率相同;
c) 端口的类型必须一样,比如同为以太口或同为光纤口;
d) 端口同为Access端口并且属于同一个VLAN或同为Trunk端口;
e) 如果端口为Trunk端口,则其Allowed VLAN和Native VLAN属性也应该相同。