You are on page 1of 29

VLAN Principles

HUAWEI TECHNOLOGIES CO., LTD.

Foreword
A Virtual Local Area Network (VLAN) represents a form of administrative
network that defines a logical grouping of hosts or end system devices
that are not limited to a physical location, and may be defined based on a
wide range of parameters that allow for a greater flexibility in the way that
logical groups are defined. The application of VLAN technology has
expanded to support many aspects of enterprise networking as a means
of logical data flow management and isolation.

Copyright 2014 Huawei Technologies Co., Ltd. All rights reserved.

Page 2

Objectives
Upon completion of this section, trainees will be able to:

Explain the application of VLAN tagging.

Describe the different port link types and characteristics.

Successfully establish port based VLANs.

Copyright 2014 Huawei Technologies Co., Ltd. All rights reserved.

Page 3

LAN Limitations

No

broadcast domain to manage expanding local networks.

Copyright 2014 Huawei Technologies Co., Ltd. All rights reserved.

Page 4

VLAN Technology

Group 2
Group 1

A VLAN

enables logical isolation of traffic at the data link layer.

Copyright 2014 Huawei Technologies Co., Ltd. All rights reserved.

Page 5

VLAN Frame Format


6 bytes

DMAC

6 bytes

DMAC

6 bytes

SMAC

2 bytes

0x8100

2 bytes

Tag

FCS

46-1500 bytes

Type

PCP

DEI

Data

Untagged frame

4 bytes

FCS

Tagged frame

VLAN ID 12b

TPID

TCI

2 bytes

2 bytes

A VLAN

4 bytes

Data

Type

6 bytes

SMAC

46-1500 bytes

tag is inserted to distinguish frames for each VLAN.

Copyright 2014 Huawei Technologies Co., Ltd. All rights reserved.

Page 6

Link Types

Trunk

Access

VLAN2

A trunk

VLAN3

represents a backbone for the transmission of VLAN

traffic between switches.


Copyright 2014 Huawei Technologies Co., Ltd. All rights reserved.

Page 7

Port VLAN ID

PVID1
PVID2

PVID
The

PVID3

PVID1
PVID2

PVID3

represents the default VLAN for each interface.

PVID is set to VLAN 1 for all ports by default.

Copyright 2014 Huawei Technologies Co., Ltd. All rights reserved.

Page 8

Port Types Access


10

Frame

PVID10

t
Un

Host A

Access

d
ge
g
a

PVID10
PVID2
t
Un

Host B

d
ge
g
a

Host C

ports remove VLAN tags before forwarding frames.

Copyright 2014 Huawei Technologies Co., Ltd. All rights reserved.

Page 9

Port Types Trunk

SWA

SWB

Untagged
PVID10

Un
ta
gg
ed

PVID20

ed
gg

All

Host B

PVID10

Frame

a
nt
U

Frames

20

d
ge
ag

Host A

PVID20
t
Un

Un
ta
gg
ed

PVID10

PVID10

Host C

Host D

carried over a trunk link may be tagged or untagged.

VLANs must be permitted before being carried over a trunk.

Copyright 2014 Huawei Technologies Co., Ltd. All rights reserved.

Page 10

Port Types-Hybrid
Hybrid Untagged
SWA

10

SWB

Frame

PVID10
20

PVID10

Frame

PVID20
a
nt
U
ed
gg

t
Un

d
ge
ag

Un
ta
gg
ed

PVID20

PVID10

t
Un

Un
ta
gg
ed

PVID10

Hybrid Tagged

d
ge
ag

Host A

Host B

Hybrid
VLAN

Host C

Host D

ports are defined as either tagged or untagged

communication can be managed on a port by port basis.

Copyright 2014 Huawei Technologies Co., Ltd. All rights reserved.

Page 11

VLAN Assignment Methods

/2

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

/9

G0/0

/0
G0

Host B
10.0.2.1

/7

Host A
10.0.1.1

G0/0

G0
/0

/1

SWA

Host C
10.0.1.2

Host D
10.0.2.2

Five

methods of VLAN assignment are possible.

Port

based VLAN assignment is the default assignment method.

Copyright 2014 Huawei Technologies Co., Ltd. All rights reserved.

Page 12

Creating VLANs
SWA

Host A

SWB

Host B

Host C

Host D

