VLAN Principles
Copyright © 2019 Huawei Technologies Co., Ltd. All rights reserved.
Page 0
Copyright © 2019 Huawei Technologies Co., Ltd. All rights reserved.
Foreword
Page 1
Copyright © 2019 Huawei Technologies Co., Ltd. All rights reserved.
Objectives
Page 2
Copyright © 2019 Huawei Technologies Co., Ltd. All rights reserved.
LAN Limitations
Page 3
Copyright © 2019 Huawei Technologies Co., Ltd. All rights reserved.
VLAN Technology
Group 1
Group 2
Page 4
Copyright © 2019 Huawei Technologies Co., Ltd. All rights reserved.
VLAN Frame Format
Untagged frame
Tagged frame
0x8100 | PCP | DEI | VLAN ID(12b) |
2 bytes
2 bytes
DMAC
Data
SMAC
Type
FCS
6 bytes
6 bytes
2 bytes
46-1500 bytes
4 bytes
DMAC
Data
SMAC
Type
FCS
6 bytes
6 bytes
2 bytes
46-1500 bytes
4 bytes
Tag
TPID
TCI
Page 5
Copyright © 2019 Huawei Technologies Co., Ltd. All rights reserved.
Link Types
Trunk
Access
VLAN3
VLAN2
Page 6
Copyright © 2019 Huawei Technologies Co., Ltd. All rights reserved.
Port VLAN ID
PVID1
PVID2
PVID2
PVID3
PVID3
PVID1
Page 7
Copyright © 2019 Huawei Technologies Co., Ltd. All rights reserved.
Port Types – Access
Host A
Host C
Host B
Untagged
Untagged
PVID10
PVID10
PVID2
Frame
10
Page 8
Copyright © 2019 Huawei Technologies Co., Ltd. All rights reserved.
Port Types – Trunk
Host A
Host C
Host B
Host D
Untagged
Untagged
Frame
20
Untagged
SWA
SWB
Untagged
Untagged
PVID10
PVID20
PVID10
PVID20
PVID10
PVID10
Page 9
Copyright © 2019 Huawei Technologies Co., Ltd. All rights reserved.
Port Types – Hybrid
PVID10
Host A
Host C
Host B
Host D
Untagged
PVID10
Frame
20
Untagged
SWA
SWB
Untagged
Untagged
PVID10
PVID20
PVID10
PVID20
Hybrid Untagged
Hybrid Tagged
Untagged
Frame
10
Page 10
Copyright © 2019 Huawei Technologies Co., Ltd. All rights reserved.
VLAN Assignment Methods
Assignment Method | VLAN 5 | VLAN 10 |
Port based | G0/0/1, G0/0/7 | G0/0/2 G0/0/9 |
MAC based | 00-01-02-03-04-AA 00-01-02-03-04-CC | 00-01-02-03-04-BB 00-01-02-03-04-DD |
IP Subnet based | 10.0.1.* | 10.0.2.* |
Protocol based | IP | IPX |
Policy based | 10.0.1.* + G0/0/1+ 00-01-02-03-04-AA | 10.0.2.* + G0/0/2 + 00-01-02-03-04-BB |
G0/0/1
Host A
10.0.1.1
Host D
10.0.2.2
Host B
10.0.2.1
Host C
10.0.1.2
G0/0/2
G0/0/7
G0/0/9
SWA
Page 11
Copyright © 2019 Huawei Technologies Co., Ltd. All rights reserved.
Creating VLANs
Page 12
[SWA]vlan 10
[SWA-vlan10]quit
[SWA]vlan batch 2 to 3
Info: This operation may take a few seconds. Please wait for a moment...done.
Host A
Host D
Host B
Host C
SWA
SWB
Page 12
Copyright © 2019 Huawei Technologies Co., Ltd. All rights reserved.
Creating VLANs
[SWA]display vlan
The total number of vlans is : 4
------------------------------------------------------------
U:Up; D:Down; TG:Tagged; UT:Untagged; MP:Vlan-mapping; ST:Vlan-stacking; #: ProtocolTransparent-vlan; *:Management-vlan;
--------------------------------------------------------------
VID Type Ports
--------------------------------------------------------------
1 common UT:GE0/0/1(U) ……
2 common
3 common
……
Page 13
Copyright © 2019 Huawei Technologies Co., Ltd. All rights reserved.
Setting the Port Link Type
[SWA]interface GigabitEthernet 0/0/1
[SWA-GigabitEthernet0/0/1]port link-type trunk
[SWA-GigabitEthernet0/0/1]quit
[SWA]interface GigabitEthernet 0/0/5
[SWA-GigabitEthernet0/0/5]port link-type access
SWA
SWB
G0/0/1
G0/0/7
G0/0/5
Host A
Host D
Host B
Host C
Page 14
Copyright © 2019 Huawei Technologies Co., Ltd. All rights reserved.
Assigning Ports to VLANs
[SWA]vlan 2
[SWA-vlan2]port GigabitEthernet 0/0/7
[SWA-vlan2]quit
[SWA]interface GigabitEthernet 0/0/5
[SWA-GigabitEthernet0/0/5]port link-type access
[SWA-GigabitEthernet0/0/5]port default vlan 3
SWA
SWB
G0/0/1
G0/0/7
G0/0/5
Host A
Host D
Host B
Host C
Page 15
Copyright © 2019 Huawei Technologies Co., Ltd. All rights reserved.
Verifying VLAN Assignment
[SWA]display vlan
The total number of vlans is : 4
------------------------------------------------------------
U:Up; D:Down; TG:Tagged; UT:Untagged; MP:Vlan-mapping; ST:Vlan-stacking; #: ProtocolTransparent-vlan; *:Management-vlan;
--------------------------------------------------------------
VID Type Ports
--------------------------------------------------------------
1 common UT:GE0/0/1(U) ……
2 common UT:GE0/0/7(D)
10 common
……
Page 16
Copyright © 2019 Huawei Technologies Co., Ltd. All rights reserved.
Forwarding Over the Trunk
[SWA-GigabitEthernet0/0/1]port link-type trunk
[SWA-GigabitEthernet0/0/1]port trunk pvid vlan 10
[SWA-GigabitEthernet0/0/1]port trunk allow-pass vlan 2 3
SWA
SWB
G0/0/1
G0/0/1
Host A
Host D
Host B
Host C
Page 17
Copyright © 2019 Huawei Technologies Co., Ltd. All rights reserved.
Forwarding Over the Trunk
[SWA]display vlan
The total number of vlans is : 4
------------------------------------------------------------
U:Up; D:Down; TG:Tagged; UT:Untagged; MP:Vlan-mapping; ST:Vlan-stacking; #: ProtocolTransparent-vlan; *:Management-vlan;
--------------------------------------------------------------
VID Type Ports
--------------------------------------------------------------
1 common UT:GE0/0/1(U) ……
2 common UT:GE0/0/7(D) TG:GE0/0/1(U)
10 common
……
Page 18
Copyright © 2019 Huawei Technologies Co., Ltd. All rights reserved.
Configuring Hybrid Ports
[SWA-GigabitEthernet0/0/5]port link-type hybrid
[SWA-GigabitEthernet0/0/5]port hybrid pvid vlan 3
[SWA-GigabitEthernet0/0/5]port hybrid untagged vlan 3
[SWA-GigabitEthernet0/0/7]port link-type hybrid
[SWA-GigabitEthernet0/0/7]port hybrid pvid vlan 2
[SWA-GigabitEthernet0/0/7]port hybrid untagged vlan 2
SWA
SWB
G0/0/1
G0/0/1
Host A
Host D
Host B
Host C
G0/0/7
G0/0/5
Page 19
Copyright © 2019 Huawei Technologies Co., Ltd. All rights reserved.
Configuring Hybrid Ports
SWA
SWB
G0/0/1
G0/0/1
Host A
Host D
Host B
Host C
G0/0/7
G0/0/5
[SWA-GigabitEthernet0/0/1]port link-type hybrid
[SWA-GigabitEthernet0/0/1]port hybrid tagged vlan 2 to 3
Page 20
Copyright © 2019 Huawei Technologies Co., Ltd. All rights reserved.
Configuration Validation
[SWA]display vlan
The total number of vlans is : 4
------------------------------------------------------------
U:Up; D:Down; TG:Tagged; UT:Untagged; MP:Vlan-mapping; ST:Vlan-stacking; #: ProtocolTransparent-vlan; *:Management-vlan;
--------------------------------------------------------------
VID Type Ports
--------------------------------------------------------------
1 common UT:GE0/0/1(U) ……
2 common UT:GE0/0/7(D)
TG:GE0/0/1(U)
3 common UT:GE0/0/5(U)
TG:GE0/0/1(U)
10 common
……
Page 21
Copyright © 2019 Huawei Technologies Co., Ltd. All rights reserved.
Configuring Hybrid Ports
[SWB-GigabitEthernet0/0/4]port link-type hybrid
[SWB-GigabitEthernet0/0/4]port hybrid pvid vlan 3
[SWB-GigabitEthernet0/0/4]port hybrid untagged vlan 2 to 3
SWA
SWB
G0/0/1
G0/0/1
Host A
Host D
Host B
Host C
G0/0/7
G0/0/5
G0/0/4
Page 22
Copyright © 2019 Huawei Technologies Co., Ltd. All rights reserved.
Configuration Validation
[SWB]display vlan
The total number of vlans is : 3
------------------------------------------------------------
U:Up; D:Down; TG:Tagged; UT:Untagged; MP:Vlan-mapping; ST:Vlan-stacking; #: ProtocolTransparent-vlan; *:Management-vlan;
--------------------------------------------------------------
VID Type Ports
--------------------------------------------------------------
1 common UT:GE0/0/1(U) ……
2 common UT:GE0/0/4(U)
Page 23
Copyright © 2019 Huawei Technologies Co., Ltd. All rights reserved.
Voice VLAN Application
SWB
Host A
SWA
VoIP
IPTV
G0/0/1
MAC: 0011-2200-0001
MAC: 0011-2200-0002
Page 24
Copyright © 2019 Huawei Technologies Co., Ltd. All rights reserved.
Voice VLAN Configuration
[SWB]vlan 2
[SWB-vlan2]interface GigabitEthernet 0/0/1
[SWB-GigabitEthernet0/0/1]voice-vlan 2 enable
[SWB-GigabitEthernet0/0/1]voice-vlan mode auto
[SWB-GigabitEthernet0/0/1]quit
[SWB]voice-vlan mac-address 0011-2200-0000 mask ffff-ff00-0000
SWB
Host A
SWA
VoIP
IPTV
G0/0/1
MAC: 0011-2200-0001
MAC: 0012-2400-0002
Page 25
Copyright © 2019 Huawei Technologies Co., Ltd. All rights reserved.
Configuration Validation
[SWB]display voice-vlan status
Voice VLAN Configurations:
-----------------------------------------------------------
Voice VLAN ID : 2
Voice VLAN status : Enable
Voice VLAN aging time : 1440(minutes)
Voice VLAN 8021p remark : 6
Voice VLAN dscp remark : 46
-----------------------------------------------------------
Port Information:
-----------------------------------------------------------
Port Add-Mode Security-Mode Legacy
-----------------------------------------------------------
GigabitEthernet0/0/1 Auto Security Disable
Page 26
Copyright © 2019 Huawei Technologies Co., Ltd. All rights reserved.
Summary
Page 27
Copyright © 2019 Huawei Technologies Co., Ltd. All rights reserved.
www.huawei.com
Thank You
Page 28
Copyright © 2019 Huawei Technologies Co., Ltd. All rights reserved.