From owner-freebsd-net@FreeBSD.ORG Wed Apr 18 00:53:43 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 E4C27106564A for ; Wed, 18 Apr 2012 00:53:43 +0000 (UTC) (envelope-from andy@fud.org.nz) Received: from mail-pz0-f44.google.com (mail-pz0-f44.google.com [209.85.210.44]) by mx1.freebsd.org (Postfix) with ESMTP id B5BC48FC22 for ; Wed, 18 Apr 2012 00:53:43 +0000 (UTC) Received: by dadz14 with SMTP id z14so29904598dad.17 for ; Tue, 17 Apr 2012 17:53:43 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:content-type :content-transfer-encoding:x-gm-message-state; bh=L+RqwNdLxKvQYOaI1XVu7jescaCmeeaRtuNkysZxdMc=; b=PR71RJ08PpIT1ZlEVQ8H3KDSCxEa8RlCQwaxkFuU6Hl6xEy4Fd+rRabWJjkiJeHBjd jVE1CWW1+J0U2GeOdcEAvsuw8VyWmRz1y6aYM99Qk6Zk6jMYpiiL3hpLqPdc7ZDACsWB iHz0eFPbzsxGQJ+QAuHAQA3SIRHByyPpvECKrw1z868YyNVnY+O/cODEAu4tP43BEAdD Il2S91uNVkcvSJfPwRUQX5P6X0ipt/U3iXlz1/XwklW3cyepWR3Jx46axw+C310eUx0j Odwz4dZPTG3ADTtVzq7rWEXzpPS6/F1gTdmZ8V+73osrfZtqEP2+/cwHCXD/gQWN+UL4 W3Hw== MIME-Version: 1.0 Received: by 10.68.236.132 with SMTP id uu4mr1815403pbc.11.1334710423473; Tue, 17 Apr 2012 17:53:43 -0700 (PDT) Sender: andy@fud.org.nz Received: by 10.68.239.164 with HTTP; Tue, 17 Apr 2012 17:53:43 -0700 (PDT) In-Reply-To: <20120418003939.GA32603@sandvine.com> References: <20120418003939.GA32603@sandvine.com> Date: Wed, 18 Apr 2012 12:53:43 +1200 X-Google-Sender-Auth: k5KccRGZXENtycyVzXV8e0vw8IE Message-ID: From: Andrew Thompson To: Ed Maste , freebsd-net@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Gm-Message-State: ALoCoQlxo+O7zm4RmbUfTbhTm6Y6w/HkdEcOyX/yDi4+BlS79SxGadodPsYCeDT6i+Mjeg6xUkC6 Cc: Subject: Re: lagg(4) MAC address selection proposal 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: Wed, 18 Apr 2012 00:53:44 -0000 On 18 April 2012 12:39, Ed Maste wrote: > When a new lagg(4) interface is created the link layer address from the > first port in the group is assigned to the lagg and to all other lagg > port members. =A0This means the address assigned to the lagg is different > if specified as, for example, "laggport em0 laggport em1" vs > "laggport em1 laggport em0". > > The code in lagg_port_create(), in if_lagg.c that chooses the first > l2 address: > > =A0 575 =A0if (SLIST_EMPTY(&sc->sc_ports)) { > =A0 576 =A0 =A0 =A0 =A0 =A0sc->sc_primary =3D lp; > =A0 577 =A0 =A0 =A0 =A0 =A0lagg_lladdr(sc, IF_LLADDR(ifp)); > =A0 578 =A0} else { > =A0 579 =A0 =A0 =A0 =A0 =A0/* Update link layer address for this port */ > =A0 580 =A0 =A0 =A0 =A0 =A0lagg_port_lladdr(lp, IF_LLADDR(sc->sc_ifp)); > =A0 581 =A0} > > For the current modes lagg supports this probably doesn't matter much, > but we have some improvements in the pipeline for which this behaviour > is undesirable. =A0(The first of which is an interface for choosing a > different master; this allows a failover lagg to be set to transmit on a > new port, without changing link states. =A0With the current behaviour thi= s > causes all ports in the lagg to then change their l2 address.) > > In looking into potential solutions I found that the bridgestp code in > bridge(4) searches the list of associated MAC addresses and uses the > lowest one when it needs to select one from a group. =A0I'd like to > propose using the same logic for lagg's MAC address selection. =A0Can > anyone foresee an issue with this change? =A0(I'm not aware of any lagg > use cases that rely on the current behaviour.) I do not foresee any issues. What we also need is a event trigger for various pseudo interfaces when the mac or primary interface changes, this would allow arp/nd6 to rebroadcast. Andrew