[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.

Copyright 2014 Huawei Technologies Co., Ltd. All rights reserved.

Page 13

Creating VLANs
[SWA]display
[SWA]display vlan
vlan
The
The total
total number
number of
of vlans
vlans is
is :: 44
----------------------------------------------------------------------------------------------------------------------U:Up;
U:Up; D:Down;
D:Down; TG:Tagged;
TG:Tagged; UT:Untagged;
UT:Untagged; MP:Vlan-mapping;
MP:Vlan-mapping;
ST:Vlan-stacking;
ST:Vlan-stacking; #:
#: ProtocolTransparent-vlan;
ProtocolTransparent-vlan; *:Management*:Managementvlan;
vlan;
--------------------------------------------------------------------------------------------------------------------------VID
Ports
VID Type
Type
Ports
--------------------------------------------------------------------------------------------------------------------------11
22

common
common UT:GE0/0/1(U)
UT:GE0/0/1(U)

common
common

33
10
10

common
common
common
common

Copyright 2014 Huawei Technologies Co., Ltd. All rights reserved.

Page 14

Setting the Port Link Type


SWA

SWB
G0/0/1

G0/0/5

Host A

G0/0/7

Host B

Host C

Host D

[SWA]interface GigabitEthernet 0/0/1


[SWA-GigabitEthernet0/0/1]port link-type trunk
[SWA-GigabitEthernet0/0/1]interface GigabitEthernet 0/0/5
[SWA-GigabitEthernet0/0/5]port link-type access

Copyright 2014 Huawei Technologies Co., Ltd. All rights reserved.

Page 15

Assigning Ports to VLANs


SWA

SWB
G0/0/1

G0/0/5

Host A

G0/0/7

Host B

Host C

Host D

[SWA]vlan 2
[SWA-vlan2]port GigabitEthernet 0/0/7
[SWA-vlan2]quit
[SWA-GigabitEthernet0/0/5]port link-type access
[SWA-GigabitEthernet0/0/5]port default vlan 3

Copyright 2014 Huawei Technologies Co., Ltd. All rights reserved.

Page 16

Verifying VLAN Assignment


[SWA]display
[SWA]display vlan
vlan
The
The total
total number
number of
of vlans
vlans is
is :: 44
----------------------------------------------------------------------------------------------------------------------U:Up;
U:Up; D:Down;
D:Down; TG:Tagged;
TG:Tagged; UT:Untagged;
UT:Untagged; MP:Vlan-mapping;
MP:Vlan-mapping;
ST:Vlan-stacking;
ST:Vlan-stacking; #:
#: ProtocolTransparent-vlan;
ProtocolTransparent-vlan; *:Management*:Managementvlan;
vlan;
--------------------------------------------------------------------------------------------------------------------------VID
Ports
VID Type
Type
Ports
--------------------------------------------------------------------------------------------------------------------------11
22
33
10
10

common
common UT:GE0/0/1(U)
UT:GE0/0/1(U)

common
common UT:GE0/0/7(D)
UT:GE0/0/7(D)
common
common UT:GE0/0/5(U)
UT:GE0/0/5(U)
common
common

Copyright 2014 Huawei Technologies Co., Ltd. All rights reserved.

Page 17

Forwarding Over the Trunk


SWA

SWB
G0/0/1

Host A

Host B

G0/0/1

Host C

Host D

[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

Copyright 2014 Huawei Technologies Co., Ltd. All rights reserved.

Page 18

Forwarding Over the Trunk


[SWA]display
[SWA]display vlan
vlan
The
The total
total number
number of
of vlans
vlans is
is :: 44
----------------------------------------------------------------------------------------------------------------------U:Up;
U:Up; D:Down;
D:Down; TG:Tagged;
TG:Tagged; UT:Untagged;
UT:Untagged; MP:Vlan-mapping;
MP:Vlan-mapping;
ST:Vlan-stacking;
ST:Vlan-stacking; #:
#: ProtocolTransparent-vlan;
ProtocolTransparent-vlan; *:Management*:Managementvlan;
vlan;
--------------------------------------------------------------------------------------------------------------------------VID
Ports
VID Type
Type
Ports
--------------------------------------------------------------------------------------------------------------------------11
22
33
10
10

common
common UT:GE0/0/1(U)
UT:GE0/0/1(U)

common
common UT:GE0/0/7(D)
UT:GE0/0/7(D) TG:GE0/0/1(U)
TG:GE0/0/1(U)
common
common UT:GE0/0/5(U)
UT:GE0/0/5(U) TG:GE0/0/1(U)
TG:GE0/0/1(U)
common
common

Copyright 2014 Huawei Technologies Co., Ltd. All rights reserved.

Page 19

Configuring Hybrid Ports


SWA

SWB
G0/0/1

G0/0/5

Host A

G0/0/1

G0/0/7

Host B

Host C

Host D

[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
Copyright 2014 Huawei Technologies Co., Ltd. All rights reserved.

Page 20

Configuring Hybrid Ports


SWA

SWB
G0/0/1

G0/0/5

Host A

G0/0/1

G0/0/7

Host B

Host C

Host D

[SWA-GigabitEthernet0/0/1]port link-type hybrid


[SWA-GigabitEthernet0/0/1]port hybrid tagged vlan 2 to 3

Trunk

links using the hybrid port link-type must enable tagging

of VLAN frames before forwarding.


Copyright 2014 Huawei Technologies Co., Ltd. All rights reserved.

Page 21

Configuration Validation
[SWA]display
[SWA]display vlan
vlan
The
The total
total number
number of
of vlans
vlans is
is :: 44
----------------------------------------------------------------------------------------------------------------------U:Up;
U:Up; D:Down;
D:Down; TG:Tagged;
TG:Tagged; UT:Untagged;
UT:Untagged; MP:Vlan-mapping;
MP:Vlan-mapping; ST:VlanST:Vlanstacking;
stacking; #:
#: ProtocolTransparent-vlan;
ProtocolTransparent-vlan; *:Management-vlan;
*:Management-vlan;
--------------------------------------------------------------------------------------------------------------------------VID
Ports
VID Type
Type
Ports
--------------------------------------------------------------------------------------------------------------------------11
common
common UT:GE0/0/1(U)
UT:GE0/0/1(U)

22

common
common UT:GE0/0/7(D)
UT:GE0/0/7(D)
TG:GE0/0/1(U)
TG:GE0/0/1(U)

33

common
common UT:GE0/0/5(U)
UT:GE0/0/5(U)
TG:GE0/0/1(U)
TG:GE0/0/1(U)

10
10

common
common

Copyright 2014 Huawei Technologies Co., Ltd. All rights reserved.

Page 22

Configuring Hybrid Ports


SWA

SWB
G0/0/1

G0/0/5

Host A

G0/0/1

G0/0/7

Host B

G0/0/4

Host C

Host D

[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

Hybrid

ports can be configured to receive VLAN traffic from

multiple VLANs by simply removing the tag at the port interface.


Copyright 2014 Huawei Technologies Co., Ltd. All rights reserved.

Page 23

Configuration Validation
[SWB]display
[SWB]display vlan
vlan
The
The total
total number
number of
of vlans
vlans is
is :: 33
----------------------------------------------------------------------------------------------------------------------U:Up;
U:Up; D:Down;
D:Down; TG:Tagged;
TG:Tagged; UT:Untagged;
UT:Untagged; MP:Vlan-mapping;
MP:Vlan-mapping; ST:VlanST:Vlanstacking;
stacking; #:
#: ProtocolTransparent-vlan;
ProtocolTransparent-vlan; *:Management-vlan;
*:Management-vlan;
--------------------------------------------------------------------------------------------------------------------------VID
Ports
VID Type
Type
Ports
--------------------------------------------------------------------------------------------------------------------------11
common
common UT:GE0/0/1(U)
UT:GE0/0/1(U)

22
33
44

common
common UT:GE0/0/4(U)
UT:GE0/0/4(U)
common
common UT:GE0/0/4(U)
UT:GE0/0/4(U)

Copyright 2014 Huawei Technologies Co., Ltd. All rights reserved.

Page 24

Voice VLAN Application


SWA

SWB
G0/0/1

Host A

Voice

VoIP
MAC: 0011-2200-0001

IPTV
MAC: 0011-2200-0002

VLANs are used to distinguish, isolate and prioritize voice

traffic over service traffic as a means of quality assurance.


Copyright 2014 Huawei Technologies Co., Ltd. All rights reserved.

Page 25

Voice VLAN Configuration


SWA

SWB
G0/0/1

Host A

VoIP
MAC: 0011-2200-0001

IPTV
MAC: 0012-2400-0002

[SWB]vlan 2
[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
Copyright 2014 Huawei Technologies Co., Ltd. All rights reserved.

Page 26

Configuration Validation
[SWB]display
[SWB]display voice-vlan
voice-vlan status
status
Voice
Voice VLAN
VLAN Configurations:
Configurations:
--------------------------------------------------------------------------------------------------------------------Voice
:: 22
Voice VLAN
VLAN ID
ID
Voice
Voice
Voice
Voice

VLAN
VLAN
VLAN
VLAN

Voice
Voice
Voice
Voice

VLAN
VLAN
VLAN
VLAN

status
status
aging
aging time
time

::
::

Enable
Enable
1440(minutes)
1440(minutes)

8021p
8021p remark
remark :: 66
dscp
:: 46
dscp remark
remark
46
--------------------------------------------------------------------------------------------------------------------Port
Port Information:
Information:
--------------------------------------------------------------------------------------------------------------------Port
Add-Mode
Port
Add-Mode Security-Mode
Security-Mode Legacy
Legacy
--------------------------------------------------------------------------------------------------------------------GigabitEthernet0/0/1
GigabitEthernet0/0/1

Auto
Auto

Security
Security

Copyright 2014 Huawei Technologies Co., Ltd. All rights reserved.

Disable
Disable

Page 27

Summary
If a trunk link has a PVID of 5 and the command port trunk allow-pass
vlan 2 3 is used, which VLAN traffic will be carried over the trunk?
What action will be taken by an access port with a PVID of 2 when
receiving an untagged frame?

Copyright 2014 Huawei Technologies Co., Ltd. All rights reserved.

Page 28

Thank you
www.huawei.com