Step 5
Add ports to the VLAN.
Run either of the following commands as needed:
l
For access ports:
Run the
port default vlan
vlan-id
command to add a port to a specified VLAN.
To add interfaces to a VLAN in a batch, perform either of the following configurations:
–
Run the
port
interface-type
{
interface-number1
[
to
interface-number2
] } &<1-10>
command in the VLAN view to add one interface or a group of interfaces to a VLAN.
–
Run the
port default vlan
vlan-id
[
step
step-number
[
increased
|
decreased
] ]
command in the port group view.
l
For trunk ports:
–
Run the
port trunk allow-pass vlan
{ {
vlan-id1
[
to
vlan-id2
] } &<1-10> |
all
}
command to add the port to specified VLANs.
–
(Optional) Run the
port trunk pvid vlan
vlan-id
command to specify the default VLAN
for a trunk interface.
To add interfaces to a VLAN in a batch, run the
port trunk allow-pass vlan
vlan-id
[
step
step-number
[
increased
|
decreased
] ] command in the port group view.
l
For hybrid ports:
–
Run either of the following commands to add a port to VLANs in untagged or tagged
mode:
–
Run the
port hybrid untagged vlan
{ {
vlan-id1
[
to
vlan-id2
] } &<1-10> |
all
}
command to add a port to VLANs in untagged mode.
In untagged mode, a port removes tags from frames and then forwards the frames.
This is applicable to scenarios in which Ethernet ports are connected to terminals.
To add interfaces to a VLAN in a batch, run the
port hybrid untagged vlan
vlan-id
[
step
step-number
[
increased
|
decreased
] ] command in the port group view.
–
Run the
port hybrid tagged vlan
{ {
vlan-id1
[
to
vlan-id2
] } &<1-10> |
all
}
command to add a port to VLANs in tagged mode.
In tagged mode, a port forwards frames without removing their tags. This is applicable
to scenarios in which Ethernet ports are connected to industrial switch routeres.
To add interfaces to a VLAN in a batch, run the
port hybrid tagged vlan
vlan-id3
[
step
step-number
[
increased
|
decreased
] ] command in the port group view.
–
(Optional) Run the
port hybrid pvid vlan
vlan-id
command to specify the default VLAN
of a hybrid interface.
By default, all ports are added to VLAN 1.
----End
Checking the Configuration
l
Run the
display vlan
[ {
vlan-id
|
vlan-name
vlan-name
} [
verbose
] ] command to view
information about all VLANs or a specified VLAN.
3.6.2 Configuring Inter-VLAN Communication
This section describes how to configure VLANIF interfaces, sub interfaces to implement inter-
VLAN communication.
Huawei AR530&AR550 Series Industrial Switch Routers
Configuration Guide - Ethernet Switching
3 VLAN Configuration
Issue 01 (2014-11-30)
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
95