Small network topology (vlan)

Small network topology (vlan)
Environment:
vlan10: PC14: 192.168.10.1 255.255.255.0
PC15: 192.168.10.2 255.255.255.0
PC18: 192.168.10.3 255.255.255.0
vlan 20: PC16: 192.168.20.1 255.255.255.0
PC17: 192.168.20.2 255.255.255.0
1. Host Add ip address and subnet mask

2. Create vlan and add pc to vlan

<Huawei>sys
[Huawei]sysname LW6
[LW6]q
[LW6]vlan 10 Create vlan10
[LW6]interface gi 0/0/2 Enter interface
[LW6-GigabitEthernet0/0/2]port link-type access Set the port mode to access
[LW6-GigabitEthernet0/0/2]port default vlan 10 Set the port to join vlan10 by default
[LW6-GigabitEthernet0/0/2]q
[LW6]inter gi 0/0/3
[LW6-GigabitEthernet0/0/3]port link -type access
[LW6-GigabitEthernet0/0/3]port default vlan 10
[LW6-GigabitEthernet0/0/3]q
[LW6]vlan 20
[LW6-vlan20]q
[LW6]interface gi 0/0/4
[LW6- GigabitEthernet0/0/4]port link-type access
[LW6-GigabitEthernet0/0/4]port default vlan 20
LW7 Similarly
3. Two switches are connected by trunk
[LW6-GigabitEthernet0/0/4]q
[LW6]interface gi 0/0/1 Enter the interface
[LW6-GigabitEthernet0/0/1]port link-type trunk Set the port mode to trunk
(at this time, if you look at the vlan port, you will find that the trunk is only used for vlan1 by default)
Small network topology (vlan)
[LW6-GigabitEthernet0 /0/1]port trunk allow-pass vlan all Set trunk to allow all vlans
(check vlan at this time, and find that trunk has been applied to all vlans 1-4094)
Small network topology (vlan)
LW7 is the same

test:
Small network topology (vlan)
Small network topology (vlan)

PS: The vlan allowed to pass on the Trunk is the superimposed port trunk allow-pass vlan 10
port trunk allow-pass vlan 20 Then the allowed pass is 1 10 20

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325234840&siteId=291194637