Go to main content
Oracle® VM Server for SPARC 3.4 Administration Guide

Exit Print View

Updated: August 2016
 
 

Assigning and Using VLANs

    The example devices used in the following tasks use an instance number of 0 in the domains. The VLANs are mapped to the following subnets:

  • VLAN 20 Subnet 192.168.1.0 (netmask: 255.255.255.0)

  • VLAN 21 Subnet 192.168.2.0 (netmask: 255.255.255.0)

  • VLAN 22 Subnet 192.168.3.0 (netmask: 255.255.255.0)

How to Assign and Use VLANs in an Oracle Solaris 11 Service Domain

  1. Assign the virtual switch (vsw).
    primary# ldm add-vsw net-dev=net0 primary-vsw0 primary
  2. Create the VLAN interface in the service domain.

    Note that the –T static option of the ipadm create-addr command is required only if running an Oracle Solaris 11 OS older than the Oracle Solaris 11.1 OS. Starting with the Oracle Solaris 11 OS, –T static is the default behavior.

    # ipadm create-ip net0
    # ipadm create-addr -T static -a 192.169.2.100/24 net0
    # dladm create-vlan -l net0 -v 20 vlan20
    # ipadm create-ip vlan20
    # ipadm create-addr -T static -a 192.168.1.100/24 vlan20

    For more information about how to configure VLAN interfaces in the Oracle Solaris 11 OS, refer to Chapter 3, Configuring Virtual Networks by Using Virtual Local Area Networks in Managing Network Datalinks in Oracle Solaris 11.3.

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

  1. Assign the virtual switch (vsw) to two VLANs.

    For example, configure VLAN 21 as untagged and VLAN 20 as tagged. Note that the service domain is not configured to access VLAN ID 22.

    primary# ldm add-vsw net-dev=nxge0 pvid=21 vid=20 primary-vsw0 primary
  2. Create the VLAN interface in the service domain.
    # ifconfig vsw0 plumb
    # ifconfig vsw0 192.168.2.100 netmask 0xffffff00 broadcast + up
    # ifconfig vsw20000 plumb
    # ifconfig vsw20000 192.168.1.100 netmask 0xffffff00 broadcast + up

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

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