Switch Link Aggregation (Static, Dynamic)

Experimental environment configuration

2 2960 switches, several straight-through network cables, 2 PCs


Experimental procedure

  1. Create a new topology

insert image description here

2. Configure the switch IP of the same network segment and the IP of the PC

If the link aggregation is successful, PC0 can ping PC1.


Static method to achieve link aggregation experimental steps

  1. Correctly connect the network cable, restore all switches to factory settings, and do initial configuration to avoid broadcast storms (configure VLAN1 management IP and enable spanning tree)

The initial configuration avoids broadcast storms by default

2. Create port-channels (link groups) for switches A and B respectively

//在全局配置模式下创建链路组
switch(config)#int port-channel 1 
//回到特权模式查看已创建的链路组
switch#show etherchannel port-channel

Result presentation:
insert image description here

3. Manually generate link aggregation groups for switches A and B respectively

//在链路聚合端口手动生成链路组
switch(config)#interface range f0/22 -f0/24 
switch(config-if-range)#channel-group 1 mode    
switch(config-if-range)#exit
switch(config)#exit
switchA#write
//查看接口聚合链路的状态
switch#show interface etherchannel 

Result presentation:

insert image description here

verify

Use PC1 to ping PC2

switch A switch B operate result
F0/22 F0/23 F0/24 F0/22 F0/23 F0/24
PC1 is connected to F0/1 of switch A ping Pass
PC2 is connected to F0/1 of switch B ping Pass
switch A switch B operate result
F0/22 F0/23 F0/22 F0/23
PC1 is connected to F0/1 of switch A ping No way
PC2 is connected to F0/1 of switch B ping No way

insert image description here

Dynamic method to achieve link aggregation experimental steps

  1. Connect the network cable correctly, restore all switches to factory settings, and do initial configuration to avoid broadcast storms (configure VLAN1 management IP and enable spanning tree)

  2. Create port-channels (link groups) for switches A and B respectively

The operation is the same as the second step of static, without showing

  1. LACP dynamically generates link aggregation groups
//把交换机0的链路组设置为主动模式
switch(config)#int range f0/22 -f0/24           
switch(config-if-range)#channel-group 1 mode active 
switch(config-if-range)#exit
switch(config)#exit
switchA#write

insert image description here

  1. Set the link group of switch B to passive mode
switch(config)#int range f0/22 -f0/24          
switch(config-if-range)#channel-group 1 mode passive
switch(config-if-range)#exit
switch(config)#exit
switchB#write

Same as above

verify

Use PC1 to ping PC2

switch A switch B operate result
F0/22 F0/23 F0/24 F0/22 F0/23 F0/24
PC1 is connected to F0/1 of switch A ping Pass
PC2 is connected to F0/1 of switch B ping Pass
switch A switch B operate result
F0/22 F0/23 F0/22 F0/23
PC1 is connected to F0/1 of switch A ping No way
PC2 is connected to F0/1 of switch B ping No way

insert image description here

insert image description here

Guess you like

Origin blog.csdn.net/qq_50767141/article/details/121367085