您的位置:首页 > 其它

Cisco Port-Channel 设置(链路聚合)

2018-01-23 17:18 429 查看
Port-Channel 的在实际工作中的主要作用是将两个或多个端口捆绑成为一个虚拟通道。

interface Port-channel1
description port(1/0/5-6)
switchport trunk encapsulation dot1q
switchport trunk allowed vlan 10
switchport mode trunk
!
interface Port-channel2
description port(1/0/7-8)
switchport trunk encapsulation dot1q
switchport trunk allowed vlan 10
switchport mode trunk
!
interface Port-channel3
description port(1/0/9-10)
switchport trunk encapsulation dot1q
switchport trunk allowed vlan 10
switchport mode trunk
!
interface Port-channel4
description port(1/0/11-12)
shutdown

以上是我在Cisco 3750上做的配置,其中:

description port(1/0/5-6) 是对这个虚拟通道的描述,告知这个虚拟通道使用了端口1/0/ 的5和6端口

switchport trunk encapsulation dot1q 是强制虚拟通道使用dot 1q 来封装数据包

switchport trunk allowed vlan 10 是强制虚拟通道能够通过的VLAN,此例只有vlan10能通过此通道

switchport mode trunk 是强制为 triuk 模式

具体的命令如下:

3750-route#configure terminal

3750-route(config)#interface port-channel 1
3750-route(config-if)#switchport mode trunk
3750-route(config-if)#switchport trunk encapsulation dot1q
3750-route(config-if)#switchport trunk allowed vlan 10
3750-route(config-if)#description xxxxxx

创建 port-channel 1 后,还需要在相应的端口上进行配置

interface GigabitEthernet1/0/5
description Port-channel-1
switchport trunk encapsulation dot1q
switchport mode trunk
channel-group 1 mode on
!
interface GigabitEthernet1/0/6
description Port-channel-1
switchport trunk encapsulation dot1q
switchport mode trunk
channel-group 1 mode on

此处特别要提示的是最后的一条命令

channel-group 1 mode on 是 port-channel 1 可以调用此端口,换句话说:这个端口隶属于 port-channel 1

具体命令如下:

3750-route#configure terminal

3750-route(config)#interface range gigabitEthernet 1/0/5-6
3750-route(config-if)#switchport mode trunk
3750-route(config-if)#switchport trunk encapsulation dot1q
3750-route(config-if)#description xxxxxx
3750-route(config-if)#channel-group 1 mode on
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: