交换机 Port-Channel(端口汇聚)的 配置

Port-Channel 是配置层面上的一个物理端口组,配置到port group里面的物理端口才可以参加链路汇聚,并成为port channel里的某个成员端口。在逻辑上,port group 并不是一个端口,而是一个端口序列。加入port group 中的物理端口满足某种条件时进行端口汇聚,形成一个port channel,这个port channel 具备了逻辑端口的属性,才真正成为一个独立的逻辑端口。端口汇聚是一种逻辑上的抽象过程,将一组具备相同属性的端口,抽象成一个逻辑端口。Port-Channel 是一组物理端口的集合体,在逻辑上被当作一个物理端口。

Port-Channel 功能主要适合于以下方面具体应用:

  1.  Port-Channel 功能用于服务器和交换机之间相联
  2. Port-Channel功能用于交换机之间的对接,通过牺牲端口数来给交换机之 间的数据交换提供捆绑的高带宽,提高网络速度,突破网络瓶颈,进而大幅提高网络性能
  3. Port-Channel 可以提供负载均衡能力以及系统容 错。由于Port-Channel 实时负载各个交换机端口和服务器接口的流量,一旦某个端口出现故障,它会自动把故障端口从Trunk组中撤消,进而重新分配各个 Trunk端口的流量,从而实现系统容错。

 

从实际应用来讲,将这个Port-Channel 当作一个端口使用,日常使用中主要目的有以下几类:

  1. 有效增加两个网络设备之间的带宽,通过增加物理端口和线路,带宽可以由2 X 10G增加至 4 X 10G 、8 X 10G 
  2. 提供两个网络设备之间链路的备份功能,高级应用中,通过虚拟化技术+不同物理路由线路,同时提供设备级别和线路级别冗余
  3. 提供两个网络设备之间流量负载均衡

 

配置Port-Channel时的注意事项:

  1. 选择Port-Channel的端口,端口数目必须是2、4或者8
  2. 必须使用同一组中的端口,在交换机上的端口分成了多个组,Port-Channel的所有端口必须来自同一个组
  3. 使用连续的端口;Port-Channel上的端口必须连续,比如你可以用端口1、2、3、4组合成一个端口汇聚
  4. 在一组端口只产生一个Port-Channel
  5.  端口均为全双工模式
  6.  端口速率必须相同
  7.  端口的类型必须一样,比如必须为GE端口或者10GE端口
  8.  端口同为access 端口并且属于同一个vlan 或同为trunk 端口

 以下为典型应用场景:

场景描述:

  1.  A站 为核心网络一个主要节点,由2台核心交换机通过IRF 技术实现虚拟化,实现物理设备级别冗余
  2. B站为核心网络对端主要节点,由2台核心交换机通过IRF技术实现虚拟化,实现物理设备级别冗余
  3. A 站 和B站通过双长途裸纤组建城域网,构建一个2层交换网络,同时实现设备级别、线路级别HA 解决方案
  4. A站PE1 和PE2,B站PE1 和PE2 为公司业务使用平台,分别接入两端不同物理设备
  5. 现网A站和B 站之间目前通过2 X 10G 带宽通过Port-Channel 技术实现链路捆绑,如图蓝色线路所示
  6. 由于业务发展,带宽远不能满足需求,需要扩容A站和B站之间带宽来满足带宽需要,新增2 X 10G 并入现有端口组。如图红色线路所示

交换机 Port-Channel(端口汇聚)的 配置_第1张图片

 

配置步骤:

  1. 检查现网配置(图示蓝色线路)

[A站]dis current-configuration int Bridge-Aggregation 1
#
interface Bridge-Aggregation1
 description BBONE
 port link-type trunk
 port trunk permit vlan all
 link-aggregation mode dynamic
 undo stp enable


[A站]dis current-configuration int Ten-GigabitEthernet 1/0/48
#
interface Ten-GigabitEthernet1/0/48
 port link-mode bridge
 description BBONE:
 port link-type trunk
 port trunk permit vlan all
 speed 10000
 duplex full
 undo stp enable
 port link-aggregation group 1
#
[A站]dis current-configuration int Ten-GigabitEthernet 2/0/48
#
interface Ten-GigabitEthernet2/0/48
 port link-mode bridge
 description BBONE:
 port link-type trunk
 port trunk permit vlan all
 speed 10000
 duplex full
 undo stp enable
 port link-aggregation group 1
#
return

[B站]dis current-configuration int Bridge-Aggregation 1
#
interface Bridge-Aggregation1

 description BBONE
 port link-type trunk
 port trunk permit vlan all
 link-aggregation mode dynamic
 undo stp enable
#
return

[B站]dis current-configuration int Ten-GigabitEthernet 1/0/48
#
interface Ten-GigabitEthernet1/0/48
 port link-mode bridge
 description BBONE:
 port link-type trunk
 port trunk permit vlan all
 speed 10000
 duplex full
 undo stp enable
 port link-aggregation group 1
