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.
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.
List the aggregations that are configured in the system.
# dladm show-link |
Create a VLAN over the link aggregation.
# dladm create-vlan -l link -v VID vlan-link |
where
Specifies the link on which the VLAN interface is being created. In this specific case, the link refers to the link aggregation.
Indicates the VLAN ID number
Specifies the name of the VLAN, which can also be an administratively-chosen name.
Repeat Step 2 to create other VLANs over the aggregation.
Configure IP interfaces over the VLANs with valid IP addresses.
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.
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 |