C H A P T E R  3

Configuring the Sun Trunking 1.3 Software

This chapter describes how to edit and create the Sun Trunking 1.3 configuration files. This chapter includes the following sections:


Preparing for Trunking Configuration

Before rebooting your system, you can edit and create configuration files to define how you will link the Ethernet network interfaces. To configure these files, you need to know the following for each Ethernet adapter:

Checking for Link Mode

Always check to be sure the link mode is set to run full-duplex.

Use the kstats (See the kstats manual page: kstats(1M)) or the ndd command to verify link mode. If the information returned indicates that your trunking device is not running at full-duplex, refer to your networking device product documentation for information on setting the link mode.

Booting from the Network

Once you have installed the trunking software and connected the Ethernet interfaces to a switch that is configured for trunking, you cannot use that interface to boot from the network.

Determining Instance Numbers

Each network interface on an Ethernet adapter has a corresponding instance number. You must know the device instance numbers for each network interface before you can configure the Sun Trunking software files.

You can find the instance numbers by searching the /etc/path_to_inst file.

The file contains the physical name, the instance number, and driver name for each device on the system. By searching this file, you can find the instance numbers that will be used with the Sun Trunking 1.3 software.



Note - The following examples are for a GigaSwift Ethernet adapter. If you are using a different adapter, the output will be similar. For user input, replace ce with qfe for the Quad FastEthernet adapter or ge for the Gigabit Ethernet adapter. The Dual FastEthernet and Dual SCSI adapter uses the ce driver.



Using the grep command, search the path_to_inst file for all of the devices on your system:


# grep ce /etc/path_to_inst"/pci@1f,4000/network@2" 0 "ce"
"/pci@1f,4000/network@4" 1 "ce"

In the previous example, instances 0 and 1 are GigaSwift Ethernet adapters. Your information will be similar if you are using a different adapter. TABLE 3-1 lists the network interface number, physical name, and instance number for each GigaSwift Ethernet instance on this example system.


TABLE 3-1 Example GigaSwift Ethernet Instance Numbers

Network Interface Number

Device Name

Instance Number

0

/pci@1f,4000/network@2

0

1

/pci@1f,4000/network@4

1


You will need to know the instance numbers of the GigaSwift Ethernet network interfaces in order to configure the Sun Trunking software.



Note - You cannot trunk an interface that is already plumbed. To display a list of all plumbed interfaces, execute ifconfig -a command.




procedure icon  To Resolve the Problem of Plumbed Interfaces

1. Before trunking ensure that the links are available:


#  ifconfig -a
lo0: flags=1000849<UP,LOOPBACK,RUNNING,MULTICAST,IPv4> mtu 8232 index 1
         inet 127.0.0.1 netmask ff000000
ce0: flags=1000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 942
         inet 199.99.10.10 netmask ffffff00 broadcast 199.99.10.255
         ether 8:0:20:bc:d6:fa

The output from the ifconfig -a command in the previous example shows that ce0 is already plumbed, and therefore, cannot be aggregated.

2. Unplumb the interface as follows:


# ifconfig ce0 unplumb
# ifconfig -a
lo0: flags=1000849<UP,LOOPBACK,RUNNING,MULTICAST,IPv4> mtu 8232 index 1
         inet 127.0.0.1 netmask ff000000

3. Setup the trunk and plumb the interface:


# nettr -setup 10 device=ce members=0,1,2,3 policy=2
Aggregation (key) : 10
        ce0
        ce1
        ce2
        ce3
# ifconfig ce0 plumb 199.99.10.10 up



Note - The key represents the aggregation identifier on ce devices. On ce devices the key can be any number from 0 to 4096. On qfe and ge devices the trunk head represents the aggregation identifier. Therefore on qfe and ge devices the key must be the trunk head.



Accessing Trunk Members for qfe and ge Devices

Trunk members can be accessed only through the trunk head. Since trunking appears to the system as a single "fat pipe," the trunk head is the single access point. Other links in an aggregation are not plumbed beneath TCP/IP and are not visible. Networking commands such as ifconfig(1M) and netstat(1M) work only on the head instance.

You cannot do a DLPI attach on a non-head member. The following error message was returned for a snoop command for a non-head member:


# snoop -d ge1dlattachreq:  DL_ERROR_ACK:  dl_errno 8 unix_errno 0

In this example, ge1 is a member of a trunk. The trunk head for that trunk is ge0. To use the snoop command, for example, in such a case, the following would be the correct usage:


# snoop -d ge0
Using device /dev/ge (promiscuous mode)
           ? -> (multicast)  ETHER Type=0C34 (Unknown), size = 52 bytes
           ? -> (multicast)  ETHER Type=0C34 (Unknown), size = 52 bytes
           ? -> (multicast)  ETHER Type=0C34 (Unknown), size = 52 bytes
           ? -> (multicast)  ETHER Type=0C34 (Unknown), size = 52 bytes



