Table of ContentsView in Frames

Creating a VLAN

You can create a VLAN for ease of administration, confinement of broadcast domains, reduced network traffic, and enforcement of security policies. You can use the vlan create command to include an interface in one or more VLANs as specified by the VLAN identifier, enable VLAN tagging, and optionally enable GVRP.

About this task

Step

  1. Enter the following command: vlan create [-g {on|off}] ifname vlanid
    -g enables (on) or disables (off) GVRP on an interface. By default, GVRP is disabled on the interface.
    ifname is the name of the network interface.
    vlanid is the VLAN identifier to which the ifname interface belongs. You can include a list of VLAN identifiers.

Example: Creating and naming of VLAN interfaces

Create VLANs with identifiers 10, 20, and 30 on the interface e4 of a storage system by using the following command: vlan create e4 10 20 30

As a result, VLAN interfaces e4-10, e4-20, and e4-30 are created. The ifconfig command output displays e4 as a VLAN interface as follows:
ifconfig -a
e0a: flags=0x80e08866<BROADCAST,RUNNING,MULTICAST,VLAN> mtu 1500
ether 00:0c:29:56:54:7e (auto-1000t-fd-up) flowcontrol full

The following example displays the truncation of the base interface name when creating a VLAN. To create a VLAN on the interface group "reallylongname," enter the following command: vlan create reallylongname 100

The resulting VLAN name is "reallylongn-100". The base interface name is truncated and the VLAN name is restricted to 15 characters. When you edit the /etc/rc file, ensure that you enter the truncated VLAN name.

After you finish

You must configure the VLAN interface by using the ifconfig command.