How to Assign and Use VLANs in an Oracle Solaris 11 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# ipadm create-ip net0
    ldom1# ipadm create-addr -t 192.168.2.101/24 net0
  2. Create the VLAN interface in the guest domain.
    ldom1# dladm create-vlan -l net0 -v 20 vlan20
    ldom1# ipadm create-ip vlan20
    ldom1# ipadm create-addr -t 192.168.1.101/24 vlan20
    ldom1# dladm create-vlan -l net0 -v 22 vlan22
    ldom1# ipadm create-ip vlan22
    ldom1# ipadm create-addr -t 192.168.3.101/24 vlan22