VLAN and Trunk configuration of Huawei switch
Create the following network topology through eNSP
1. Configure the first switch sw1
Undo ter moniter / / turn off information interference
System-view / / enter the system view
[Huawei] sysname sw1 / / modify the switch name to sw1
[sw1] vlan batch 5 10 / / create vlan5 and vlan10
[sw1] interface Ethernet 0ram 0Compact 1 / / entry port 1
[sw1-Ethernet0/0/1] port link-type access / / configure access mode for port 1
[sw1-Ethernet0/0/1] port default vlan5 / / add port 1 to vlan5
[sw1-Ethernet0/0/1] interface ethernet 0Compact 0 / / entry port 2
[sw1-Ethernet0/0/2] port link-type access / / configure access mode for port 2
[sw1-Ethernet0/0/2] port default vlan10 / / add port 2 to vlan10
[sw1-Ethernet0/0/2] interface ethernet 0Uniple 22 / / enter sw1 port 22
[sw1-Ethernet0/0/22] port link-type trunk / / configure trunk mode for sw1 port 22
[sw1-Ethernet0/0/22] port trunk allow-pass vlan5 10 / / add vlan5 and vlan10 to trunk link trunk
2. Set up the second switch sw2
Undo ter moniter / / turn off information interference
System-view / / enter the system view
[Huawei] sysname sw2 / / modify the switch name to sw2
[sw2] vlan batch 5 10 / / create vlan5 and vlan10
[sw2] interface Ethernet 0ram 0ram 3 / / entry port 3
[sw2-Ethernet0/0/3] port link-type access / / configure access mode for port 3
[sw2-Ethernet0/0/3] port default vlan5 / / add port 3 to vlan5
[sw2-Ethernet0/0/3] interface ethernet 0ram 0ram 4 / / entry port 4
[sw2-Ethernet0/0/4] port link-type access / / configure access mode for port 4
[sw2-Ethernet0/0/4] port default vlan10 / / add port 4 to vlan10
[sw2-Ethernet0/0/4] interface ethernet 0Uniple 22 / / enter sw2 port 22
[sw2-Ethernet0/0/22] port link-type trunk / / configure trunk mode for sw2 port 22
[sw2-Ethernet0/0/22] port trunk allow-pass vlan5 10 / / add vlan5 and vlan10 to trunk link trunk
3. Test China Unicom