sun.com docs.sun.com My Sun Worldwide Sites

Previous Previous     Contents     Index     Next Next

ProcedureHow to Create a Link Aggregation

Before You Begin


Note - Link aggregation only works on full-duplex, point-to-point links that operate at identical speeds. Make sure that the interfaces in your aggregation conform to this requirement.


If you are using a switch in your aggregation topology, make sure that you have done the following on the switch:

  • Configured the ports to be used as an aggregation

  • If the switch supports LACP, configured LACP in either active mode or passive mode

  1. Assume the Primary Administrator role, or become superuser.

    The Primary Administrator role includes the Primary Administrator profile. To create the role and assign the role to a user, see Chapter 2, "Working With the Solaris Management Console (Tasks)," in System Administration Guide: Basic Administration.

  2. Determine which interfaces are currently installed on your system.

    # dladm show-link

  3. Determine which interfaces have been plumbed.

    # ifconfig -a

  4. Create an aggregation.

    # dladm create-aggr -d interface key

    interface

    Represents the device name of the interface to become part of the aggregation.

    key

    Is the number that identifies the aggregation. The lowest key number is 1. Zeroes are not allowed as keys.

    For example:

    # dladm create-aggr -d bge0 -d bge1 1

  5. Configure and plumb the newly created aggregation.

    # ifconfig aggrkey plumb IP-address up

    For example:

    # ifconfig aggr1  plumb 192.168.84.14 up

  6. Check the status of the aggregation you just created.

    # dladm show-aggr

    You receive the following output:

    key: 1 (0x0001) policy: L4      address: 0:3:ba:7:84:5e (auto)
               device   address           speed         duplex  link    state
               bge0     0:3:ba:7:84:5e    1000  Mbps    full    up      attached
               bge1     0:3:ba:7:84:5e    0     Mbps    unknown down    standby

    The output shows that an aggregation with the key of 1 and a policy of L4 was created. Note that the interfaces are known by the MAC address 0:3:ba:7:84:5e, which is the system MAC address.

  7. (Optional) Make the IP configuration of the link aggregation persist across reboots.

    1. For link aggregations with IPv4 addresses, create an /etc/hostname.aggr.key file. For IPv6-based link aggregations, create an /etc/hostname6.aggr.key file.

    2. Enter the IPv4 or IPv6 address of the link aggregation into the file.

      For example, you would create the following file for the aggregation that is created in this procedure:

      # vi /etc/hostname.aggr1
      192.168.84.14

    3. Perform a reconfiguration boot.

      # reboot -- -r

    4. Verify that the link aggregation configuration you entered in the /etc/hostname.aggrkey file has been configured.

      # ifconfig -a
      .
      .
      aggr1: flags=1000843 <UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 3
              inet 192.168.84.14 netmask ff000000 broadcast 192.255.255.

Example 6-4   Creating a Link Aggregation

This example shows the commands that are used to create a link aggregation with two devices, bge0 and bge1, and the resulting output.

# dladm show-link
ce0             type: legacy    mtu: 1500       device: ce0
ce1             type: legacy    mtu: 1500       device: ce1
bge0            type: non-vlan  mtu: 1500       device: bge0
bge1            type: non-vlan  mtu: 1500       device: bge1
bge2            type: non-vlan  mtu: 1500       device: bge2
# ifconfig -a
lo0: flags=2001000849 <UP,LOOPBACK,RUNNING,MULTICAST,IPv4,VIRTUAL> mtu 8232 index 1
        inet 127.0.0.1 netmask ff000000 
ce0: flags=1000843 <UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 2
        inet 192.168.84.253 netmask ffffff00 broadcast 192.168.84.255
        ether 0:3:ba:7:84:5e 
# dladm create-aggr -d bge0 -d bge1 1
# ifconfig aggr1 plumb 192.168.84.14 up
# dladm show-aggr
key: 1 (0x0001) policy: L4      address: 0:3:ba:7:84:5e (auto)
     device   address           speed         duplex  link    state
     bge0     0:3:ba:7:84:5e    1000  Mbps    full    up      attached
     bge1     0:3:ba:7:84:5e    0     Mbps    unknown down    standby

# ifconfig -a
lo0: flags=2001000849 <UP,LOOPBACK,RUNNING,MULTICAST,IPv4,VIRTUAL> mtu 8232 index 1
        inet 127.0.0.1 netmask ff000000 
ce0: flags=1000843 <UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 2
        inet 192.168.84.253 netmask ffffff00 broadcast 192.168.84.255
        ether 0:3:ba:7:84:5e 
aggr1: flags=1000843 <UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 3
        inet 192.168.84.14 netmask ff000000 broadcast 192.255.255.255
        ether 0:3:ba:7:84:5e 

Note that the two interfaces that were used for the aggregation were not previously plumbed by ifconfig.

ProcedureHow to Modify an Aggregation

This procedure shows how to make the following changes to an aggregation definition:

  • Modifying the policy for the aggregation

  • Changing the mode for the aggregation

  • Removing an interface from the aggregation

  1. Assume the Primary Administrator role, or become superuser.

    The Primary Administrator role includes the Primary Administrator profile. To create the role and assign the role to a user, see Chapter 2, "Working With the Solaris Management Console (Tasks)," in System Administration Guide: Basic Administration.

  2. Modify the aggregation to change the policy.

    # dladm modify-aggr -Ppolicy key   

    policy

    Represents one or more of the policies L2, L3, and L4, as explained in Policies and Load Balancing.

    key

    Is a number that identifies the aggregation. The lowest key number is 1. Zeroes are not allowed as keys.

  3. If LACP is running on the switch to which the devices in the aggregation are attached, modify the aggregation to support LACP.

    If the switch runs LACP in passive mode, be sure to configure active mode for your aggregation.

    # dladm modify-aggr -l LACP mode -t timer-value key

    -l LACP mode

    Indicates the LACP mode in which the aggregation is to run. The values are active, passive, and off.

    -t timer-value

    Indicates the LACP timer value, either short or long.

    key

    Is a number that identifies the aggregation. The lowest key number is 1. Zeroes are not allowed as keys.

Example 6-5   Modifying a Link Aggregation

This example shows how to modify the policy of aggregation aggr1 to L2 and then turn on active LACP mode.

# dladm modify-aggr -P L2 1
# dladm modify-aggr -l active -t short 1
# dladm show-aggr
key: 1 (0x0001) policy: L2      address: 0:3:ba:7:84:5e (auto)
     device   address           speed         duplex  link    state
     bge0     0:3:ba:7:84:5e    1000  Mbps    full    up      attached
     bge1     0:3:ba:7:84:5e    0     Mbps    unknown down    standby

Previous Previous     Contents     Index     Next Next
Company Info Contact Terms of Use Privacy Copyright 1994-2007 Sun Microsystems, Inc.