Note - If you are using the ce driver, you can run the snoop command on all trunk member instances. But if you run the snoop command on a trunk member instance you will see duplicated packets. For best results, look at the aggregation traffic using the trunk head instance (virtual link) and nettr -stat key. Networking commands such as ifconfig(1M) and netstat(1M) work on any member instance.



Maximum Number of Links for Each Adapter

TABLE 3-2 shows a matrix of supported drivers and the maximum number of supported links for each:


TABLE 3-2 Matrix of Supported Drivers and Number of Links

Driver

Supported Links

qfe

16 links

ge

4 links

ce

4 links


The two network interfaces of the GigaSwift Ethernet (ce) adapter can be linked as follows.

FIGURE 3-1 GigaSwift Ethernet Trunking Network Configuration Example


Illustration showing two GigaSwift Ethernet network ports linked into one trunk.

The two network ports of the GigabitEthernet (ge) adapter can be linked as follows.

FIGURE 3-2 GigabitEthernet Trunking Network Configuration Example


Illustration showing two GigabitEthernet network ports linked into one trunk.

The four network ports of the Quad FastEthernet (qfe) adapter can be linked in a number of ways, depending on the needs of your network. All four of the network ports can be linked into one trunk, or two network ports can be linked into one trunk. FIGURE 3-3 shows four different common linking possibilities.

FIGURE 3-3 Quad FastEthernet Trunking Network Configuration Examples


Illustration showing Quad FastEthernet trunking network configuration examples.

The configuration of the Sun Trunking 1.3 software files depends on how you want to organize the Ethernet network. You must also configure the Ethernet switch software to be symmetrical with the way you configured the Sun Trunking 1.3 software. Refer to your Ethernet switch documentation for the switch configuration instructions.

local-mac-address? Property

Each Ethernet adapter has been assigned a unique Media Access Control (MAC) address, which represents the 48-bit Ethernet address for that network interface. Each host system also provides a single global MAC address. For historical reasons, the default MAC address for each interface is that of the single global host MAC address rather than the MAC address of each individual Ethernet adapter. This must be modified for trunking. You can set the OpenBoot firmware local-mac-address property.

The mac-address property of the network device specifies the network address (system-wide or local-mac-address?) used for booting the system. To start using the MAC addresses assigned to the network interface of the Ethernet adapter, set the NVRAM configuration variable local-mac-address? to true.


ok setenv local-mac-address? true

Client machines with multiple interfaces that communicate with the trunked machine should also set local-mac-address? to true.

Using Trunking Auto-configuration Setup at Boot Time

After locating the instance numbers of the Ethernet network interfaces, and deciding how you want to organize your network, you can begin to configure the Sun Trunking 1.3 software.


procedure icon  To Edit the nettr.sh File

This section describes the minimum set of instructions to configure trunking. For more details, see Configuring Trunking with the nettr Utility.

The main configuration file of the Sun Trunking 1.3 software is the
/etc/opt/SUNWconn/bin/nettr.sh file. You will define each trunk by adding information to this file. Before you edit the nettr.sh file, you must know how many Ethernet network interfaces you want to link into a trunk, the trunking policy and the lacp mode of operation. You can also add new members to an existing trunk or delete an existing member from the trunk.

single-step bulletUsing a text editor, add commands to the nettr.sh file to define your trunking network.

In the nettr.sh file, add the following nettr command to configure a ce trunk. Use the following format to set up a trunk:


./nettr -setup <key> device=<dev1> members=<instance,...>
                [ { device=<dev2> members=<instnace,...> }... ]
                [ policy=<policy-no> ]
                [ mac=<a:b:c:d:e:f> ]
                [ lacp=<A|a|P|p|O|o> [ ptimer=<0|1> ] ]

In the nettr.sh file, add the following nettr command to configure a ge or qfe trunk. Use the following format to set up a trunk:


./nettr -setup <head-inst> device=<qfe | ge> members=<instance,...>
                [ policy=<policy-no> ]

In the previous command, the key is the aggregation identifier for (ce devices) head-inst is the aggregation identifier for qfe or ge devices. The device represents the adapter type (qfe for a Quad FastEthernet adapter or ce for GigaSwift Ethernet adapter, or ge for Gigabit Ethernet). The member option is used to select members of a trunk. The policy option can either be the default value of 1 for MAC or 2 for round robin, 3 for IP Destination, or 4 for IP Source/IP Destination. For the lacp option, specify lacp mode of operation. It can be Active (A|a), Passive (P| p), or Off (O| o). For the ptimer option, specify a short(0) or long(1) lacp timeout value.



