From owner-freebsd-net@FreeBSD.ORG Fri May 2 20:59:44 2014 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5896E795 for ; Fri, 2 May 2014 20:59:44 +0000 (UTC) Received: from mail-wi0-x232.google.com (mail-wi0-x232.google.com [IPv6:2a00:1450:400c:c05::232]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id DD7711A37 for ; Fri, 2 May 2014 20:59:43 +0000 (UTC) Received: by mail-wi0-f178.google.com with SMTP id hm4so2980199wib.5 for ; Fri, 02 May 2014 13:59:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=/r43hhrV+AYcERhPYxiq2dedVTWLBuXcCuHnsreY3cQ=; b=xEYGu41pQD/YgJUdEKtdrotVcBpwi9NwGMDxfNrWE0oKdkyPc8Q6uyran5y5xd8h8u FeIkoW+YqskJPcKnVwKViyBdMRkUMkwgYTJbihhhW0Zr0cEgJ9oCGifrhgyymOBL7T9w sttkZmh81Hidpx+dapREXAKdadOAfDNOy4bjUdlu2LBO7j0VgySBPYf/9aX/fPkW4A90 AISmUXRWHXVgVigY3rLiZmKjUYuU2NIH67ArmRh3bkpbqmvZPiM0TqQhLg8UETibKglF XLzGA4+ViM77JsmBjhBZhx4gT2AzFTuD44WLG7jU3CdRjUEdD0vEtHTsXzAyowUQwab/ l5fA== MIME-Version: 1.0 X-Received: by 10.180.207.10 with SMTP id ls10mr4694499wic.22.1399064382173; Fri, 02 May 2014 13:59:42 -0700 (PDT) Received: by 10.216.241.73 with HTTP; Fri, 2 May 2014 13:59:42 -0700 (PDT) In-Reply-To: References: Date: Fri, 2 May 2014 23:59:42 +0300 Message-ID: Subject: Re: bridge Untagged packets on an interface From: =?UTF-8?B?w5Z6a2FuIEtJUklL?= To: "freebsd-net@freebsd.org" Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.17 X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 May 2014 20:59:44 -0000 And also i tried ng_bpf + ng_eiface conjuction, but ng_bpf doesnt match "vlan" filter. With the script below, ng_bpf always calls ifNotMatch hook. When the pattern is "ip", ng_bpf matches frames have both vlan and ip headers. I think ng_bpf doesnt process ethernet header. Is there a way to process ethernet header with ng_bpf ? Script is below: #!/bin/sh ETHER_IF=3Dem0 PATTERN=3D"vlan" BPFPROG=3D$( tcpdump -s 8192 -ddd ${PATTERN} | \ ( read len ; \ echo -n "bpf_prog_len=3D$len " ; \ echo -n "bpf_prog=3D[" ; \ while read code jt jf k ; do \ echo -n " { code=3D$code jt=3D$jt jf=3D$jf k=3D$k= }" ; \ done ; \ echo " ]" ) ) echo $BPFPROG # Shutdown nodes if exists ngctl shutdown ${ETHER_IF}: ngctl shutdown vlan_filter: ngctl shutdown tag0: ngctl shutdown untag0: ngctl -f- < w= rote: > Hi, > > Assume that default vlan untagged and VLAN 10, 20, 30, 40 tagged on switc= h > connected to em0 interface. > > i am trying to bridge only untagged frames on em0 with em1. > > Does if_vlan handle untagged frames? > > # ifconfig em0.0 create > ifconfig: SIOCIFCREATE2: Invalid argument > > Any ideas? > > Best regards, >