SW2Configuration:< /p>
[Huawei]sysname SW2
[SW2]vlan batch 10 20
[SW2]port-group 1
[SW2-port -group-1]group-member e0/0/1 e0/0/2//2Put one interface at the same timevlan.
[SW2-port-group-1]port link-type access
[SW2-Ethernet0/0/1]port link-type access span>
[SW2-Ethernet0/0/2]port link-type access< /p>
[SW2-port-group-1]port default vlan 10
< p>[SW2-Ethernet0/0/1]port default vlan 10
[SW2-Ethernet0/0/2]port default vlan 10
[SW2]port-group 2
[SW2-port-group-2]group-member e0/0/3 e0/0/4
[SW2-port-group-2]port hybrid pvid vlan 20
[SW2-Ethernet0/0/3]porthybridpvidvlan20
[SW2-Ethernet0/0/4]port hybrid pvid vlan 20
[SW2-port-group-2]port hybrid untagged vlan 20
[SW2-Ethernet0/0/3]port hybrid untagged vlan 20
[SW2-Ethernet0/0/4]port hybrid untagged vlan 20
[SW2]int g0/0/1//The upstream port is a relay port
[SW2-GigabitEthernet0/0/1]port hybrid tagged vlan 10 20
SW1Configuration: (three Layer switch, let it endvlan)
[Huawei]sysname SW1
[SW1]vlan batch 10 20
[SW1]int Vlan 10
[SW1-Vlanif10]ip add 192.168.10.1 24//vlanGateway
[SW1]dhcpenable//OpenDHCP< /span>
[SW1]int Vlan 10
< span style=" font-family:'Courier New';font-size:16px;">[SW1-Vlanif10]dhcp select interface
[SW1-Vlanif10]dhcp server dns-list 2.2.2.2
[SW1-Vlanif10]int vlan 20
[SW1-Vlanif20] ip add 192.168.20.1 24
[SW1-Vlanif20]dhcp select interface
ThisSW1Not only You can do the followingvlanGateway for all members, you can also For each of the followingvlanmembersIPAddress, the method of using the address pool here is also the same.
Use DHCP to obtain IP address automatically:
Can’t receive it at this timeIPAddress, yes2One reason, one is not addedVLAN, one isVLAN. Here we have already addedvlan.
[SW1 -Vlanif20]int g0/0/1
[SW1-GigabitEthernet0/0/1]port hybrid tagged vlan 10 20//Add this interfacevlan 10 20 span>
R1Configuration:
[R1]int g0 /0/2
[R1-GigabitEthernet0/0/2]ip add 12.0. 0.2 24
Whether Huawei is on the second floor Switches, Layer 3 switches, and their ports are Layer 2 ports, which cannot be configuredIP, yesVLANInternet,This is the characteristic of Huawei
SW1Configuration:
[SW 1-GigabitEthernet0/0/1]int g0/0/2
[SW1] vlan 100//Upward< span style="font-family:'Courier New';">VLAN
[SW1-vlan100]int vlan 100
[SW1-Vlanif100]int g0/0/2
[SW1-GigabitEthernet0/0/2]porthybridpvid vlan 100
[SW1-GigabitEthernet0/0/2]port hybrid untagged vlan 100< /span>
Now go toping R1It should be interoperable.