Wednesday, August 8, 2007

Solaris Link Aggregation Update

The network guys set up the Cisco switch with LACP active for my two ports and the connection came right up. However, it seems that the load balancing is quite far from a 50/50 split across the interfaces that I expected to see. My research continues today. See my previous post for details of how this project started.

Tuesday, August 7, 2007

Solaris Link Aggregation

I'm setting up a server that will have quite a bit of network traffic. It's a Sun Microsystems V245 with four built in bge network interfaces. I've connected two of them and am hoping to aggregate them together to combine bandwidth into a logically bigger pipe.

Link aggregation used to be called Trunking in earlier versions of Solaris. Fortunately, I'm using a version of Solaris later than 10 1/06 which was the first version to natively support aggregation. Before that, one needed separate Sun Trunking software.

The Solaris System Administration Guide: IP Services contains the information you'll need to do this, though there are a couple of typos in the manual to work around.

Quick and dirty:

If you want to include a live network connection in the aggregate, you have to unplumb it first with "ifconfig bge0 unplumb" for example. You need to be on the console since that will drop your connection, of course.

Do "eeprom local-mac-address?" to make sure it's true. If it's not, do "eeprom local-mac-address?=true".

Your interfaces must be of the type bge, e1000g, or xge, and must run at the same speed and in full duplex mode (check with "dladm show-link").

Next, set up the aggregate interface with "dladm create-aggr -d bge0 -d bge1 1". That will set up an interface called "aggr1" with both physical interfaces, as shown with "dladm show-aggr".

Finally, do a "dladm modify-aggr -l passive 1", assuming that you'll be making the switch that you're connected to (see below) "active" for LACP. I think you can make both sides active or make the host active and the switch passive. I don't suppose both sides can be passive or no negotiation would take place.

For IPv4 addresses, create /etc/hostname.aggr1 (not /etc/hostname.aggr.1 as shown in the manual) with the hostname of the server in the file, matching the hostname to ip definition in /etc/hosts. Touch /reconfigure and reboot or "reboot -- -r" to do a reconfiguration reboot.

Do an "ifconfig -a" to show that aggr1 is now the defined interface with your correct mask.

If your interfaces are connected to a switch, as mine are, you need to configure the switch ports to be used as an aggregation, and if the switch supports LACP, if must be configured in either active or passive mode (either, but not off mode).

I configured my aggregation and the links are up and running. However, since my network guy hasn't configured the switch yet, I'm getting "WARNING: IP: Hardware address 'xx.xx.xx.xx.xx.xx' trying to be our address xxx.xxx.xxx.xxx!" messages in the messages log. They should go away when the switch is configured properly. Hopefully that won't be too much of a hassle for our guys.