中级会员
  
- UID
- 41
- 威望
- 56
- 贡献
- 0
- 在线时间
- 2 小时
- 注册时间
- 2014-2-26
|
cisco思科交换机链路聚合
cisco思科交换机链路聚合
一、 实验目的
1、 了解链路聚合技术的使用场合;
2、 熟练掌握链路聚合技术的配置。
二、 应用环境
两个实验室分别使用一台交换机提供 20 多个信息点,两个实验室的互通通过一根级联 网线。每个实验室的信息点都是百兆到桌面。两个实验室之间的带宽也是 100M,如果实验 室之间需要大量传输数据,就会明显感觉带宽资源紧张。当楼层之间大量用户都希望以 100M 传输数据的时候,楼层间的链路就呈现出了独木桥的状态,必然造成网络传输效率下降等后 果。
解决这个问题的办法就是提高楼层主交换机之间的连接带宽,实现的办法可以是采用千
兆端口替换原来的 100M 端口进行互联,但这样无疑会增加组网的成本,需要更新端口模块, 并且线缆也需要作进一步的升级。另一种相对经济的升级办法就是链路聚合技术。
顾名思义,链路聚合,是将几个链路作聚合处理,这几个链路必须是同时连接两个相同 的设备的,这样,当作了链路聚合之后就可以实现几个链路相加的带宽了。比如,我们可以 将 4 个 100M 链路使用链路聚合作成一个逻辑链路,这样在全双工条件下就可以达到 800M 的带宽,即将近 1000M 的带宽。这种方式比较经济,实现也相对容易。
三、 实验设备
1、 DCS-3926S 交换机 2 台
2、 PC 机 2 台
3、 Console 线 1-2 根
4、 直通网线 4-8 根
四、 实验拓扑
五、 实验要求
设备
| IP
| Mask
| 端口
| 交换机 A
| 192.168.1.11
| 255.255.255.0
| 0/0/1-2 trunking
| 交换机 B
| 192.168.1.12
| 255.255.255.0
| 0/0/3-4 trunking
| PC1
| 192.168.1.101
| 255.255.255.0
| 交换机 A0/0/23
| PC2
| 192.168.1.102
| 255.255.255.0
| 交换机 B0/0/24
| 如果链路聚合成功,则 PC1 可以 ping 通 PC2。
六、 实验步骤
第一步:正确连接网线,交换机全部恢复出厂设置,做初始配置,避免广播风暴出现
交换机A:
switch#config
switch(Config)#hostname switchA
switchA(Config)#interface vlan 1
switchA(Config-If-Vlan1)#ip address 192.168.1.11 255.255.255.0
switchA(Config-If-Vlan1)#no shutdown
switchA(Config-If-Vlan1)#exit
switchA(Config)#spanning-tree
MSTP is starting now, please wait...........
MSTP is enabled successfully.
switchA(Config)#
交换机B:
switch#config
switch(Config)#hostname switchB
switchB(Config)#interface vlan 1
switchB(Config-If-Vlan1)#ip address 192.168.1.12 255.255.255.0
switchB(Config-If-Vlan1)#no shutdown
switchB(Config-If-Vlan1)#exit
switchB(Config)#spanning-tree
MSTP is starting now, please wait...........
MSTP is enabled successfully.
switchB(Config)#
第二步:创建port group
交换机A:
switchA(Config)#port-group 1
switchA(Config)#
验证配置:
switchA#show port-group detail
Sorted by the ports in the group 1:
--------------------------------------------
switchA#show port-group brief
Port-group number : 1
Number of ports in port-group : 0 Maxports in port-channel = 8
Number of port-channels : 0 Max port-channels : 1
switchA#
交换机B
switchB(Config)#port-group 2
switchB(Config)#
第三步:手工生成链路聚合组(第三、四步任选其一操作)
交换机A:
switchA(Config)#interface ethernet 0/0/1-2
switchA(Config-Port-Range)#port-group 1 mode on
switchA(Config-Port-Range)#exit
switchA(Config)#interface port-channel 1
switchA(Config-If-Port-Channel1)#
验证配置:
switchA#show vlan
VLAN | Name | Type | Media | Ports | | ---- ------------ ---------- --------- ------------------- | 1 | default | Static | ENET | Ethernet0/0/3 | Ethernet0/0/4 | | Ethernet0/0/5 | Ethernet0/0/6 | | Ethernet0/0/7 | Ethernet0/0/8 | | Ethernet0/0/9 | Ethernet0/0/10 | | Ethernet0/0/11 | Ethernet0/0/12 | | Ethernet0/0/13 | Ethernet0/0/14 | | Ethernet0/0/15 | Ethernet0/0/16 | | Ethernet0/0/17 | Ethernet0/0/18 | | Ethernet0/0/19 | Ethernet0/0/20 | | Ethernet0/0/21 | Ethernet0/0/22 | | Ethernet0/0/23 | Ethernet0/0/24 | | Port-Channel1 | | switchA# !port-channel1已经存在
交换机B:
switchB(Config)#int e 0/0/3-4
switchB(Config-Port-Range)#port-group 2 mode on
switchB(Config-Port-Range)#exit
switchB(Config)#interface port-channel 2
switchB(Config-If-Port-Channel2)#
验证配置:
switchB#show port-group brief
Port-group number : 2
Number of ports in port-group : 2 Maxports in port-channel = 8
Number of port-channels : 1 Max port-channels : 1
switchB#
第四步: LACP动态生成链路聚合组(第三、四步任选其一操作)
switchA(Config)#interface ethernet 0/0/1-2
switchA(Conifg-Port-Range)#port-group 1 mode active
switchA(Config)#interface port-channel 1
switchA(Config-If-Port-Channel1)#
验证配置:
switchA#show vlan
VLAN | Name | Type | Media | Ports | | ---- ------------ ---------- --------- ------------------- | 1 | default | Static | ENET | Ethernet0/0/3 | Ethernet0/0/4 | | Ethernet0/0/5 | Ethernet0/0/6 | | Ethernet0/0/7 | Ethernet0/0/8 | | Ethernet0/0/9 | Ethernet0/0/10 | | Ethernet0/0/11 | Ethernet0/0/12 | | Ethernet0/0/13 | Ethernet0/0/14 | | Ethernet0/0/15 | Ethernet0/0/16 | | Ethernet0/0/17 | Ethernet0/0/18 | | Ethernet0/0/19 | Ethernet0/0/20 | | Ethernet0/0/21 | Ethernet0/0/22 | | Ethernet0/0/23 | Ethernet0/0/24 | | Port-Channel1 | |
switchA# !port-channel1已经存在
交换机B:
switchB(Config)#interface ethernet 0/0/3-4
switchB(Conifg-Port-Range)#port-group 2 mode passive
switchB(Config)#interface port-channel 2
switchB(Config-If-Port-Channel2)#
验证配置:
switchB#show port-group brief
Port-group number : 2
Number of ports in port-group : 2 Maxports in port-channel = 8
Number of port-channels : 1 Max port-channels : 1
switchB#
第九步:使用ping命令验证交换机A
| 交换机B
| 结果
| 原因
| 0/0/1
0/0/2
| 0/0/3
0/0/4
| 通
| 链路聚合组连接正确
| 0/0/1
0/0/2
| 0/0/3
| 通
| 拔掉交换机B端口4的网线,仍然可
以通(需要一点时间),此时用show
| | | | vlan 看看结果,port-channel消
失。只有一个端口连接的时候,没 有 必 要 再 维 持 一 个 port-channel 了。
| 0/0/1
0/0/2
| 0/0/5
0/0/6
| 通
| 等候一小段时间后,仍然是通的。
用show vlan看结果。此时把两台交 换机的spanning-tree功能disable 掉,这时候使用第三步和第四步的 结果会不同。采用第四步的,将会 形成环路。
|
七、 注意事项和排错
1、 为使Port Channel正常工作,Port Channel的成员端口必须具备以下相同的属性:
a) 端口均为全双工模式;
b) 端口速率相同;
c) 端口的类型必须一样,比如同为以太口或同为光纤口;
d) 端口同为Access端口并且属于同一个VLAN或同为Trunk端口;
e) 如果端口为Trunk端口,则其Allowed VLAN和Native VLAN属性也应该相同。
2、 支持任意两个交换机物理端口的汇聚,最大组数为6个,组内最多的端口数为8个。
3、 一些命令不能在port-channel上的端口使用,包括:arp,bandwidth,ip,ip-forward
等;
4、 在使用强制生成端口聚合组时,由于汇聚是手工配置触发的,如果由于端口的VLAN 信息不一致导致汇聚失败的话,汇聚组一直会停留在没有汇聚的状态,必须通过往 该group增加和删除端口来触发端口再次汇聚,如果VLAN信息还是不一致仍然不能 汇聚成功。直到VLAN信息都一致并且有增加和删除端口触发汇聚的情况下端口才 能汇聚成功;
5、 检查对端交换机的对应端口是否配置端口聚合组,且要查看配置方式是否相同,如
果本端是手工方式则对端也应该配置成手工方式,如果本端是LACP动态生成则对 端也应该是LACP动态生成,否则端口聚合组不能正常工作;还有一点要注意的是 如果两端收发的都是LACP协议,至少有一端是ACTIVE的,否则两端都不会发起 LACP数据报;
6、 port-channel一旦形成之后,所有对于端口的设置只能在port-channel端口上进行;
7、 LACP必须和Security和802.1X的端口互斥,如果端口已经配置上述两种协议,就不 允许被起用LACP; |
|
|
|