Go to main content

Managing Network Virtualization and Network Resources in Oracle® Solaris 11.3

Exit Print View

Updated: April 2018

How to Configure VNICs as VLANs

You can configure VNICs with VLAN IDs to host VLAN traffic. If a VNIC needs to be a part of a VLAN and receive traffic for that VLAN, then you need to assign the VLAN ID of that VLAN to the VNIC. You also set the link property vlan-announce to propagate the VLAN configurations of each individual VNIC to the network.

Unlike a regular VLAN link, the VNIC configured as a VLAN has its own MAC address. For information about regular VLANs, see Chapter 3, Configuring Virtual Networks by Using Virtual Local Area Networks in Managing Network Datalinks in Oracle Solaris 11.3.

This procedure contains only the steps to create the VNIC with a VLAN ID and to set the appropriate properties that enable the VNIC to service VLAN traffic. Although the intermediary ports and switches are automatically updated when you enable the vlan-announce property, the intermediary ports and switches must be separately configured to define VLANs at these points.

  1. Become an administrator.

    For more information, see Using Your Assigned Administrative Rights in Securing Users and Processes in Oracle Solaris 11.3.

  2. Create a VNIC with a VLAN ID.
    # dladm create-vnic -l link -v vid VNIC
  3. (Optional) Broadcast the VNIC's VLAN configuration to the network.
    # dladm set-linkprop -p vlan-announce=gvrp link

    This step enables a GARP VLAN Registration Protocol (GVRP) client system that automatically registers VLAN IDs with attached switches. By default, the vlan-announce property is set to off and no VLAN broadcast messages are sent to the network. After you set the property to gvrp, the VLAN configuration for that link is propagated to enable automatic VLAN port configuration of the network devices. VLAN traffic can then be accepted and forwarded by these devices. For more information about GVRP, see "Configuring GVRP," in Sun Ethernet Fabric Operating System.

  4. (Optional) Set the gvrp-timeout property to configure the wait period between VLAN broadcasts.
    # dladm set-linkprop -p gvrp-timeout=time link

    Refers to the value of the gvrp-timeout property in milliseconds. The default value is 250 milliseconds. A system with a heavy load might require a shorter interval when rebroadcasting VLAN information. This property enables you to adjust the interval.

  5. (Optional) Display the value of the properties vlan-announce and gvrp-timeout.
    # dladm show-linkprop -p vlan-announce,gvrp-timeout
Example 3  Configuring a VNIC as a VLAN

This example shows how to create a VNIC named vnic0 on the datalink net0 with a VLAN ID 123 and how to enable the VLAN configuration to be announced to the network.

# dladm create-vnic -l net0 -v 123 vnic0
# dladm set-linkprop -p vlan-announce=gvrp net0
# dladm set-linkprop -p gvrp-timeout=250 net0
# dladm show-linkprop -p vlan-announce,gvrp-timeout net0
net0     vlan-announce   rw     gvrp      gvrp         off       off,gvrp
net0     gvrp-timeout    rw     250       250          250       100-100000

The output shows the following information:


Physical datalink, identified by a name.


Property of the link. A link can have several properties.


Permissions of the property, which can be one of the following:

  • ro refers to read only permission of the link property.

  • rw refers to read and write permissions of the link property.


Current (or persistent) link property value. If the value is not set, it is shown as --. If it is unknown, the value is shown as ?.


Default value of the link property. If the link property has no default value, -- is shown.


A comma-separated list of the values that the link property can have. If the possible values are unknown or unbounded, -- is shown.