Hybrid interface realizes communication between different VLANs

The interface of the Huawei switch is set to hybrid by default. The hybrid interface is between the access and trunk interfaces. The communication between different VLANs can be realized through labeling and untagged. The hybrid interface is a special layer 2 interface mode of Huawei equipment. Similar to VLAN and trunk interfaces, data frames can be untagged and untagged.

Hybrid label tagging formula:
export inspection: check untag table for labeling, no labeling, check tag, release, and not discard
Import inspection: check for label, check tag table, release, no label, discard
 without label, put PVID through

Mind formula summary:
Hybrid interface and hybrid interface:
1. Import only check the tag table, the entry must bring the label
2. The export will be released only when it is found on the untagged and tag tables, the difference is that the untagged table has no tags.

case analysis

Insert picture description here
1. Configure the PC IP address and gateway

pc1
Insert picture description here
pc2
Insert picture description here
pc3
Insert picture description here
pc5
Insert picture description here
2.1 Switch SW1 configuration
Insert picture description here
1. Enter the command vlan batch to divide vlan10, 20
2. Enter interface e0/0/1, set to access interface, divide default vlan10
3. Enter interface e0/0/2, set to access interface , Divide the default vlan20
4. Enter the interface g0/0/1, set it as a trunk interface, allow vlan10 vlan20 to pass through
5. Enter the interface g0/0/2, set it as a hybrid interface, enter the command port hybrid pvid vlan 10 to paste the interface For the label of vlan10, enter the command port hybrid untagged vlan 10 20 to untagged vlan10 and vlan20 at the exit.
2.2 Switch SW2 configuration
Insert picture description here
1. Enter the command vlan batch to divide vlan10, 20
2. Enter the interface e0/0/1 and set it as a hybrid interface, enter Command port hybrid pvid vlan 10 to label the interface as vlan10, enter the command port hybrid untagged vlan 10 20, unlabel vlan10 and vlan20 at the exit
3. Enter the interface e0/0/2, set it as a hybrid interface, enter the command port hybrid pvid vlan 20 to label the interface vlan20, enter the command port hybrid untagged vlan 10 20 to unlabel vlan10 and vlan20 at the exit
4. Enter the interface g0/0/1 and set it as a trunk interface, allowing vlan10 vlan20 to pass
5. Enter the interface g0/0/2, set it as a hybrid interface, enter the command port hybrid pvid vlan 20 to label the interface as vlan20, and enter the command port hybrid untagged vlan 10 20 to unlabel vlan10 and vlan20 at the exit

3.1 Router R1 IP address configuration
Insert picture description here
3.2 Router R2 IP address configuration
Insert picture description here

4.1 Router R1 static route configuration
Insert picture description here
ip route-static 192.168.20.0 24 11.0.0.2

4.2 Router R2 static route configuration
Insert picture description here
ip route-static 192.168.10.0 24 11.0.0.1

5. The test found that except pc1 cannot ping pc5, the others can be pinged.
Insert picture description here
Insert picture description here
Insert picture description here
Note: In this case, you can change the e0/0/1 interface of SW1 to hybrid, and untagged vlan10 and vlan20 to achieve connectivity

Guess you like

Origin blog.csdn.net/cenjeal/article/details/106906239