config)#int range f0/1-3 Switch(config-if-range)#channel-group 1 mode on Switch(config-if-range)#int port-channel config)#int range f0/4-6 Switch(config-if-range)#channel-group 2 mode on Switch(config-if-range)#int port-channel config)#int range f0/7-9 Switch(config-if-range)#channel-group 3 mode on Switch(config-if-range)#int port-channel config)#int range f0/1-3 Switch(config-if-range)#channel-group 1 mode on Switch(config-if-range)#int port-channel config)#int range f0/4-6 Switch(config-if-range)#channel-group 4 mode on Switch(config-if-range)#int port-channel
enable Switch#configure terminal Switch(config)#hostname SA (更改交换机名字) SA(config)#interface port-channel config-if)#interface fa0/24 SA(config-if)#channel-group 1 mode on SA(config-if)#exit SA(config)#interface port-channel VLAN通过) 配置交换机1 Switch>enable Switch#configure terminal Switch(config)#hostname SB SB(config)#interface port-channel /24 (同时开启聚合通道1) SB(config-if)#channel-group 1 mode on SB(config-if)#exit SB(config)#interface port-channel
在端口汇聚中,H3C这些端口汇聚方式都可以与思科的port-channel进行对接。 channel-group 1 mode 1 mode on interface GigabitEthernet1/0/2 channel-group 1 mode 1 mode on Interface port-channel channel-group 1 mode active interface GigabitEthernet1/0/2 channel-group 1 mode active Interface port-channel
配置要点: Port-channel接口一旦建立完成,就形成了一个逻辑接口,后续针对接口的配置,都在Port-channel接口中完成。 Port-channel接口不能成为SPAN(端口镜像)的目的接口。 隶属于同一个Port-channel的物理接口需有相同的如下配置: 1、端口之间的Speed 和Duplex需相同( LACP只能是全双工模式 ) 2、接口模式相同(Trunk 二层捆绑口配置: interface port-channel 1 switchport switch trunk encapsulation dot1q switchport mode trunk !
channel-group 1 mode on #加入链路组1并开启 Switch(config-if-range)# 特权模式下查看链路聚合是否成功: 三.负载均衡 在全局模式下: Switch(config)#port-channel load-balance dst-ip #按照目的IP地址进行负载均衡 实际上还可以以其他方式实现实现负载均衡 Switch(config)#port-channel load-balance ?
3、进入port-channel 配置模式: Switch(Config)#interface port-channel 1 //进入port-channel接口配置模式,这个接口代表由端口组1中的所有物理端口组合而成的逻辑接口 4、修改链路模式: switchport mode trunk //在port-channel接口配置模式下,这条命令将整个聚合链路设置为“trunk”模式,意味着该链路允许通过多个VLAN的数据帧,即它是一个支持多
#----在Switch1上操作------------------------- Switch1(config)#interface port-channel 1 // 创建端口号为 #----在Switch1上操作------------------------- Switch1(config)# port-channel load-balance src-mac // 配置负载平衡模式为 src-mac #----在Switch2上操作------------------------- Switch2(config)# port-channel load-balance src-mac #----在Switch2上操作------------------------- Switch2(config)# interface port-channel 1 // 选择聚合端口 Switch2 Switch1# show etherchannel summary Flags: D - down P - in port-channel I - stand-alone
增加拓扑Vlan3的数据通信: Switch(config-if)#switchport trunk allowed vlan add 3 5.以太通道删除Vlan2: Switch(config)#in port-channel
config-if-range)#channel-group 1 mode active //使用端口聚合,组为1,模式为活跃 SW1(config-if-range)#exit SW1(config)#port-channel config-if-range)#sw mo t Sw1(config-if-range)#channel-group 1 mode active SW1(config-if-range)#exit SW1(config)#port-channel
config-if-range)#no sw (要先先变成三层口,捆绑口变的话会无效) SW4(config-if-range)#channel-group 1 mode auto SW3(config)#int port-channel 双工速率 (2)不可以是span目标端口 5)load-balance方法 SW3#sh etherchannel load-balance Source MAC address SW3(config)#port-channel 3550 dst-mac Dst Mac Addr src-mac Src Mac Addr SW4(config)#port-channel load-balance ?
add-bond br0 pc p1p1 p1p2 ovs-vsctl -- set port pc lacp=paasive 在交换机上查看 snda-intel-lab-2960s-250# sh int port-channel
Destination IP address MPLS: Label or IP Switch# show etherchannel summary Flags: D - down P - bundled in port-channel bundling w - waiting to be aggregated Number of channel-groups in use: 2 Number of aggregators: 2 Group Port-channel
交换机配置 多网卡绑定支持 假设3,4端口做port-channel,相关配置如下: snda-intel-lab-2960s-250#sh running-config int port-channel
channel-group 10 mode active Switch1(config-if-range)# no shut Switch1(config-if-range)# interface port-channel 将端口通道配置为 vPC Switch1(config-if)# interface port-channel 15 Switch1(config-if)# switchport Switch1(config-if Switch1# show vpc consistency-parameters interface port-channel 15 Legend: Type 1 : vPC
8.3 配置命令EtherChannel:在思科设备上,EtherChannel的配置需要使用一系列特定的命令,如channel-group和port-channel等。 config-if-range)# channel-group 1 mode activeSwitch(config-if-range)# exitSwitch(config)# interface Port-channel
mac-address-table Configure the MAC address table no Negate a command or set its defaults port-channel
config-if-range)#channel-group 1 mode active //这里设置的是LACP主动模式 3、将聚合通道配置为trunk Switch(config)#interface port-channel
config-if)#exit 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-
dot1q switchport mode trunk no shut interface rang e 0/2 , e 1/0 channel-group 1 mode active interface port-channel trun enca do switch mode trunk no shut interface rang e 0/0-1 channel-group 1 mode passiv interface port-channel
3、进入port-channel 配置模式: Switch(Config)#interface port-channel 1 //进入port-channel接口配置模式,这个接口代表由端口组1中的所有物理端口组合而成的逻辑接口 4、修改链路模式: switchport mode trunk //在port-channel接口配置模式下,这条命令将整个聚合链路设置为“trunk”模式,意味着该链路允许通过多个VLAN的数据帧,即它是一个支持多