Note - The following examples use the instance numbers found in TABLE 3-1. The instance numbers on your system will be different. See Determining Instance Numbers for more information.



It will be similar to the following:


# nettr -conf lacpKey: 10; Policy: 1;
Aggr MAC address: 0:3:ba:34:a2:43
Name    Original-Mac-Addr   Speed   Duplex   Link Status
----    -----------------   -----   ------   ---- ------
ce0     0:3:ba:34:a2:43     1000    full     up    enb
ce1     8:0:20:e3:61:74     1000    full     up    enb
 
Name   Pri     Prt/Pri  sync  mode  timeout  coll/dist  cfg  state  delay(us)
----   ---     -------  ----  ----  -------  ---------  ---  -----  ---------
ce0    4096     0/4096   no   pas    long      enb      adm   act     100
ce1    4096     1/4096   no   pas    long      enb      adm   act     100



Note - The command syntax of Sun Trunking 1.3 is fully compatible with Trunking 1.2.1. Existing nettr.sh files do not need any modifications.




procedure icon  To Configure the Host Files

Before you can use these trunked Ethernet network interfaces, you must create an
/etc/hostname.driver# file.

Where driver = ce for GigaSwift Ethernet, ge for Gigabit Ethernet, or qfe for Quad FastEthernet

# = instance number

Then add an entry in the /etc/hosts file for each trunk.

1. For each trunk, create a /etc/hostname.ce# file, where # corresponds to the instance number used as the trunk head.

For example, if you had two trunks using two network interfaces each, you would have to create two files containing the host name of the trunk as seen by network. The extensions of these files would have to correspond with the trunk head interface numbers of the trunks.


TABLE 3-3 Example hostname.ce # Files

Filename

GigaSwift Ethernet Adapter Network Interfaces Used in the Trunk1

/etc/hostname.ce0

0, 1

/etc/hostname.ce2

2, 3

1 See FIGURE 3-1 for more information.


Using the example in TABLE 3-3, the following example shows the three /etc/hostname.device# files required for a system called proboscis, which has an onboard bge device (proboscis), and two trunks (proboscis-11, proboscis-12).


# cat /etc/hostname.bge0
proboscis
# cat /etc/hostname.ce0
proboscis-11
# cat /etc/hostname.ce2
proboscis-11

2. Create an appropriate entry in the /etc/hosts file for each trunk.

Using the example from Step 1, you would have:


# cat /etc/hosts
#
# Internet host table
#
127.0.0.1     	localhost
129.144.10.57 	proboscis						loghost
129.144.11.83 	proboscis-11
129.144.12.41 	proboscis-12



Note - Make sure you configure the switch software to be symmetrical with the Sun Trunking 1.3 software. Refer to your Ethernet switch documentation for instructions.




procedure icon  To Activate the Networks Without Rebooting

single-step bulletSetup the ce adapter using the ifconfig command, where ip_address corresponds to the system IP address.


# ifconfig ce0 plumb
# ifconfig ce0 ip_address up

Create an entry in the /etc/hosts file for each active ce interface.

The following example shows the /etc/hosts file.


# cat /etc/hosts
#
# Internet host table
#
127.0.0.1     localhost
129.144.10.57 proboscis loghost
129.144.11.83 proboscis-11



Note - Make sure you configure the switch software to be symmetrical with the Sun Trunking 1.3 software. Refer to your Ethernet switch documentation for instructions.




procedure icon  To Reboot and Activate the Trunked Networks

If you do not use ifconfig, you will need to reboot your system to make these trunked networks active. If you did use the previous ifconfig instructions, you can ignore this section.

1. Shut down your system.


# sync
# init 0
Shutdown messages.

2. Set local-mac-address? to true.


ok setenv local-mac-address? true

3. Perform a reconfiguration boot.


ok boot -r

Verifying the Auto-configuration Setup

You can verify trunking networks using the ifconfig and the nettr commands.

Use the ifconfig -a command to print out the addressing information for each interface on the system.


# /usr/sbin/ifconfig -alo0: flags=849<UP,LOOPBACK,RUNNING,MULTICAST> mtu 8232
        inet 127.0.0.1 netmask ff000000 
hme0: flags=863<UP,BROADCAST,NOTRAILERS,RUNNING,MULTICAST> mtu 1500
        inet 129.144.131.27 netmask ffffff00 broadcast 129.144.131.255
        ether 8:0:20:8f:bf:79 
ce0: flags=863<UP,BROADCAST,NOTRAILERS,RUNNING,MULTICAST> mtu 1500
        inet 199.100.2.10 netmask ffffff00 broadcast 199.100.2.255
        ether 8:0:20:8d:2f:ff 

