Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 18 Apr 2012 12:53:43 +1200
From:      Andrew Thompson <thompsa@FreeBSD.org>
To:        Ed Maste <emaste@freebsd.org>, freebsd-net@freebsd.org
Subject:   Re: lagg(4) MAC address selection proposal
Message-ID:  <CAFAOGNTARsF1Vp9uvxFsiD9i-NQ_ap3KAr6Q_-wFO_87DBiQdQ@mail.gmail.com>
In-Reply-To: <20120418003939.GA32603@sandvine.com>
References:  <20120418003939.GA32603@sandvine.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On 18 April 2012 12:39, Ed Maste <emaste@freebsd.org> 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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAFAOGNTARsF1Vp9uvxFsiD9i-NQ_ap3KAr6Q_-wFO_87DBiQdQ>