Logical Domains 1.2 Administration Guide

ProcedureAssign VLANs to a Virtual Switch and Virtual Network Device

  1. Assign the virtual switch (vsw) to two VLANs, for example. Configure VLAN 21 as untagged and VLAN 20 as tagged. Assign the virtual network (vnet) to three VLANs, for example. Configure VLAN 20 as untagged and VLAN 21 and 22 as tagged.


    # ldm add-vsw net-dev=e1000g0 pvid=21 vid=20 primary-vsw0 primary
    # ldm add-vnet pvid=20 vid=21,22 vnet01 primary-vsw0 ldom1
    
  2. Plumb the VLAN interfaces.

    This example assumes that the instance number of these devices is 0 in the domains and the VLANs are mapped to these subnets:

    VLAN 

    Subnet 

    20 

    192.168.1.0 (netmask: 255.255.255.0) 

    21 

    192.168.2.0 (netmask: 255.255.255.0) 

    22 

    192.168.3.0 (netmask: 255.255.255.0) 

    1. Plumb the VLAN interface in the service (primary) domain.


      primary# ifconfig vsw0 plumb
      primary# ifconfig vsw0 192.168.2.100 netmask 0xffffff00 broadcast + up
      primary# ifconfig vsw20000 plumb
      primary# ifconfig vsw20000 192.168.1.100 netmask 0xffffff00 broadcast + up
      
    2. Plumb the VLAN interface in the guest (ldom1) domain.


      ldom1# ifconfig vnet0 plumb
      ldom1# ifconfig vnet0 192.168.1.101 netmask 0xffffff00 broadcast + up
      ldom1# ifconfig vnet21000 plumb
      ldom1# ifconfig vnet21000 192.168.2.101 netmask 0xffffff00 broadcast + up
      ldom1# ifconfig vnet22000 plumb
      ldom1# ifconfig vnet22000 192.168.3.101 netmask 0xffffff00 broadcast + up
      

      For more information about how to configure VLAN interfaces in the Solaris OS, refer to Administering Virtual Local Area Networks in System Administration Guide: IP Services.