Even though a trunk may be composed of two linked GigaSwift Ethernet network interfaces, the ifconfig -a command will only print out the addressing information for the plumbed interface (ce0 in the example above).

For a more complete listing of the ce devices, use the nettr -conf command. This command prints out a list of the trunked ce instances on the system.


# /etc/opt/SUNWconn/bin/nettr -conf
Key: 10; Policy: 1;
Aggr MAC address: 0:3:ba:34:a2:43
Name    Original-Mac-Addr   Speed   Duplex   Link Status
----    -----------------   -----   ------   ---- ------
ce0     0:3:ba:34:a2:43     1000    full     up    enb
ce1     8:0:20:e3:61:74     1000    full     up    enb

The nettr -conf command will also show the policy of each trunk on the system, as well as listing the original MAC address of each interface.

For qfe or ge, use the nettr -stat trunkhead device=device command to monitor the network statistics of each interface on the system.

Where:

trunkhead is the trunk head interface number of the trunk you want to monitor

device is qfe or ge


# /etc/opt/SUNWconn/bin/nettr -stats 0 device=geMar 30 15:26:58 2003
 
Name   Ipkts    Ierrs  Opkts  Oerrs  Collis  Crc   %Ipkts %Opkts
ge0   66518099    0      67498218     0      0       0     50.00   50.00
ge1   66527490    0      67498218     0      0       0     50.00   50.00

This command will list each interface and the network performance statistics, of the specified trunk. See Configuring Trunking with the nettr Utility for more information.

You can also monitor the network statistics of a trunk at regular intervals. The full usage of the command is nettr -stats key interval=sec, with sec being the number of seconds between monitoring the trunk's interfaces. In the example below, the trunk is monitored once every second.


# /etc/opt/SUNWconn/bin/nettr -stats 0 interval=1 Mar 30 15:26:58 2003
 
Name   Ipkts    Ierrs  Opkts  Oerrs  Collis  Crc   %Ipkts %Opkts
ce0   66518099    0      67498218     0      0       0     50.00   50.00
ce1   66527490    0      67498218     0      0       0     50.00   50.00

You can also use the netstat(1M)or kstat(1M) command to monitor the network statistics. Refer to the netstat(1M) and kstat(1M) man pages for more information.

Disabling the Sun Trunking Interface

To permanently disable the trunking interface, comment out the nettr command in the /etc/opt/SUNWconn/bin/nettr.sh file. You will need to reconfigure the
/etc/hostname.ce# and /etc/hosts files if you want to use the Ethernet network interfaces separately. Refer to the product documentation for more information.


Configuring Trunking with the nettr Utility

You can use the nettr(1M) utility to configure trunking. Use nettr(1M) to:

Command Syntax

Following is the command syntax for nettr.


CODE EXAMPLE 3-1 Command Syntax for nettr
	nettr -setup <key> device=<dev1> members=<instance,...>
                [ { device=<dev2> members=<instnace,...> }... ]
                [ policy=<policy-no> ]
                [ mac=<a:b:c:d:e:f> ]
                [ lacp=<A|a|P|p|O|o> [ ptimer=<0|1> ] ]
        nettr -setup <head-inst> device=<qfe | ge> members=<instance,...>
                [ policy=<policy-no> ]
 
        nettr -stats <key>
                [ type=<1|2> ] [ interval=<number> ]
        nettr -stats <head-inst> device=<qfe | ge>
                [ type=<1|2> ] [ interval=<number> ]
 
        nettr -release <key>
        nettr -release <head-inst> device=<qfe | ge>
 
        nettr -add <key>
                device=<dev1> members=<instance,...>
                [ { device=dev2> members=<instnace,...> }... ]
 
        nettr -rem <key>
                device=<dev1> members=<instance,...>
                [ { device=dev2> members=<instnace,...> }... ]
 
        nettr -mod <key>
                [ policy=<policy-no> ]
                [ lacp=<A|a|P|p|O|o> ] [ ptimer=<0|1> ]
 
        nettr -conf [ <lacp> ]
        nettr -conf
 
        nettr -run [ <file> ]
        nettr -run
 
        nettr -policy
 
        nettr -hash <key>
                { [ mac=dest-mac-address> ] |
                [ ip=dest-ip-address ] |
                [ ip=src-ip-addr/dest-ip-addr ] }
        nettr -hash <head-inst> device=<ge | qfe>
                { [ mac=dest-mac-address> ] |
                [ ip=dest-ip-address ] |
                [ ip=src-ip-addr/dest-ip-addr ] }

Enabling the Sun Trunking Interface

