Configuring Static Link Aggregation on H3C Switches

The topology is as follows

 

1. Configure Link Aggregation

SW1 device configuration


<H3C>system-view	                                                #进入系统视图
[H3C]sysname sw1	                                                #将设备命名为sw1
[sw1]interface Bridge-Aggregation 1	                                #创建静态链路聚合组1
[sw1-Bridge-Aggregation1]port link-type trunk	                    #将链路聚合组接口类型设置为trunk
[sw1-Bridge-Aggregation1]port trunk permit vlan all	                #设置链路聚合组接口允许通过的vlan
[sw1-Bridge-Aggregation1]quit	                                    #退出链路聚合组视图
[sw1]interface range Gigabitethernet 1/0/1 to Gigabitethernet 1/0/3	#进入g1/0/1到g1/0/3的接口视图
[sw1-if-range]port link-type trunk	                                #将接口类型设置为trunk
[sw1-if-range]port trunk permit vlan all	                        #设置允许通过的vlan
[sw1-if-range]port link-aggregation group 1	                        #将接口加入到聚合组
[sw1-if-range]quit	                                                #退出接口视图
[sw1]save	                                                        #保存

SW2 device configuration

<H3C>system-view	                                                #进入系统视图
[H3C]sysname sw2	                                                #将设备命名为sw2
[sw2]interface Bridge-Aggregation 1	                                #创建静态链路聚合组1
[sw2-Bridge-Aggregation1]port link-type trunk	                    #将链路聚合组接口类型设置为trunk
[sw2-Bridge-Aggregation1]port trunk permit vlan all	                #设置链路聚合组接口允许通过的vlan
[sw2-Bridge-Aggregation1]quit	                                    #退出链路聚合组视图
[sw2]interface range Gigabitethernet 1/0/1 to Gigabitethernet 1/0/3	#进入g1/0/1到g1/0/3的接口视图
[sw2-if-range]port link-type trunk	                                #将接口类型设置为trunk
[sw2-if-range]port trunk permit vlan all	                        #设置允许通过的vlan
[sw2-if-range]port link-aggregation group 1	                        #将接口加入到聚合组
[sw2-if-range]quit	                                                #退出接口视图
[sw2]save	                                                        #保存    

2. Configure VLANs

SW1 device configuration

<sw1>system-view	                                                #进入系统视图
[sw1]vlan 10	                                                    #创建vlan10
[sw1-vlan10]quit	                                                #退出到系统视图
[sw1]interface vlan 10	                                            #进入到vlan10接口视图
[sw1-Vlan-interface10]ip address 1.1.1.254 24	                    #给vlan10配置IP地址
[sw1-Vlan-interface10]quit	                                        #退出vlan接口视图
[sw1]interface Gigabitethernet 1/0/4	                            #接入g1/0/4接口视图
[sw1-GigabitEthernet1/0/4]port link-type access                    	#将接口类型设置为access
[sw1-GigabitEthernet1/0/4]port access vlan 10	                    #设置接口允许通过的vlan
[sw1-GigabitEthernet1/0/4]quit	                                    #退出接口视图
[sw1]save	                                                        #保存

SW2 device configuration

<sw2>system-view	                                            #进入系统视图
[sw2]vlan 10	                                                #创建vlan10
[sw2-vlan10]quit	                                            #退出到系统视图
[sw2]interface Gigabitethernet 1/0/4	                        #进入到g1/0/4接口视图
[sw2-GigabitEthernet1/0/4]port link-type access	                #将接口类型设置为access
[sw2-GigabitEthernet1/0/4]port access vlan 10	                #设置接口允许通过的vlan
[sw2-GigabitEthernet1/0/4]quit                                 	#退出接口视图    
[sw2]save                                                       #保存

3. Verify configuration

verify

SW1

<sw1>display interface bridge-aggregation 1

as the picture shows:

  <sw1>display link-aggregation verbose

as the picture shows:

SW2:

<sw2>display interface bridge-aggregation 1 

as the picture shows:

   <sw2>display link-aggregation verbose

as the picture shows:

Next turn on PC1 and PC2

Configure PC1:

as the picture shows:

 PC2:

as the picture shows:

Open the command line interface of PC1, ping the IP address of PC2: 1.1.1.2, and communicate;

as the picture shows:

Open the command line interface of PC2, ping the IP address of PC1: 1.1.1.1, and communicate;

as the picture shows:

Link static aggregation has been configured successfully.
 

Guess you like

Origin blog.csdn.net/m0_62089145/article/details/130221042