Configuring Solaris Link Aggregation

Link aggregation or commonly known Ethernet bonding allows us to enhance the network availability and performance by combining multiple network interfaces together and form an aggregation of those interfaces which act as a single network interface with greatly enhanced availability and performance.

<>When we aggregate two or more network interfaces, we are forming a new network interface on top of those physical interfaces combined in the link layer.

Note: You need to have at least two physical network interfaces and not be part of a virtual interface in order to create a link aggregation.

Disable NWAM

If enabled, you must disable Network auto-magic Configuration Management (NWAM) as link aggregation and NWAM cannot co-exist.

# svcadm disable network/physical:nwam

Unplumb Interfaces

The interfaces must be unplumb-ed in order for us to use them in a link aggregation. The following is an example of unplumbing our interfaces:

# ifconfig ce2 down unplumb
# ifconfig ce3 down unplumb

Virtual Interfaces

The interfaces you intend to use in a link aggregation must not be part of virtual interface; otherwise it will not be possible to create the aggregation. To ensure that an interface is not part of a virtual interface use the following command and check the output:

# dladm show-link

If you have virtual interface associated with your physical device, use the dladm command to remove them. For example:

# dladm delete-vlan vlan0

Creating the aggregation device

We use dladm create-aggr subcommand with the following syntax to create aggregation links:

dladm  create-aggr [-l interface_name]*  aggregation_name

For example, we are using ce2 and ce3 to create aggr0:

# dladm create-aggr -l ce2 -l ce3 aggr0

Plumb the aggr0 interface

We configure the aggregation IP address the same way that we configure a physical or virtual interface. For example:

# ifconfig aggr0 plumb up

Check interface status

  • Firstly, use ifconfig to see the status of our new aggregated interface.
    # ifconfig aggr0
  • Using the dladm command we can get a list of physical and virtual interfaces:
    # dladm show-link
    LINK                CLASS     MTU    STATE    OVER
    ce0                 phys      1500   up       --
    ce1                 phys      1500   up       --
    ce2                 phys      1500   up       --
    ce3                 phys      1500   up       --
    aggr0               aggr      1500   up       ce2 ce3
  • Again, we use dladm to get a list of aggregated interfaces:
    # dladm show-aggr

Adding/Removing aggregation interfaces

We can use the subcommands add-aggr and remove-aggr to add or remove an interface in the aggregation. For example:

# dladm add-aggr -l ce1 aggr0
# dladm remove-aggr -l ce3 aggr0

Persistent binding

The aggregation configuration will survive a reboot but the ifconfig configuration will not survive unless we persist it using the interface configuration files.

To make the aggregation IP configuration persistent we just need to add create /etc/hostname.aggr0 file with the following content:

Deleting an aggregtion interface

To delete an aggregation we use delete-aggr subcommand of dladm. For example to delete aggr0 we can use the following:

  • Before we can delete the aggregation we need to bring down its interface and unplumb it:
    # ifconfig aggr0 down unplumb
  • Delete the aggregation device:
    # dladm delete-aggr aggr0