Use the following format to enable the trunking interface for ce devices:


	nettr -setup <key> device=<dev1> members=<instance,...>
                [ { device=<dev2> members=<instnace,...> }... ]
                [ policy=<policy-no> ]
                [ mac=<a:b:c:d:e:f> ]
                [ lacp=<A|a|P|p|O|o> [ ptimer=<0|1> ] ]

The key is the aggregation identifier and can be any number you choose. It does not have to be tied to a member instance. The device represents the adapter type (ce). The member option is used to select members of a trunk. The policy option can either be the default value of 1 for MAC or 2 for round robin, 3 for IP Destination, or 4 for IP Source/IP Destination. For the lacp option specify lacp mode of operation. It can be Active(A|a), Passive(P| p), or Off(O| o). For the ptimer option, specify a short(0) or long(1) lacp timeout value.

For ge and qfe devices the format of this command is:


 nettr -setup <head-inst> device=<qfe | ge> members=<instance,...>
                [ policy=<policy-no> ]

In the previous command, the head instance is the instance number of the first linked network interface of the trunk. The device represents the adapter type (qfe for a Quad FastEthernet adapter or ge for GigabitEthernet adapter). The member option is used to select members of a trunk. The policy option can either be the default value of 1 for MAC or 2 for round robin, 3 for IP Destination, or 4 for IP Source/IP Destination. If you want to use the MAC trunking policy and two links for a trunk, execute the following line:


nettr -setup 0 device=ge members=0,1 policy=1 

Verifying the Sun Trunking Interfaces

You can verify trunking networks using the ifconfig and the nettr commands.

Use the ifconfig -a command to print out the addressing information for each interface on the system.


# /usr/sbin/ifconfig -alo0: flags=849<UP,LOOPBACK,RUNNING,MULTICAST> mtu 8232
        inet 127.0.0.1 netmask ff000000 
hme0: flags=863<UP,BROADCAST,NOTRAILERS,RUNNING,MULTICAST> mtu 1500
        inet 129.144.131.27 netmask ffffff00 broadcast 129.144.131.255
        ether 8:0:20:8f:bf:79 
ce0: flags=863<UP,BROADCAST,NOTRAILERS,RUNNING,MULTICAST> mtu 1500
        inet 199.100.2.10 netmask ffffff00 broadcast 199.100.2.255
        ether 8:0:20:8d:2f:ff 

Even though a trunk can be composed of two linked GigaSwift Ethernet network interfaces, the ifconfig -a command will only print out the addressing information for the key head interfaces (ce0 in the previous example).

Use the nettr -conf command to print out a list of trunked ce instances on the system.


# nettr -conf
Key: 10; Policy: 1;
Aggr MAC address: 0:3:ba:34:a2:43
Name    Original-Mac-Addr   Speed   Duplex   Link Status
----    -----------------   -----   ------   ---- ------
ce0     0:3:ba:34:a2:43     1000    full     up    enb
ce1     8:0:20:e3:61:74     1000    full     up    enb

In the previous example, the ce0 interface is the key for a two-network interface trunk, composed of the ce0, and ce1 interfaces. The nettr -conf command also shows the policy of each trunk on the system and lists the original MAC address of each interface.

Use the nettr -stat key device=device command to monitor the network statistics of each interface on the system.

Where:

key is the trunk head interface number of the trunk you want to monitor

device is qfe or ge


# /etc/opt/SUNWconn/bin/nettr -stats 0 Mar 30 15:26:58 2003
 
Name   Ipkts    Ierrs  Opkts  Oerrs  Collis  Crc   %Ipkts %Opkts
ge0   66518099    0      67498218     0      0       0     50.00   50.00
ge1   66527490    0      67498218     0      0       0     50.00   50.00

The nettr -stats command will list each interface and the network performance statistics, summarized in TABLE 3-4, of the specified trunk.


TABLE 3-4 Output of the nettr -stats Command

Network Statistic

Definition

Ipkts

The number of Ethernet packets inputted into the interface.

Ierrs

The number of errors that occurred while inputting these Ethernet packages.

Opkts

The number of Ethernet packets outputted through the interface.

Oerrs

The number of errors that occurred while outputting these Ethernet packages.

Collis

The number of collisions detected on the interface.

Crc

The number of cyclic redundancy check (CRC) errors detected on the interface.

%Ipkts

The percent of Ethernet packets input to the interface.

%Opkts

The percent of Ethernet packets output through the interface.


You can also monitor the network statistics of a trunk at regular intervals. For a Sun GigaSwift Ethernet driver, the full usage of the command is nettr -stats key device=[ce] interval=sec, with sec being the number of seconds between monitoring the trunk's interfaces. In the example below, the trunk is monitored once every second.


# /etc/opt/SUNWconn/bin/nettr -stats 0 interval=1Mar 30 15:26:58 2003
 
