链路聚合(Port-Channel)

一、简介

1. PortGroup

Portgroup是配置层面上的一个物理端口组,配置到port group里面的物理端口才可以参加链路汇聚,并成为portchannel里的某个成员端口。在逻辑上,port group并不是一个端口,而是一个端口序列。加入port group中的物理端口满足某种条件时进行端口汇聚,形成一个port channel,这个port channel具备了逻辑端口的属性,才真正成为一个独立的逻辑端口。

2. 配置PortChannel注意事项

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

二、CLI命令

1. 操作设置类

// 加入链路组1并开启
channel-group 1 mode on

// 通过此命令在交换机查看端口聚合可以使用的协议
channel-group 1 mode ?                   

  active   Enable LACP unconditionally                             #主动发送LACP报文

  auto    Enable PAgP only if a PAgP device is detected            #被动发送PAgP报文

  desirable  Enable PAgP unconditionally                           #主动发送PAgP报文

  on       Enable Etherchannel only                                #手动设置,需要两边都设置成on

  passive  Enable LACP only if a LACP device is detected           #被动接收LACP报文
// 

2. 信息查看类

// 加入链路组1并开启
channel-group 1 mode on

// 通过此命令在交换机查看端口聚合可以使用的协议
channel-group 1 mode ?                   

  active   Enable LACP unconditionally                             #主动发送LACP报文

  auto    Enable PAgP only if a PAgP device is detected            #被动发送PAgP报文

  desirable  Enable PAgP unconditionally                           #主动发送PAgP报文

  on       Enable Etherchannel only                                #手动设置,需要两边都设置成on

  passive  Enable LACP only if a LACP device is detected           #被动接收LACP报文
// 

三、具体实现

1. SWRoot

SWRoot>en
SWRoot#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
SWRoot(config)#int range f0/23 - 24
SWRoot(config-if-range)#channel-group 1 mode on
SWRoot(config-if-range)#
Creating a port-channel interface Port-channel 1

%LINK-5-CHANGED: Interface Port-channel1, changed state to up

%LINEPROTO-5-UPDOWN: Line protocol on Interface Port-channel1, changed state to up

SWRoot(config-if-range)#exit
SWRoot(config)#int port-channel 1
SWRoot(config-if)#sw tr en do
SWRoot(config-if)#sw mo tr
SWRoot(config-if)#exit

2. SWServer

SWServer>en
SWServer#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
SWServer(config)#int range f0/23 - 24
SWServer(config-if-range)#sw mo tr
SWServer(config-if-range)#sw tr al vl al
SWServer(config-if-range)#channel-group 1 mode on
SWServer(config-if-range)#
Creating a port-channel interface Port-channel 1

%LINK-5-CHANGED: Interface Port-channel1, changed state to up

%LINEPROTO-5-UPDOWN: Line protocol on Interface Port-channel1, changed state to up

  • 2
    点赞
  • 18
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

欣欣梦

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值