You can configure VNICs with VLAN IDs to host VLAN traffic. As part of this configuration, 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 4, Configuring Virtual Networks by Using Virtual Local Area Networks in Managing Network Datalinks in Oracle Solaris 11.4.
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. The intermediary ports and switches are automatically updated when you enable the vlan-announce property. However, you must still configure these intermediary ports and switches must be separately to define VLANs at these points.
Before You Begin
Ensure that your role has the appropriate rights profile to perform this procedure. See Using Rights Profiles to Perform Network Configuration.
$ dladm create-vnic -l link -v vid VNIC
$ 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, VLAN Administration Guide.
$ dladm set-linkprop -p gvrp-timeout=time link
The default value is 250 milliseconds. A system with a heavy load might require a shorter interval when rebroadcasting VLAN information.
$ dladm show-linkprop -p vlan-announce,gvrp-timeout
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 LINK PROPERTY PERM VALUE EFFECTIVE DEFAULT POSSIBLE 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 either read-only or read-write.
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.