Name   Ipkts    Ierrs  Opkts  Oerrs  Collis  Crc   %Ipkts %Opkts
ce0   66518099    0      67498218     0      0       0     50.00   50.00
ce1   66527490    0      67498218     0      0       0     50.00   50.00

To monitor the network statistics of a trunk for a Sun Gigabit Ethernet driver or a Sun Quad FastEthernet driver, the full usage of the command is nettr -stats trunkhead device=[ge|qfe] interval=sec, with sec being the number of seconds between monitoring the trunk's interfaces. In the example below, the trunk is monitored once every second.


# /etc/opt/SUNWconn/bin/nettr -stats 0 interval=1Mar 30 15:26:58 2003
 
Name   Ipkts    Ierrs  Opkts  Oerrs  Collis  Crc   %Ipkts %Opkts
ge0   66518099    0      67498218     0      0       0     50.00   50.00
ge1   66527490    0      67498218     0      0       0     50.00   50.00

You can also use the netstat(1M)or kstat(1M) command to monitor the network statistics. Refer to the netstat(1M) and kstat(1M) man pages for more information.

Adding a Trunk Member

If you need to add a new member to the trunk, use -add command.


# nettr -add 10 device=ce members=3

With the new member added to the trunk, the output from the -conf command would look similar to the following:


# nettr -conf
Key: 10; Policy: 1;
Aggr MAC address: 0:3:ba:34:a2:43
Name    Original-Mac-Addr   Speed   Duplex   Link Status
----    -----------------   -----   ------   ---- ------
ce0     0:3:ba:34:a2:43     1000    full     up    enb
ce1     8:0:20:e3:61:74     1000    full     up    enb
ce3     8:0:20:e3:61:76     1000    full     up    enb

Removing a Trunk Member

If you need to remove a member from the trunk, use -rem command.


# nettr -rem 10 device=ce members=1

The previous command removes ce1 from the trunk. The output from the -conf command would look similar to the following:


# nettr -conf
Key: 10; Policy: 1;
Aggr MAC address: 0:3:ba:34:a2:43
Name    Original-Mac-Addr   Speed   Duplex   Link Status
----    -----------------   -----   ------   ---- ------
ce0     0:3:ba:34:a2:43     1000    full     up    enb
ce3     8:0:20:e3:61:76     1000    full     up    enb

Disabling the Sun Trunking Interface

If you need to disable a trunk, use the nettr -release key command, with key being the trunk identifier.


# /etc/opt/SUNWconn/bin/nettr -release 0 device=ce

nettr automatically unplumbs IPv4 and IPv6 stacks. If any other application (such as VLAN) are plumbed, remember to manually unplumb the application.


Load Balancing Methods

Trunking Policies

The four supported trunking policies used in the Sun Trunking 1.3 software are MAC, Round Robin, IP Destination, and IP Source+Destination. With these policies, if a link fails, the traffic failsover to the next available link. The policies are defined below.

MAC



Note - Do not use MAC-hashing for connecting two servers back to back.



Round Robin

IP Destination Address

IP Source Address/IP Destination Address

The primary use of the IP Source/IP Destination Address policy occurs where you use the IP virtual address feature to give multiple IP addresses to a single physical interface. For example, you might have a cluster of servers providing network services, in which each service is associated with a virtual IP address over a given interface. If a service associated with an interface fails, the virtual IP address migrates to a physical interface on a different machine in the cluster. In such an arrangement, the IP Source Address/IP Destination Address policy gives you a greater chance of using more, different links within the trunk than would the IP Destination Address policy.

The -hash option to the nettr (1M) command enables you to determine over which link a given packet will travel. The following section describes hashing in greater detail.



Note - Sun Trunking 1.3, like any server trunking software, load balances the outgoing traffic, not the incoming packets. Trunking 1.3 software relies on the link partner (switch or server) to load balance the incoming packets.




procedure icon  To Use the Hashing Feature



Note - Trunking interfaces must be set up prior to using hashing features. If, for example, on one trunk, the link to transmit is 0, with the following hash command input, the policy IP Source and Destination Address would read as follows:




# /etc/opt/SUNWconn/bin/nettr -hash 0 device=ce ip=199.100.1.29/199.100.1.3
 
Name  Key  Policy  Source Address   Dest Address   Link to Transmit  
ce0   ce0   4    199.100.1.29      199.100.1.3     0 

The -hash option to the nettr (1M) command enables you to determine over which link a given packet will travel. For example, if you use the Destination IP Address policy, you can supply an IP address to a nettr -hash command to determine over which link a packet with the specified IP address will travel.


Interoperability

