
4
Configure basic settings of a VLAN interface
VLAN interface overview
For hosts of different VLANs to communicate, you must use a router or Layer 3 switch to perform layer 3
forwarding. To achieve this, VLAN interfaces are used.
VLAN interfaces are Layer 3 virtual interfaces used for Layer 3 interoperability between different VLANs.
Each VLAN corresponds to one VLAN interface. After you assign an IP address to a VLAN interface, this
interface can serve as the gateway for the network devices in the VLAN and allows IP address-based
Layer 3 forwarding.
Configuration procedure
To perform basic VLAN interface configuration:
Step Command
Remarks
1.
Enter system view.
system-view
N/A
2.
Create a VLAN interface
and enter VLAN interface
view.
interface vlan-interface
vlan-interface-id
This command leads you to VLAN interface
view if the VLAN interface already exists.
3.
Configure an IP address
for the VLAN interface.
ip
address
ip-address
{
mask
|
mask-length
} [
sub
]
Optional.
Not configured by default
4.
Specify the description of
the VLAN interface.
description
text
Optional.
By default, VLAN interface name is used. For
example,
Vlan-interface1 Interface
.
5.
Set the MTU for the VLAN
interface.
mtu
size
Optional.
By default, the MTU is 1500 bytes.
6.
Restore the default
settings for the VLAN
interface.
default
Optional.
7.
Bring up the VLAN
interface.
undo shutdown
Optional.
By default, a VLAN interface is up. The VLAN
interface is up if one or more ports in the
VLAN is up, and goes down if all ports in the
VLAN go down.
A VLAN interface shut down with the
shutdown
command, however, will be in the
DOWN (Administratively) state until you
bring it up, regardless of how the state of the
ports in the VLAN changes.
NOTE:
Before creating a VLAN interface, make sure that the corresponding VLAN already exists. Otherwise, the
specified VLAN interface will not be created.