10孔布鲁斯口琴特点:配置三层EtherChannel

来源:百度文库 编辑:偶看新闻 时间:2024/05/04 16:55:53

若欲在三层设备(如三层交换机)之间实现高速连接,可以采用三层EtherChannel方式,从而避免由路由连接而产生的瓶颈。

1.创建Port-Channel逻辑接口
当将IP地址从物理接口移动至EtherChannel时,必须先从物理接口中删除该IP地址。
Switch# configure terminal
Switch(config)# interface port-channel port_channel_number 创建Port-Channel接口。port_channel_number取值范围为1~48。
Switch(config-if)# no switchport 将接口置于三层模式。
Switch(config-if)# ip address ip_address mask 为该EtherChannel指定IP地址和子网掩码。
Switch(config-if)# end
Switch# show running-config interface port-channel port_channel_number

2.配置为三层EtherChannel
Switch# configure terminal
Switch(config)# interface {fastethernet | gigabitethernet} slot/port 选择欲配置的物理接口。
Switch(config-if)# no switchport 创建三层路由端口。
Switch(config-if)# no ip address 确保该物理接口没有指定IP地址。
Switch(config-if)# channel-group channel-group-number mode {auto [non-silent] | desirable [non-silent] | on} | {active | passive}
                            将接口配置至port-channel,并指定PAgP或LACP模式。
Switch(config-if)# end
Switch# show running-config3.实现负载均衡
Switch# configure terminal
Switch(config)# port-channel load-balance {src-mac | dst-mac | src-dst-mac | src-ip | dst-ip | src-dst-ip | src-port | dst-port | src-dst-port}
                         配置Etherchannel负载均衡。其中,src-mac指源MAC地址;dst-mac指目的MAC地址;src-dst-mac指源和目的IP地址;src-ip指                         源IP地址;dst-ip指目的IP地址;src-dst-ip指源和目的IP地址;src-port指源第四层端口;dst-port指目的第四层端口;                         src-dst-port指源和目的第四层端口。
Switch(config-if)# end
Switch# show etherchannel load-balance