Managing Network Datalinks in Oracle® Solaris 11.2

Exit Print View

Updated: September 2014
 
 

How to Create a Link Aggregation

Before You Begin

If you are creating a trunk aggregation and are using a switch in the aggregation, configure the ports to be used as an aggregation on the switch. If the switch supports LACP, configure LACP in either active or passive mode.

See the switch manufacturer's documentation to configure the switch.

  1. Become an administrator.

    For more information, see Using Your Assigned Administrative Rights in Securing Users and Processes in Oracle Solaris 11.2 .

  2. Display the datalink information to identify the physical datalinks for the aggregation.
    # dladm show-phys
  3. Ensure that the datalink that you intend to aggregate are not in use by any application.

    For example, if an IP interface is created over the datalink, remove the IP interface first.

    1. Determine the link state.
      # ipadm show-if
      IFNAME       CLASS        STATE     ACTIVE     OVER
      lo0          loopback     ok        yes        --
      net0         ip           ok        no         --

      The output indicates that an IP interface exists over the datalink net0.

    2. Remove the IP interface.
      # ipadm delete-ip interface

      where interface specifies the IP interface over the link. For more information, see the ipadm (1M) man page.

  4. Create a link aggregation.
    # dladm create-aggr [-f] [-m mode] [-P policy]  [-L LACP-mode] \
    [-T time] [-u address] -l link1 -l link2 [...] aggr
    –f

    Forces the creation of the aggregation. Use this option when you are attempting to aggregate devices that do not support link state notification.

    –m mode

    Mode must be set to one of the following values. The default mode is trunk.

    • trunk – IEEE 802.3ad compliant link aggregation mode

    • dlmp – Datalink multipathing mode

    –P policy

    (Trunk aggregation only) Specifies the load balancing policy for the aggregation. Supported values are L2, L3, and L4. For more information, see Defining Aggregation Policies for Load Balancing.

    –L LACP-mode

    (Trunk aggregation only) Specifies the mode of LACP if it is used. Supported values are off, active, or passive. For information about the modes, see Using a Switch.

    –T time

    (Trunk aggregation only) Specifies the LACP timer value. The supported values are short or long.

    –u address

    Specifies the fixed unicast address for the aggregation.

    –l linkn

    Specifies the datalinks that you want to aggregate.

    aggr

    Specifies the name of the aggregation, which can be any customized name. For information about the rules to assign names, see Rules for Valid Link Names in Configuring and Administering Network Components in Oracle Solaris 11.2 .

  5. (Optional) Check the status of the aggregation that you created.
    • Display the aggregations and links with the status information.

      # dladm show-link
    • Display the aggregations with the status and per port information.

      # dladm show-aggr -x

    The aggregation's state should be up.

Example 2-1  Creating a Trunk Aggregation

This example shows the commands to create a link aggregation with two underlying datalinks, net0 and net1. The aggregation is also configured to transmit LACP packets. The example begins with the removal of existing IP interfaces over the underlying datalinks.

# ipadm show-if
IFNAME       CLASS        STATE     ACTIVE     OVER
lo0          loopback     ok        yes        --
net0         ip           ok        no         --
# ipadm delete-ip net0
# dladm create-aggr -L active -l net0 -l net1 trunk0
# dladm show-aggr -x
LINK       PORT           SPEED DUPLEX   STATE     ADDRESS            PORTSTATE
trunk0     --             1000Mb full    up        8:0:27:49:10:b8    --
           net0           1000Mb full    up        8:0:27:49:10:b8    attached
           net1           1000Mb full    up        8:0:27:e4:d9:46    attached
Example 2-2  Creating a DLMP Aggregation and Configuring an IP Interface on Top of the Aggregation

This example shows how to create a DLMP aggregation. The aggregation has three underlying datalinks net0, net1, and net2. An IP interface is created on top of the aggregation aggr0 and a VNIC vnic1 is created on top of it.

# dladm create-aggr -m dlmp -l net0 -l net1 -l net2 aggr0
# dladm show-link
LINK      CLASS     MTU     STATE   OVER
net0      phys      1500    up      --
net1      phys      1500    up      --
net2      phys      1500    up      --
aggr0     aggr      1500    up      net0 net1 net2
# dladm show-aggr -x
LINK       PORT           SPEED DUPLEX   STATE     ADDRESS            PORTSTATE
aggr0      --             1000Mb full    up        8:0:27:49:10:b8    --
           net0           1000Mb full    up        8:0:27:49:10:b8    attached
           net1           1000Mb full    up        8:0:27:e4:d9:46    attached
           net2           1000Mb full    up        8:0:27:38:7a:97    attached 
# ipadm create-ip aggr0
# ipadm create-addr -T static -a local=10.10.10.1 aggr0/v4
# dladm create-vnic -l aggr0 vnic1

Next Steps

You can perform further configuration of the aggregation such as creating IP interfaces and VNICs. You can use the created aggregation for configuring both non-global zones and kernel zones.