#
return
 

[B站]dis current-configuration int Ten-GigabitEthernet 2/0/48
#
interface Ten-GigabitEthernet2/0/48
 port link-mode bridge
 description BBONE:CSW4.PEK3-TE2/0/4 PEK3-TSN3-DF [Over 2nd-DWDM]
 port link-type trunk
 port trunk permit vlan all
 speed 10000
 duplex full
 undo stp enable
 port link-aggregation group 1
#
return
 

[A站]dis int Bridge-Aggregation 1 brief 
Brief information on interfaces in bridge mode:
Link: ADM - administratively down; Stby - standby
Speed: (a) - auto
Duplex: (a)/A - auto; H - half; F - full
Type: A - access; T - trunk; H - hybrid
Interface            Link Speed   Duplex Type PVID Description                
BAGG1                UP   20G(a)  F(a)   T    1    BBONE:
 

[B站]dis int Bridge-Aggregation 1 brief 
Brief information on interface(s) under bridge mode:
Link: ADM - administratively down; Stby - standby
Speed or Duplex: (a)/A - auto; H - half; F - full
Type: A - access; T - trunk; H - hybrid
Interface            Link Speed   Duplex Type PVID Description                
BAGG1                UP   20G(a)  F(a)   T    1    BBONE:
 

2. 新端口配置(图示红色线路)

[A站]dis current-configuration interface Ten-GigabitEthernet 1/0/26  == 端口配置必须与现网端口保持一致
#
interface Ten-GigabitEthernet1/0/26
 port link-mode bridge
 description BBONE:
 port link-type trunk
 port trunk permit vlan all
 speed 10000
 duplex full
 shutdown== 端口必须提前处于Down状态
 undo stp enable
 port link-aggregation group 1
#
return

[A站]dis current-configuration interface Ten-GigabitEthernet 2/0/26 == 端口配置必须与现网端口保持一致
#
interface Ten-GigabitEthernet2/0/26
 port link-mode bridge
 description BBONE:
 port link-type trunk
 port trunk permit vlan all
 speed 10000
 duplex full
 shutdown== 端口必须提前处于Down状态
 undo stp enable
 port link-aggregation group 1
#
return
[B 站]dis current-configuration int Ten-GigabitEthernet 1/0/26== 端口配置必须与现网端口保持一致
#
interface Ten-GigabitEthernet1/0/26
 port link-mode bridge
 description BBONE:
 port link-type trunk
 port trunk permit vlan all
 speed 10000
 duplex full

shutdown== 端口必须提前处于Down状态
 undo stp enable
 port link-aggregation group 1
#
return

[B 站]dis current-configuration int Ten-GigabitEthernet 2/0/26== 端口配置必须与现网端口保持一致
#
interface Ten-GigabitEthernet2/0/26
 port link-mode bridge
 description BBONE:
 port link-type trunk
 port trunk permit vlan all
 speed 10000
 duplex full

shutdown== 端口必须提前处于Down状态
 undo stp enable
 port link-aggregation group 1
#

3. 测试现网连通性

A站#ping 222.126.130.137 r 1000 size 1500
Type escape sequence to abort.
Sending 1000, 1500-byte ICMP Echos to 222.126.130.137, timeout is 2 seconds:
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!
Success rate is 100 percent (1000/1000), round-trip min/avg/max = 1/1/5 ms

4. 逐步打开各个新增端口并测试连通性

通过测试连通性发现,整个升级过程中丢失了一个数据包。由此表明,Port-Channel升级端口对上层实际业务是没有任何影响

5. 查看升级后的结果

[A站]dis int Bridge-Aggregation 1 brief 
Brief information on interfaces in bridge mode:
Link: ADM - administratively down; Stby - standby
Speed: (a) - auto
Duplex: (a)/A - auto; H - half; F - full
Type: A - access; T - trunk; H - hybrid
Interface            Link Speed   Duplex Type PVID Description                
BAGG1                UP   40G(a)  F(a)   T    1    BBONE:、
 

[B 站]dis int Bridge-Aggregation 1 brief 
Brief information on interface(s) under bridge mode:
Link: ADM - administratively down; Stby - standby
Speed or Duplex: (a)/A - auto; H - half; F - full
Type: A - access; T - trunk; H - hybrid
Interface            Link Speed   Duplex Type PVID Description                
BAGG1                UP   40G(a)  F(a)   T    1    BBONE:
 

新端口负载流量

交换机 Port-Channel(端口汇聚)的 配置_第2张图片

 如果各位有技术问题或者技术方向解决方案需要交流,请进一步与我联系,我的联系方式如下:

王重阳 联系方式:183 0113 0843  微信号:183 0113 0843

你可能感兴趣的:(路由和交换)