Go to main content

Managing Network Datalinks in Oracle® Solaris 11.4

Exit Print View

Updated: November 2020
 
 

How to Create a Link Aggregation

Before You Begin

If you are using a switch with a trunk aggregation, configure also the switch's ports to be used as an aggregation. If the switch supports LACP, configure LACP to either active or passive mode. See the switch manufacturer's documentation to configure the switch.

Ensure that your role has the appropriate rights profile to perform this procedure. See Using Rights Profiles to Perform Network Configuration.

  1. Display the datalink information to identify the physical datalinks for the aggregation.
    $ dladm show-phys
  2. Ensure that the datalinks 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 net0 currently exists over the net0 datalink.


      Note -  By default, an IP interface shares the same name as the datalink over which it is created.
    2. Remove the IP interface.
      $ ipadm delete-ip interface
  3. Create the 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.

    • trunk – IEEE 802.3ad compliant link aggregation mode (default)

    • 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. For information about the rules to assign names, see Rules for Valid Link Names in Configuring and Managing Network Components in Oracle Solaris 11.4.

  4. (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
Example 1  Creating a Trunk Aggregation

This example shows how to create an aggregation following the steps in the previous task. 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  Creating a DLMP Aggregation and Configuring an IP Interface on Top of the Aggregation

This example shows how to create a DLMP aggregation including configuring VNICs over the aggregation.

$ 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        2:8:20:c2:24:45    --
           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 -a local=203.0.113.1 aggr0/v4
$ dladm create-vnic -l aggr0 vnic1

Next Steps