How to use Huawei Layer 3 switches to realize intercommunication between different VLANs

In a real network, it is often necessary to access each other across VLANs. People usually choose some methods to achieve mutual access between computers in different VLANs, such as one-arm routing. However, the one-arm routing technology has some limitations in terms of bandwidth and forwarding efficiency, so it is rarely used.
The three-layer switch adds routing function on the basis of the original two-layer switch. At the same time, because the data is not routed through the physical line like the single-arm routing, it solves the problem of bandwidth bottleneck and provides a flexible network design. s solution.

Experimental requirements: Due to the needs of the business system, Company A requires a Huawei Layer 3 switch to implement mutual visits between Department A and Department B. The topology is shown in the figure below
! [insert picture description here](https://img-blog.csdnimg.cn/09f8df83a4274351a9edbc1181 insert image description here
6d9180.png)

Configuration process:
1. Configure vlan100 and vlan200 in SW1, and configure the ip gateway address.

[SW3]vlan batch 100 200

[SW3]inter vlan 100
[SW3-Vlanif100]ip add 192.168.100.254 24
[SW3-Vlanif100]qu

[SW3]inter vlan 200
[SW3-Vlanif200]ip add 192.168.200.254 24
[SW3-Vlanif200]qu

2. Configure SW2, divide vlan100 and vlan200, and add the interface to vlan

[SW2]vlan batch 100 200
[SW2]port-group 1	
[SW2-port-group-1]group-member Ethernet 0/0/1 to Ethernet 0/0/2	
[SW2-port-group-1]port link-type access 
[SW2-Ethernet0/0/1]port link-type access 
[SW2-Ethernet0/0/2]port link-type access 

[SW2-port-group-1]port default vlan 100
[SW2-Ethernet0/0/1]port default vlan 100
[SW2-Ethernet0/0/2]port default vlan 100
[SW2-port-group-1]qu

[SW2-port-group-2]group-member Ethernet 0/0/3 to Ethernet 0/0/4	
[SW2-port-group-2]port link-type access 
[SW2-Ethernet0/0/3]port link-type access 
[SW2-Ethernet0/0/4]port link-type access 
	
[SW2-port-group-2]port default vlan 200
[SW2-Ethernet0/0/3]port default vlan 200
[SW2-Ethernet0/0/4]port default vlan 200
[SW2-port-group-2]qu

3. Configure the interconnection interface of SW1 and SW2 as a trunk interface, and release vlan100 and vlan200

SW1配置GE0/0/1口
[SW3]inter GigabitEthernet 0/0/1
[SW3-GigabitEthernet0/0/1]port link-type trunk 	
[SW3-GigabitEthernet0/0/1]port trunk allow-pass vlan 100 200
[SW3-GigabitEthernet0/0/1]qu

SW2配置GE0/0/1口
[SW2]inter GigabitEthernet 0/0/1
[SW2-GigabitEthernet0/0/1]port link-type trunk		
[SW2-GigabitEthernet0/0/1]port trunk allow-pass vlan 100 200

4. Test
Use PC1 to ping 192.168.200.200/24 ​​of PC2, and the communication can be normal
insert image description here

Guess you like

Origin blog.csdn.net/qq_33292195/article/details/128716156