From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1759285AbZFJOsv (ORCPT ); Wed, 10 Jun 2009 10:48:51 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1756450AbZFJOsl (ORCPT ); Wed, 10 Jun 2009 10:48:41 -0400 Received: from fg-out-1718.google.com ([72.14.220.153]:24564 "EHLO fg-out-1718.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754807AbZFJOsk convert rfc822-to-8bit (ORCPT ); Wed, 10 Jun 2009 10:48:40 -0400 DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=TwNUUJ7Vra8ZTX34KOQib/1OjV2bpPTdpyPEf7Q06UKDoqPlxSxmfwqP/YC94sRve+ m1QS9gFPkh2pZxErY0dzqDAdKmMyWKbo6IspAseUUPYV3IUMsihNPhCPi3wvDsWfIcPl aQzmXjYxnsCPxyEo1dXfmwVIL2BUvqBaizQwk= MIME-Version: 1.0 In-Reply-To: <4A2FC40E.4040106@trash.net> References: <91ac27070906081105x30171bedra10d244d382a6934@mail.gmail.com> <4A2E4A32.1060705@trash.net> <91ac27070906090608me50af3bv23b150d8d0cd0080@mail.gmail.com> <200906091430.32294.bcook@bpointsys.com> <91ac27070906100724v25c2328x6b343315358c8e12@mail.gmail.com> <4A2FC40E.4040106@trash.net> Date: Wed, 10 Jun 2009 17:48:40 +0300 Message-ID: <91ac27070906100748p1b2cb6bax56ecc230e556ae96@mail.gmail.com> Subject: Re: SOCK_RAW does not receive broadcast (with VLAN unless PROMISC) From: Gil Beniamini To: Patrick McHardy Cc: Brent Cook , David Miller , linux-kernel@vger.kernel.org, netdev@vger.kernel.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8BIT Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Dear Patrick, Below is my try to add vlan-id 24 on eth1, followed by "ip -d link list": root@StudentsHPA:/home/hpa# vconfig add eth1 24 ERROR: trying to add VLAN #24 to IF -:eth1:- error: File exists root@StudentsHPA:/home/hpa# ip -d link list 1: lo: mtu 16436 qdisc noqueue state UNKNOWN link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 2: eth0: mtu 1500 qdisc pfifo_fast state UP qlen 100 link/ether 00:15:17:1e:27:fa brd ff:ff:ff:ff:ff:ff 3: eth1: mtu 1500 qdisc pfifo_fast state UP qlen 100 link/ether 00:15:17:1e:e8:46 brd ff:ff:ff:ff:ff:ff 4: eth2: mtu 1500 qdisc pfifo_fast state UP qlen 100 link/ether 00:15:17:1e:e8:47 brd ff:ff:ff:ff:ff:ff 5: vlan24@eth0: mtu 1500 qdisc noqueue state UP link/ether 00:15:17:1e:27:fa brd ff:ff:ff:ff:ff:ff vlan id 24 6: vlan31@eth0: mtu 1500 qdisc noqueue state UP link/ether 00:15:17:1e:27:fa brd ff:ff:ff:ff:ff:ff vlan id 31 7: vlan32@eth0: mtu 1500 qdisc noqueue state UP link/ether 00:15:17:1e:27:fa brd ff:ff:ff:ff:ff:ff vlan id 32 8: pan0: mtu 1500 qdisc noop state DOWN link/ether 42:fe:3a:c7:dd:96 brd ff:ff:ff:ff:ff:ff Thanks Gil On Wed, Jun 10, 2009 at 5:32 PM, Patrick McHardy wrote: > Again, please don't top post. > > Gil Beniamini wrote: >> >> My application is a "proxy" and need to support few VLANs (for example >> vlan 24). >> I define all vlans on interface 'eth0' which is my "out i/f", while >> the other interface 'eth1' (used as "in i/f") I use with PF_PACKET / >> SOCK_RAW in order to handle VLANs by my application (starting with >> "arp broadcast"). >> When I try to define the same (relevant VLAN) on eth1 (inorder to >> check your suggestion), I get "Error: trying to add VLAN #24 to IF >> -:eth1:- error: file exist". >> It seems that linux does not allow to define the same VLAN # on more >> than a single i/f?! > > No, that has got to be a mistake. You can use the same ID once > per underlying device: > > # ip -d link list > > 4: vlan0@dummy0: mtu 1500 qdisc noop state DOWN >    link/ether d6:1f:c0:bd:b2:ec brd ff:ff:ff:ff:ff:ff >    vlan id 1000 > 6: vlan1@dummy1: mtu 1500 qdisc noop state DOWN >    link/ether 8a:17:13:5d:87:1a brd ff:ff:ff:ff:ff:ff >    vlan id 1000 > > If it doesn't work for you, please post the full commands > and ip -d link list output you used. >