Sun Trunking 1.3 operates as a virtual network adapter that is visible to the system through the head or key instance. Applications will work transparently as though they are on a single link, yet experience the benefits of increased bandwidth and automatic failover. On applications that deal with a physical NIC, such as DR, you must simply unaggregate the trunk prior to performing those functions, then reaggregate the trunk when you are finished.

IEEE 802.3ad Link Aggregation

Sun Trunking 1.3 works in the static mode with 802.3ad switches. For a link to be part of an aggregation it must be running at full-duplex and at the same speed. The endpoints of the links must be terminated at the same switch or system.

Sun Trunking 1.3 also supports dynamic mode providing a fully compliant IEEE 802.3ad implementation. This includes the LACP protocol and associated Marker Responder. For more information on the LACP protocol, see Appendix B.

IP Multipathing

IP Multipathing (IPMP) works transparently with Sun Trunking 1.3. Configure two aggregations (two trunk-heads) and group these two aggregations into one IPMP group.



Note - IPMP failover may not happen if one of the links in an aggregation fails because Sun Trunking 1.3 software will failover to the next available link in the aggregation.




procedure icon  To Perform Dynamic Reconfiguration

Dynamic Reconfiguration (DR) works transparently with Sun Trunking 1.3. Here is how it works:

1. Unconfigure the aggregation:


# nettr -release

2. Unconfigure the Ethernet adapter:


# cfgadm

3. Change the Ethernet adapter.

4. Configure the Ethernet adapter:


# cfgadm

5. Reconfigure the aggregation:


# nettr -setup

VLAN

Sun Trunking 1.3 works transparently with 802.1q, but it is available only on Sun GigaSwift Ethernet adapters. For more information on configuring VLANs, refer to "Configuring VLANs," in the Sun GigaSwift Ethernet Adapter Installation and User's Guide, part number 816-1702-11.

When configuring VLANs on an aggregation (trunk), make sure that the link partner (or switch) has VLAN enabled on all the ports belonging this aggregation.

SunVTS Diagnostic Software

The SunVTS software executes multiple diagnostic hardware tests and is used to verify the configuration and functionality of most hardware controllers and devices.

Since trunking aggregates many network adapters behind a single head instance, these tests may not provide the information intended. Unaggregate all trunking interfaces to be tested before running SunVTS.

If you still want to use the SunVTS nettest option on an aggregated link, use the Round Robin policy option and then use the nettr -stats option to ensure that test traffic is flowing over all interfaces in the aggregation.



Note - To use the nettest diagnostic, you must have the SunVTS software installed on your system. Refer to the Solaris Sun Hardware Platform Guide, which was shipped with the Solaris Supplement CD, for instructions on how to install the SunVTS software.





Caution - Do not run the SunVTS netlbtest when links are aggregated. This test will not make sense on aggregated links because the packets are distributed to multiple links based on the load balancing policy.




Performance Tuning

Refer to the Solaris operating environment user documentation for more information.


Plumbing Multiple Streams on Trunk Members

The default behavior for Sun Trunking 1.3 does not expose trunk members to upper layers like IP. However, for performance sake, you may want to plumb multiple IP streams on member instances with different subnets on the trunk members to derive multiple connections to IP. You can achieve this by setting the laggr_multistream tuning variable in ce driver using ndd or ce.conf file.


procedure icon  To Configure Using ndd

1. Release all trunks to the ce device.


# ./nettr -conf
 
# ndd -set /dev/ce instance 0
# ndd -set /dev/ce laggr_multistream 1
# ndd -set /dev/ce instance 1
# ndd -set /dev/ce laggr_multistream 1

2. Repeat for all member instances within the trunk

You can configure the trunk now and plumb on one or all member instances.


# nettr -setup ....
# ifconfig ce0 plumb ...
# ifconfig ce1 plumb ....


procedure icon  To Configure Using driver.conf

1. Edit the /platform/sun4u/kernel/drv/ce.conf file and add the following line:


laggr_multistream=1;



Note - This feature is available only on Sun GigaSwift Ethernet (ce device drivers). When enabling this feature, be aware that certain Layer 3 protocols (like IPMP or Routing) may not work properly. It is best used in local LAN setup. This feature is disabled for VLAN streams. So, VLAN streams can only be plumbed on the key instance.



For example:


# ./nettr -setup 2 device=ce members=2,3 
 
Aggregation (key) : 2
        ce2
        ce3
 
trunk5-127# ifconfig ce123003 plumb 199.99.23.102 up
Sep  1 15:14:36 trunk5-127 ce: NOTICE: Vlan Capability available only on trunkhead
ifconfig: SIOCSLIFNAME for ip: ce123003: no such interface
# ifconfig ce123002 plumb 199.99.23.102 up
# 


Troubleshooting

