From owner-freebsd-net@FreeBSD.ORG Tue Jul 10 12:56:45 2012 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id D3EBA106566C for ; Tue, 10 Jul 2012 12:56:45 +0000 (UTC) (envelope-from aboyer@averesystems.com) Received: from mail.averesystems.com (50-73-27-109-cpennsylvania.hfc.comcastbusiness.net [50.73.27.109]) by mx1.freebsd.org (Postfix) with ESMTP id 985E98FC14 for ; Tue, 10 Jul 2012 12:56:45 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by mail.averesystems.com (Postfix) with ESMTP id A82D7480662; Tue, 10 Jul 2012 08:56:42 -0400 (EDT) X-Virus-Scanned: amavisd-new at mail.averesystems.com Received: from mail.averesystems.com ([127.0.0.1]) by localhost (mail.averesystems.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id QqAFofp7THnd; Tue, 10 Jul 2012 08:56:41 -0400 (EDT) Received: from riven.arriad.com (206.193.225.214.nauticom.net [206.193.225.214]) by mail.averesystems.com (Postfix) with ESMTPSA id 60933480653; Tue, 10 Jul 2012 08:56:41 -0400 (EDT) Mime-Version: 1.0 (Apple Message framework v1278) From: Andrew Boyer In-Reply-To: <5E4F49720D0BAD499EE1F01232234BA877435B2E28@AVEXMB1.qlogic.org> Date: Tue, 10 Jul 2012 08:56:36 -0400 Message-Id: <4C5FC147-2F49-4AE0-ADF3-C5381DE6580F@averesystems.com> References: <5E4F49720D0BAD499EE1F01232234BA877435B2E28@AVEXMB1.qlogic.org> To: Adarsh Joshi X-Mailer: Apple Mail (2.1278) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: "freebsd-net@freebsd.org" Subject: Re: lacp lagg port flags do not show correctly resulting in poor traffic distribution/performance X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Jul 2012 12:56:45 -0000 On Jul 9, 2012, at 8:38 PM, Adarsh Joshi wrote: > Hi, >=20 > I am trying to configure lacp lagg interfaces with 2 systems connected = back to back as follows: >=20 > Ifconfig lagg0 create > Ifconfig lagg0 laggproto lacp laggport ql0 laggport ql1 192.168.100.1 = netmask 255.255.255.0 >=20 > Sometimes, the lag interface comes up correctly but sometimes the = laggport flags do not show properly. Instead of = 1c, it shows values of 18. I have seen = similar issues reported on various forums with no solution. > Looking at the lagg driver code and reading the standard, I thought = the laggport flags ( defined in if_lagg.h) are based on the = LACP_STATE_BITS in file ieee8023ad_lacp.h. But the following ifconfig -v = output does not make any sense to me. >=20 > My concern is that when all the interfaces show flags as 1c, the = traffic is distributed across both the interfaces uniformly and I get = aggregated throughput. If not, the traffic flows only on 1 interface. >=20 > Is this a bug? How do I solve this? Or am I doing something wrong? >=20 > I am using Free-BSD 9.0 release. >=20 > System 1: > # ifconfig -v lagg0 > lag id: [(8000,00-0E-1E-08-05-20,0213,0000,0000), > (8000,00-0E-1E-04-2C-F0,0213,0000,0000)] > laggport: ql1 flags=3D18 state=3D7D > [(8000,00-0E-1E-08-05-20,0213,8000,000F), > (FFFF,00-00-00-00-00-00,0000,FFFF,0000)] > laggport: ql0 flags=3D1c = state=3D3D > [(8000,00-0E-1E-08-05-20,0213,8000,000E), > (8000,00-0E-1E-04-2C-F0,0213,8000,000E)] >=20 > System 2: >=20 > # ifconfig -v lagg0 > lag id: [(8000,00-0E-1E-04-2C-F0,0213,0000,0000), > (FFFF,00-00-00-00-00-00,0000,0000,0000)] > laggport: ql1 flags=3D1c = state=3D7D > [(8000,00-0E-1E-04-2C-F0,0213,8000,000F), > (FFFF,00-00-00-00-00-00,0000,FFFF,0000)] > laggport: ql0 flags=3D18 state=3D3D > [(8000,00-0E-1E-04-2C-F0,0213,8000,000E), > (8000,00-0E-1E-08-05-20,0213,8000,000E)] >=20 >=20 > thanks > Adarsh >=20 I don't think you have a port flags problem per se; the flags are = correctly displaying the state of the lagg. Your problem is that your = systems aren't negotiating the correct lagg configuration. Each tuple = after the laggport represents the [(actor state),(partner state)]. = Ports ql0 have been able to talk to their partners (each other). = Neither ql1 port has seen a response from a partner, though. You could try restarting the state machine on one box with 'ifconfig = lagg0 laggproto lacp'. To see the negotiation you'll need to rebuild = your kernel with '#define LACP_DEBUG 1' added to the top of = sys/net/ieee802.3ad_lacp.c. Or upgrade to a newer stable snapshot that = has the net.lacp_debug sysctl and turn it on. Or just turn off LACP. What does it get you in this configuration? Hope this helps, Andrew -------------------------------------------------- Andrew Boyer aboyer@averesystems.com