System Administration Guide: Network Interfaces and Network Virtualization

ProcedureHow to Configure VLANs Over a Link Aggregation

In the same manner as configuring VLANs over an interface, you can also create VLANs on a link aggregation. VLANs are described in Chapter 5, Administering VLANs. This section combines configuring VLANs and link aggregations.

Before You Begin

Create the link aggregation first and configure it with a valid IP address. To create link aggregations, refer to How to Create a Link Aggregation.

  1. List the aggregations that are configured in the system.


    # dladm show-link
    
  2. Create a VLAN over the link aggregation.


    # dladm create-vlan -l link -v VID vlan-link
    

    where

    link

    Specifies the link on which the VLAN interface is being created. In this specific case, the link refers to the link aggregation.

    VID

    Indicates the VLAN ID number

    vlan-link

    Specifies the name of the VLAN, which can also be an administratively-chosen name.

  3. Repeat Step 2 to create other VLANs over the aggregation.

  4. Configure IP interfaces over the VLANs with valid IP addresses.

  5. To create persistent VLAN configurations, add the IP address information to the corresponding /etc/hostname.interface configuration files.

    The interface takes the name of the VLAN that you assigned.


Example 6–6 Configuring Multiple VLANs Over a Link Aggregation

In this example, two VLANs are configured on a link aggregation. The VLANs are assigned VIDs 193 and 194, respectively.


# dladm show-link
LINK          CLASS     MTU     STATE     OVER
subvideo0     phys      1500    up        ----
subvideo1     phys      1500    up        ----
video0        aggr      1500    up        subvideo0, subvideo1

# dladm create-vlan -l video0 -v 193 salesregion1
# dladm create-vlan -l video0 -v 194 salesregion2

# ifconfig salesregion1 192.168.10.5/24 plumb up
# ifconfig salesregion2 192.168.10.25/24 plumb up

# vi /etc/hostname.salesregion1
192.168.10.5/24

# vi /etc/hostname.salesregion2
192.168.10.25/24