From owner-freebsd-net@FreeBSD.ORG Sat Mar 30 19:56:56 2013 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id CAB73816 for ; Sat, 30 Mar 2013 19:56:56 +0000 (UTC) (envelope-from mike@karels.net) Received: from mail.karels.net (mail.karels.net [IPv6:2001:470:c004::5]) by mx1.freebsd.org (Postfix) with ESMTP id 80C59944 for ; Sat, 30 Mar 2013 19:56:56 +0000 (UTC) Received: from mail.karels.net (localhost [127.0.0.1]) by mail.karels.net (8.14.5/8.14.5) with ESMTP id r2UJm2PX061547; Sat, 30 Mar 2013 14:48:03 -0500 (CDT) (envelope-from mike@karels.net) Message-Id: <201303301948.r2UJm2PX061547@mail.karels.net> To: Pablo Ribalta Lorenzo From: Mike Karels Subject: Re: vlan with modified MAC fails to communicate In-reply-to: Your message of Sat, 30 Mar 2013 12:04:40 -0600. <29d7f4b41db63f9410075b1881f813b6@smtp.semihalf.com> Date: Sat, 30 Mar 2013 14:48:02 -0500 Cc: freebsd-net X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: mike@karels.net List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 30 Mar 2013 19:56:56 -0000 > 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