On Oracle Solaris 11 hosts, when Crossbow-based bridged networking is used, a VNIC template may be used to specify the VLAN ID to use while bridging over a network link.
The following is an example of how to use a VNIC template to
configure a VM over a VLAN. Create an
# dladm create-vnic -t -l nge0 -v 23 vboxvnic_template0
This will create a temporary VNIC template over interface
$ dladm show-link LINK CLASS MTU STATE BRIDGE OVER nge0 phys 1500 up -- -- nge1 phys 1500 down -- -- vboxvnic_template0 vnic 1500 up -- nge0 $ dladm show-vnic LINK OVER SPEED MACADDRESS MACADDRTYPE VID vboxvnic_template0 nge0 1000 2:8:20:25:12:75 random 23
Once the VNIC template is created, any VMs that need to be on VLAN
23 over the interface
VNIC templates makes managing VMs on VLANs simpler and efficient.
The VLAN details are not stored as part of every VM's
configuration but rather inherited from the VNIC template while
starting the VM. The VNIC template itself can be modified anytime
using the
VNIC templates can be created with additional properties such as bandwidth limits and CPU fanout. Refer to your Oracle Solaris network documentation for details. The additional properties are also applied to VMs which bridge using the VNIC template.