VLAN interfaces are virtual interfaces used for Layer 3 communication between different VLANs. They do
not exist as physical entities on devices. For each VLAN, you can create one VLAN interface. You can
assign the VLAN interface an IP address and specify it as the gateway of the VLAN to forward traffic
destined for an IP network segment different from that of the VLAN.
Follow these steps to configure basic settings of a VLAN interface:
To do…
Use the command…
Remarks
Enter system view
system-view
—
Create a VLAN interface and
enter VLAN interface view
interface vlan-interface
vlan-interface-id
Required
If the VLAN interface already exists, you
enter its view directly.
Assign an IP address to the
VLAN interface
ip
address
ip-address
{
mask
|
mask-length
}
Optional
No IP address is assigned to any VLAN
interface by default.
Configure the description of the
VLAN interface
description
text
Optional
VLAN interface name is used by default,
for example,
Vlan-interface1 Interface.
Bring up the VLAN interface
undo shutdown
Optional
By default, a VLAN interface is in the up
state. The VLAN interface is up as long
as one port in the VLAN is up and goes
down if all ports in the VLAN go down.
An administratively shut down VLAN
interface is in the down state until you
bring it up, regardless of how the state of
the ports in the VLAN changes.
NOTE:
Before you create a VLAN interface for a VLAN, create the VLAN.
Port-based VLAN configuration
Introduction to port-based VLAN
Port-based VLANs group VLAN members by port. A port forwards traffic for a VLAN only after it is
assigned to the VLAN.
Port link type
You can configure the link type of a port as access, trunk, or hybrid. The link types use the following
VLAN tag handling methods:
•
An access port belongs to only one VLAN and sends traffic untagged. It is usually used to connect
a terminal device unable to identify VLAN tagged-packets or when separating different VLAN
members is unnecessary.
•
A trunk port can carry multiple VLANs to receive and send traffic for them. Except traffic of the port
VLAN ID (PVID), traffic sent through a trunk port will be VLAN tagged. Usually, ports connecting
network devices are configured as trunk ports.
97