Sei sulla pagina 1di 19

VLAN Principles and

Configuration

www.huawei.com

HUAWEI TECHNOLOGIES CO., LTD. All rights reserved


VLAN technology provides flexible
control for Ethernet, and is applied
widely.

HUAWEI TECHNOLOGIES CO., LTD.. All rights reserved Page 2


Upon completion of this section, you should
expect to:
Understand the need for VLANs
Understand the role of the VLAN tag
Acquire sufficient knowledge to explain
behavior surrounding VLAN tagging
Acquire sufficient knowledge to
implement VLANs
T

HUAWEI TECHNOLOGIES CO., LTD.. All rights reserved Page 3


Chapter 1 VLAN Overview

Chapter 2 VLAN Tag Application

HUAWEI TECHNOLOGIES CO., LTD.. All rights reserved Page 4


VLAN Generation
The Ethernet lacks forwarding control methods .

B C
A

T
User I do not want
AdministratorB
to receive broadcast
cannot access A
packets from C

HUAWEI TECHNOLOGIES CO., LTD.. All rights reserved Page 5


The Aim of VLAN

Group 2 T
Group 1

HUAWEI TECHNOLOGIES CO., LTD.. All rights reserved Page 6


Implement a VLAN with Tags

5
Permit VLAN 1 only

A T
B

HUAWEI TECHNOLOGIES CO., LTD.. All rights reserved Page 7


VLAN Tag

6B 6B 2B 64-1500B 4B
DA SA TYPE DATA FCS Untagged frame

6B 6B 4B 2B 64-1500B 4B
DA SA TAG TYPE DATA FCS Tagged frame

2B 2B

C
0x8100 PRI F VLAN ID12b
I T

TPID TCI

HUAWEI TECHNOLOGIES CO., LTD.. All rights reserved Page 8


How to Generate VLAN Tag

Port PVID
Port 1 Port 10 Port1 5
Port 2 Port 7
Port2 10

Port7 5

Port10 10
Host A Host C
Host B Host D
T

HUAWEI TECHNOLOGIES CO., LTD.. All rights reserved Page 9


Chapter 1 VLAN Overview

Chapter 2 VLAN Tag Application

HUAWEI TECHNOLOGIES CO., LTD.. All rights reserved Page 10


VLAN Forwarding Procedure
Receive frame
from peer
Y
Tagged?
N
Use its own
Add PVID
vlan id

Switch has Y
created the
VLAN?
N Destination
N port allows the
T
VLAN to pass
Discard Y
forward/tag operation

HUAWEI TECHNOLOGIES CO., LTD.. All rights reserved Page 11


Access Port VLAN Attribute

[Quidway]display port vlan active GigabitEthernet 0/0/1


T=TAG U=UNTAG
-------------------------------------------------------------------------------
Port Link Type PVID VLAN List
-------------------------------------------------------------------------------
A VLAN whose VLANID
GE0/0/1 access 2 U: 2 that is the same as the
PVID is untagged

The default VLAN is 2,


Access portused to untagged frames will be T
connect host forwarded after tag is added

HUAWEI TECHNOLOGIES CO., LTD.. All rights reserved Page 12


Access Port

SWA \\configure port type


[SWA-Ethernet0/1]port link-type access
Port-0/1 : VLAN-3 [SWA-Ethernet0/2]port link-type access

\\create VLAN
[SWA]vlan 3
Port-0/2 : VLAN-5
[SWA]vlan 5

\\set port PVID


[SWA-Ethernet0/1]port default vlan 3
[SWA-Ethernet0/2]port default vlan 5

HUAWEI TECHNOLOGIES CO., LTD.. All rights reserved Page 13


Trunk port VLAN Attribute

[Quidway]display port vlan active Ethernet 0/3


T=TAG U=UNTAG
-------------------------------------------------------------------------------
Port Link Type PVID VLAN List
-------------------------------------------------------------------------------
E0/3 trunk 3 U: 3 Permit multiple
T: 5 VLANs to pass

Used to connect T
After receiving untagged frame,
switches and other tag with PVID 3
network devices

HUAWEI TECHNOLOGIES CO., LTD.. All rights reserved Page 14


Trunk Port

SWA SWB
Port-0/3 Port-0/3

\\create VLAN
[SWA]vlan 3
[SWA]vlan 5

\\configure port type


[SWA-Ethernet0/3]port link-type trunk

\\configure Trunk-Link port PVID


[SWA-Ethernet0/3]port trunk pvid vlan 3 T
\\configure VLAN permitted by Trunk-Linkpermitted VLAN
[SWA-Ethernet0/3]port trunk allow-pass vlan 5

HUAWEI TECHNOLOGIES CO., LTD.. All rights reserved Page 15


Hybrid Port VLAN Attribute
[Quidway]display port vlan active Ethernet 0/3
T=TAG U=UNTAG

-------------------------------------------------------------------------------

Port Link Type PVID VLAN List

-------------------------------------------------------------------------------

E0/3 hybrid 5 U: 1 4

T: 3

T
Forward frame Forward after
as Trunk port removing the tag

HUAWEI TECHNOLOGIES CO., LTD.. All rights reserved Page 16


Hybrid Port

[Quidway-Ethernet1/0/1]port link-type hybrid


[Quidway-Ethernet1/0/1]port hybrid pvid vlan 2
[Quidway-Ethernet1/0/1]port hybrid untagged vlan 2 99
Eth2/0/0
[Quidway-Ethernet1/0/24]port link-type hybrid
[Quidway-Ethernet1/0/24]port hybrid pvid vlan 3
[Quidway-Ethernet1/0/24]port hybrid untagged vlan 3 99
Eth1/0/1 Eth1/0/24

[Quidway-Ethernet2/0/0]port link-type hybrid


[Quidway-Ethernet2/0/0]port hybrid pvid vlan 99
[Quidway-Ethernet2/0/0]port hybrid untagged vlan 2 to 3 99
T

HUAWEI TECHNOLOGIES CO., LTD.. All rights reserved Page 17


Port VLAN Attribute Dynamic Configuration

Addition of VLAN attributes on transition switch


Manual configuration Manual /
Automatic
Adapts to small-scale networks configuration
Automatic configuration VLAN

GVRP Trunk SWB Trunk

VLAN-2 VLAN-2
SWA SWC
T

PC-1 PC-2

HUAWEI TECHNOLOGIES CO., LTD.. All rights reserved Page 18


Summary

How many port types does a Huawei


switch support?
Must a frame be tagged when sent
from a trunk port to peer devices?

HUAWEI TECHNOLOGIES CO., LTD.. All rights reserved Page 19

Potrebbero piacerti anche