If you have problems with Sun Trunking 1.3, use the following commands to gather information that may help resolve the problems.

Using the stats Option

Use the nettr -stats command to check whether network packets are showing in each trunk instance. In the following example, 1 represents the trunk head instance being monitored.


# /etc/opt/SUNWconn/bin/nettr -stats 0 Mar 30 15:26:58 2003
 
Name   Ipkts   Ierrs    Opkts  Oerrs  Collis  Crc   %Ipkts  %Opkts
 
ce0    66518099     0    67498218     0      0       0        50.00   50.00
ce1    66527490     0    67498218     0      0       0        50.00   50.00

If you use MAC policy, you may not see packets on certain interfaces, as shown in the example. This occurs because two or more clients may have MAC addresses with the last two bits identical. See Trunking Policies for more information.

Using the snoop Command

Use the snoop -d command to capture and inspect network packets. This command enables you to troubleshoot network problems at the packet level, allowing examination of the contents of a packet. The following shows example output for ce0.


# snoop -d ce0Using device /dev/ce (promiscuous mode)
199.100.1.10 -> 199.100.1.11 TCP D=5100 S=59412  Ack=2577009842 Seq=391268307  Len=1460 Win=8760
199.100.1.10 -> 199.100.1.11 TCP D=5100 S=59412  Ack=2577009842 Seq=391269767 Len=1460 Win=8760
199.100.1.10 -> 199.100.1.11 TCP D=5100 S=59412  Ack=2577009842 Seq=391271227  Len=1460 Win=8760
 

In this example, if there were packets meant for hostname hs4-net11, but none showed in the output from the snoop command, you would know a problem existed. In that case, you would check your host file, network connection, or your ethernet switch setup. Refer to the snoop(1M) man page for more information.

Because of the trunk head concept (as virtual link) in Sun Trunking 1.3, you might expect the snoop command on the trunk head instance to monitor the aggregation traffic. While Sun provides a feature in ce drivers that allows you to snoop the trunk member instance to monitor the running traffic on that instance, using the snoop command on trunk member instance can present confusing results.

The best way to look at the aggregation traffic is by using the trunk head instance (virtual link) and the nettr -stat key instead of using the snoop command on the trunk member instance. For example, if ce0 and ce1 are aggregated and ce0 is the trunk head and you run snoop on both ce0 and ce1, you will see some duplicated packets appear on the snoop output for both instances. That is because all the packets to this aggregation link will be seen by the snoop command to the trunk head instance (ce0), which appears as a "fat pipe" presenting this aggregation link, and at the same time, the packets physical using the trunk member port will also be seen by the snoop command to this trunk member instance (ce1).

Networking commands such as ifconfig (1M) and netstat (1M) work on any member instance.

Using the conf Option

Use the nettr -conf command to verify your trunking configuration.


# nettr -conf
Name    Key      Policy DEV Type   Original-Mac-Addr   Speed   Duplex    Link
  
 ce0   ce0          2         pci    8:0:20:8f:be:24      1000    Full      Up
 ce1   ce0                    pci    8:0:20:8f:be:24      1000    Full      Up

Make sure the Ethernet switch software and the Sun Trunking 1.3 software are configured symmetrically. For example, both Sun Trunking and the switch should be configured with the same number of links per trunk.

Once you have configured Sun Trunking 1.3 software, be sure to re-configure your switch to match the trunking configuration.

Error Messages

See your console for error messages when configuring a Sun GigaSwift Ethernet adapter or a Sun Dual FastEthernet and Dual SCSI/P adapter for trunking. It is best to aggregate and unaggregate links on the console because error messages from the console and nettr are displayed inline.



Note - If you are configuring a Sun Gigabit Ethernet adapter or a Sun Quad FastEthernet adapter, error messages are returned by nettr, but may not appear in the console.



A message similar to the following appears in the console stating that the aggregation already exists:


Jul  8 15:36:55 proboscis trslm: NOTICE: trunk(0): Aggregation exists.

A message similar to the following appears in the console stating that the aggregation already exists:


Jul  8 15:38:18 proboscis trslm: NOTICE: trunk link (ce0): device 
instance in use on aggregation 0

A message similar to the following appears in the console stating that the aggregation already exists:


trslm: NOTICE: trunk link (ce7): DL_ERROR_ACK for DL_ATTACH_REQ(11), 
errno 8, unix 0

User Hints

Getting Help

If you cannot resolve the problems and you have a SunService contract, send the information gathered from these commands to your SunService representative. You must have the following information ready:

Use the showrev command to display your operating system release:


% showrev
Hostname: proboscis-11
Hostid: 8081d6ca
Release: 5.9
Kernel architecture: sun4u
Application architecture: sparc
Hardware provider: Sun_Microsystems