交换机端口聚合

端口聚合:

    简称AP,又称链路聚合,是指2台交换机之间在物理上将多个端口连接起来,将多条链路聚合成一条逻辑链路,从而增大链路带宽,解决交换机网络中因宽带引起的网络瓶颈问题。;

    同时,多条物理链路之间能够冗余备份,其中任意一条链路断开,不会影响其他链路的正常转发数据,端口聚合遵循IEEE802.3ad协议。

              它可以把多个端口的带宽叠加起来使用。

实验:配置端口聚合

              只在两台交换机端口都配好以后,再将两台交换机连接起来;如果先连线再配置会造成广播风暴,影响交换机的正常工作。

        实验设备:两台2960的交换机;

                        两台PC;

                        四根网线:直通线(2根),交叉线(2根)


    步骤1:交换机A的配置:                      

                        Switch>enable

                        Switch#vlan database

                        Switch(vlan)#vlan 10        创建VLAN10

                        Switch#configure terminal

                        Switch(config)#interface fastEthernet 0/1

                        Switch(config-if)#switchport access vlan 10        将0/1口放入VLAN10中

                        Switch(config-if)#exit

                        Switch(config)#interface port-channel 1        创建端口聚合链路1

                        Switch(config-if)#switchport mode trunk        定义端口聚合链路1的封装模式为trunk

                        Switch(config-if)#switchport trunk encapsulation dot1q(该命令三层交换机封装用,二层交换机不需要)

                        Switch(config-if)#no shutdown

                        Switch(config-if)#exit

                        Switch(config)#interface range fastEthernet 0/2-3

                        Switch(config-if-range)#switchport mode trunk

                        Switch(config-if-range)#channel-group 1 mode on        将0/2-3加到端口聚合链路1中

                        Switch(config-if-range)#end

                        Switch#show running

                        Switch#show interfaces fastEthernet 0/2 switchport        查看接口状态信息

                        Switch#show interfaces fastEthernet 0/3 switchport

              步骤2:交换机B的配置:        

                        Switch>enable

                        Switch#vlan database

                        Switch(vlan)#vlan 10        创建VLAN10

                        Switch#configure terminal

                        Switch(config)#interface fastEthernet 0/1

                        Switch(config-if)#switchport access vlan 10        将0/1口放入VLAN10中

                        Switch(config-if)#exit

                        Switch(config)#interface port-channel 1        创建端口聚合链路1

                        Switch(config-if)#switchport mode trunk        定义端口聚合链路1的封装模式为trunk

                        Switch(config-if)#switchport trunk encapsulation dot1q(该命令三层交换机封装用,二层交换机不需要)

                        Switch(config-if)#no shutdown

                        Switch(config-if)#exit

                        Switch(config)#interface range fastEthernet 0/2-3

                        Switch(config-if-range)#switchport mode trunk

                        Switch(config-if-range)#channel-group 1 mode on        将0/2-3加到端口聚合链路1中

                        Switch(config-if-range)#end

                        Switch#show running

                        Switch#show interfaces fastEthernet 0/2 switchport        查看接口状态信息

                        Switch#show interfaces fastEthernet 0/3 switchport

    步骤3:验证当交换机之间一条链路断开时,pc1pc2仍能继续通讯。


 注意:

    只有同类型端口才能聚合为一个AG端口;

    所有物理端口必须属于同一个VLAN

    某些交换机最多支持8个物理端口聚合为一个AG

    某些交换机最多支持6组聚合端口;

              AG接口不能设置端口安全功能;

    一个端口加入AG,端口属性将被AG的属性所取代;

    一个端口从AG中删除,则端口的属性将恢复为其加入AG前的属性。


猜你喜欢

转载自blog.csdn.net/weixin_38154393/article/details/80597592