lagg0.2 style vlans on lagg(4) interface

Max Laier max at love2party.net
Wed May 21 17:45:02 UTC 2008


On Wednesday 21 May 2008 19:31:46 Niki Denev wrote:
> If one tries to use lagg0.2 style vlans on lagg0 interface configured
> from rc.conf it does't work.
> The problem is that all of the cloned interfaces (lagg0 , lagg0.2, etc)
> are created before any other interface configuration is done,
> and in this case lagg0 is created, then lagg0.2 is created.
> But because lagg0 does not have any members yet, it's MAC address
> is all zeroes, and this is inherited by the vlan interfaces.
> At the next step the members are added to the lagg0 interface and it's
> mac address gets set,
> but the vlan interfaces never see this change and remain with mac
> address 00:00:00:00:00:00 and in unusable state.
>
> Does it sound reasonable for the vlan(4) interfaces to update their
> mac address when their parent changes it.
> (this should probably look more like the parent telling the vlans
> attached to it that it's mac has changed, but
> i'm not sure if the parent knows about children interfaces)

It doesn't (and shouldn't have to).  I'd simply add an 
EVENTHANDLER_INVOKE(ifaddr_event, ifp) to if_setlladdr() - we do that for 
INET[6] address already.  Then vlan (and any other device interested in 
LLaddress changes) can simply register to that eventhandler and resync.

-- 
/"\  Best regards,                      | mlaier at freebsd.org
\ /  Max Laier                          | ICQ #67774661
 X   http://pf4freebsd.love2party.net/  | mlaier at EFnet
/ \  ASCII Ribbon Campaign              | Against HTML Mail and News


More information about the freebsd-net mailing list