Professional Documents
Culture Documents
VLAN, Trunk, VLANIF (SVI) On Huawei Switch
VLAN, Trunk, VLANIF (SVI) On Huawei Switch
Huawei switch
Today I want to show you:
Let’s assume that we want to configure two switches, which are connected via Ethernet link.
Both switches have PCs connected to them. We want to allow PC101 to be able to reach
PC102 and PC201 to be able to reach PC202.To do so, we need to add two different VLANs,
configure Ethernet trunk between switches and add PCs to the correct VLAN.
First I have to add two VLANs 100 and 200, and describe these VLANs labnario100 and
labnario200 respectively (description is optional). Both switches should be configured at
exactly the same way, so SW2 configuration is omitted.
<labnariosw1>system-view
[labnariosw1]vlan 100
[labnariosw1-vlan100]description labnario100
[labnariosw1-vlan100]vlan 200
[labnariosw1-vlan200]description labnario200
Let’s verify VLAN configuration:
[labnariosw1]display vlan
The total number of vlans is : 3
---------------------------------------------------------------------------
-----
As the second step, I want to configure 802.1q trunk between SW1 and SW2 and filter
VLANs, which can pass through this trunk (VLAN filtering is optional):
As you see, Ge0/0/10 interface is working as a 802.1q trunk. Only VLANs 100 and 200 can
pass through this trunk link.
[labnariosw1]display vlan
The total number of vlans is : 3
---------------------------------------------------------------------------
-----
When both switches are configured, we can check if our PCs can ping each other. Remember
that PC101 and PC102 are both in a VLAN 100 and PC201 with PC202 are both in a VLAN
200. So let’s start with PC101:
PC101>ping 192.168.100.2
PC101>ping 192.168.200.1
PC101>ping 192.168.200.2
PC101 can successfully ping PC102 as both are in a VLAN 100. It can not ping PCs 201 and
202 which are configured in VLAN 200. Let’s check connectivity in VLAN 200:
PC201>ping 192.168.200.2
PC201 can successfully ping PC202. It means that our VLANs, trunk and access ports are
configured correctly.
As the last step I want to show you, how to configure VLAN interface.
[labnariosw1]ping 192.168.100.1
PING 192.168.100.1: 56 data bytes, press CTRL_C to break
Reply from 192.168.100.1: bytes=56 Sequence=1 ttl=128 time=50 ms
Reply from 192.168.100.1: bytes=56 Sequence=2 ttl=128 time=1 ms
Reply from 192.168.100.1: bytes=56 Sequence=3 ttl=128 time=20 ms
Reply from 192.168.100.1: bytes=56 Sequence=4 ttl=128 time=20 ms
Reply from 192.168.100.1: bytes=56 Sequence=5 ttl=128 time=1 ms
[labnariosw1]ping 192.168.100.2
PING 192.168.100.2: 56 data bytes, press CTRL_C to break
Reply from 192.168.100.2: bytes=56 Sequence=1 ttl=128 time=60 ms
Reply from 192.168.100.2: bytes=56 Sequence=2 ttl=128 time=10 ms
Reply from 192.168.100.2: bytes=56 Sequence=3 ttl=128 time=40 ms
Reply from 192.168.100.2: bytes=56 Sequence=4 ttl=128 time=40 ms
Reply from 192.168.100.2: bytes=56 Sequence=5 ttl=128 time=30 ms
[labnariosw1]ping 192.168.100.102
PING 192.168.100.102: 56 data bytes, press CTRL_C to break
Reply from 192.168.100.102: bytes=56 Sequence=1 ttl=255 time=30 ms
Reply from 192.168.100.102: bytes=56 Sequence=2 ttl=255 time=50 ms
Reply from 192.168.100.102: bytes=56 Sequence=3 ttl=255 time=40 ms
Reply from 192.168.100.102: bytes=56 Sequence=4 ttl=255 time=50 ms
Reply from 192.168.100.102: bytes=56 Sequence=5 ttl=255 time=40 ms