Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 30 Mar 2013 14:48:02 -0500
From:      Mike Karels <mike@karels.net>
To:        Pablo Ribalta Lorenzo <rlp@semihalf.com>
Cc:        freebsd-net <freebsd-net@freebsd.org>
Subject:   Re: vlan with modified MAC fails to communicate
Message-ID:  <201303301948.r2UJm2PX061547@mail.karels.net>
In-Reply-To: Your message of Sat, 30 Mar 2013 12:04:40 -0600. <29d7f4b41db63f9410075b1881f813b6@smtp.semihalf.com>

next in thread | previous in thread | raw e-mail | index | archive | help
> As for if_vlan.c, I verified that in the case when NIC's MAC adress is
> modified, it updates the values in the vlan to keep them in sync. However,
> I don't see this behavior when the changes are performed over the vlan.

There is no existing driver API to add MAC addresses in FreeBSD, which is
what would be required to support different MAC addresses for different
VLANs.  I have added such an API @work (McAfee, in our firewall clusters),
but it is limited to a small number of drivers and exactly one additional
MAC in the current implementation.  A more general implementation would
support varying numbers of MACs per NIC before dropping into promiscuous
mode.

> >From what I see, looks like this behavior from FreeBSD side is expected and
> the changes should be incorporated to my NIC.

I'm not sure what you mean, but there is no existing code to propagate
a MAC change on a VLAN to its parent device.  I think it is a bug that
a change appears to work.

> Set the NIC to promisc mode whenever both MAC addresses are not equal looks
> like a good workaround, however try to work out some improvement in the
> packet filtering method looks more like a fix to me. What holds me back is
> the inherent loss of performance in promisc mode, but I need to see if I'm
> able to live with this overhead :)

This may not be so bad on a switched network.  Current drivers give you
all multicasts as well as all unicasts in promiscuous mode, but you really
don't need all multicasts in this case.

		Mike



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