How to Assign and Use VLANs in an Oracle Solaris 10 Guest Domain

After you complete this task, the ldom1 guest domain can communicate with the primary service domain and with remote and external systems that use externally tagged VLAN ID 21 and IP addresses on 192.168.2.0/24. The ldom1 guest domain can also communicate with the service domain and external systems that use tagged VLAN ID 20 and IP addresses on 192.168.1.0/24. The ldom1 guest domain can communicate only with external systems but not with the service domain that uses VLAN 22 and IP addresses on 192.168.3.0/24.

  1. Assign the virtual network (vnet) to two VLANs.

    For example, configure VLAN 21 as untagged and VLAN 20 as tagged.

    primary# ldm add-vnet pvid=21 vid=20,22 vnet0 primary-vsw0 ldom1
    ldom1# ifconfig vnet0 plumb
    ldom1# ifconfig vnet0 192.168.2.101 netmask 0xffffff00 broadcast + up
  2. Create the VLAN interface in the guest domain.
    ldom1# ifconfig vnet20000 plumb
    ldom1# ifconfig vnet20000 192.168.1.102 netmask 0xffffff00 broadcast + up
    ldom1# ifconfig vnet22000 plumb
    ldom1# ifconfig vnet22000 192.168.3.102 netmask 0xffffff00 broadcast + up