EtherChannel :以太信道端口绑定
发布时间:2018-10-31 09:58:28
作者:ynkulusi
etherchannel 的特点:
etherchannel特性在switch到switch、switch到router之间提供冗余的、高速的连接方式,简单说就是将两个设备间多条(2^x,x值思科为1-3,公用为1-4)FE或GE物理链路捆在一起组成一条设备间逻辑链路,从而达到增加带宽,提供冗余的目的。下面具体结合配置了解它的特点:构成etherchannel的端口必须配置成相同的特性,如双工模式、速度、同为FE或GE端口、native VLAN,、VLAN range,、and trunking status and type.等
当etherchannel中某一条link failed时,etherchannel中其它link照常工作。
当配置layer 2端口作etherchannel时只要在成员端口配置模式下用channel-group n命令指定该端口要加入的channel-group组,这时switch会自动创建port-channel接口,而当配置layer 3端口作etherchannel时,还需现在全局配置模式下用 interface port-channel n 命令手工创建port-channel接口。
PAgP: Port Aggregation Protocol 端口聚合协议
LACP: Link Aggregation Control Protocol 链路汇聚控制协议
LACP-PAGP
LACP active 主动 passive被动 公有(强制模式)
PAGP desirable主动 auto被动 私有(协商模式)
ON on 通用 通用(两端都用on)
配置命令:
Switch(config)#interface range interface slot/port – port 二层以太信道
Switch(config-if-range)#channel-protocol { pagp | lacp }
Switch(config-if-range)#channel-group number mode { active | on | auto |desirable | passive }
Switch(config)#interface port-channel port-channel-number 三层以太信道
Switch(config-if)#no switchport
Switch(config-if)#ip address address mask
Switch(config)#interface interface slot/port – port
Switch(config-if)#no switchport
Switch(config-if)#channel-group number mode { auto |desirable | on }
配置二层以太信道(两台端口绑定的交换机需同样配置,只是协商模式不同)
SWA(config)#interface range fastEthernet 0/23 – 24 进入需要绑定的端口
SWA(config-if-range)#switcport trunk encapsulation dot1q 配置端口封装协议
SWA(config-if-range)#switchport mode trunk 配置链路模式为中继模式
SWA(config-if-range)#switchport trunk native vlan 99 配置本征vlan
SWA(config-if-range)#switchport trunk allowed vlan 1,11-13 允许vlan 1,11-13通过
SWA(config-if-range)#channel-protocol lacp 定义协议类型
SWA(config-if-range)#channel-group 8 mode active 定义组及端口模式
SWB(config)#interface range fastEthernet 0/23 – 24 进入需要绑定的端口
SWB(config-if-range)#switcport trunk encapsulation dot1q 配置端口封装协议
SWB(config-if-range)#switchport mode trunk 配置链路模式为中继模式
SWB(config-if-range)#switchport trunk native vlan 99 配置本征vlan
SWB(config-if-range)#switchport trunk allowed vlan 1,11-13 允许vlan 1,11-13通过
SWB(config-if-range)#channel-protocol lacp 定义协议类型
SWB(config-if-range)#channel-group 8 mode passive 定义组及端口模式
三层以太信道捆绑成以太信道配置模式:
SWA(config)#interface range fastEthernet 0/23 – 24 进入需要绑定的端口
SWA(config-if-range)#no switchport 把接口定义为三层接口
SWA(config-if-range)#channel-protocol pagp
SWA(config-if-range)#channel-group 16 mode on
SWA(config)#interface port-channel 16
SWA(config-if)#ip address 12.1.1.1 255.255.255.0 配置3层逻辑接口的IP地址
SWA(config-if)#no shutdown
SWB(config)#interface range fastEthernet 0/23 – 24 进入需要绑定的端口
SWB(config-if-range)#no switchport 把接口定义为三层接口
SWB(config-if-range)#channel-protocol pagp
SWB(config-if-range)#channel-group 16 mode on
SWB(config)#interface port-channel 16
SWB(config-if)#ip address 12.1.1.2 255.255.255.0 三层以太信道的IP地址只能在逻辑接口启用
SWB(config-if)#no shutdown
SW(config)#interface range fastEthernet 0/24 对端需做相同配置
SW(config-if)#lacp port-priority 0 修改端口的优先级(默认32768),保证成为active
配置信息查看命令:
show etherchannel summary 查看以太信道的配置汇总
show etherchannel port-protocol 查看以太信道的配置
show running-config interface port-channel num
Ethernet-channel 高级功能
Switch(config)#port-channel load-balance {dst-ip | dst-mac | src-dst-ip |src-dst-mac | src-ip | src-mac } 负载均衡算法,两端可以不同
分类:network
评论数:0
阅读数:1017