From nobody Wed Apr 27 15:01:22 2022 X-Original-To: freebsd-net@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 3CFE61AADA7B for ; Wed, 27 Apr 2022 15:01:41 +0000 (UTC) (envelope-from benoitc@enki-multimedia.eu) Received: from mail-4323.proton.ch (mail-4323.proton.ch [185.70.43.23]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "protonmail.com", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4KpMQr0lPKz3hbg for ; Wed, 27 Apr 2022 15:01:40 +0000 (UTC) (envelope-from benoitc@enki-multimedia.eu) Date: Wed, 27 Apr 2022 15:01:22 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=enki-multimedia.eu; s=protonmail; t=1651071691; bh=6g1BeAbKJFZ821vMm4ejPr5afU0/kMsBKv+6ZgDLK9I=; h=Date:To:From:Cc:Reply-To:Subject:Message-ID:In-Reply-To: References:Feedback-ID:From:To:Cc:Date:Subject:Reply-To: Feedback-ID:Message-ID; b=fu22gXEU2LjwWpqijNKwDAAedg3lH03q9YlN2I6bPVUP9lg204ATAe/ZCfHig3Gg7 F/aHRGclDhKDqI522nUylFkf7l25FpncfbE9lQyy2duRUeqr3D6U1VbJUCxrv0ekZ2 OXHvjPFA002rbOBRQFI/Alpkqf54Zfvm2yfVJV6U= To: Lutz Donnerhacke From: Benoit Chesneau Cc: "Patrick M. Hausen" , "freebsd-net@FreeBSD.org" Reply-To: Benoit Chesneau Subject: Re: how to bridge "native" vlan? Message-ID: <0RhhcsKLKqJaufaFaFO3ySBXX1Ldy-BC2hhzfUNVwjmqu6aokSy7ICFmAO8x3Gb3JoV_MplmrA0rt0BLFIlnvCtq3FaEaDLaVAx3oFRbsBg=@enki-multimedia.eu> In-Reply-To: References: <8E5C5DFB-B029-4B32-A67B-D09042ACCEE3@punkt.de> <20220423212002.GC3774@belenus.iks-jena.de> Feedback-ID: 9066678:user:proton List-Id: Networking and TCP/IP with FreeBSD List-Archive: https://lists.freebsd.org/archives/freebsd-net List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-net@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Rspamd-Queue-Id: 4KpMQr0lPKz3hbg X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=enki-multimedia.eu header.s=protonmail header.b=fu22gXEU; dmarc=pass (policy=none) header.from=enki-multimedia.eu; spf=pass (mx1.freebsd.org: domain of benoitc@enki-multimedia.eu designates 185.70.43.23 as permitted sender) smtp.mailfrom=benoitc@enki-multimedia.eu X-Spamd-Result: default: False [-2.50 / 15.00]; HAS_REPLYTO(0.00)[benoitc@enki-multimedia.eu]; TO_DN_EQ_ADDR_SOME(0.00)[]; R_DKIM_ALLOW(-0.20)[enki-multimedia.eu:s=protonmail]; REPLYTO_EQ_FROM(0.00)[]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+ip4:185.70.43.0/24]; MIME_GOOD(-0.10)[text/plain]; ARC_NA(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; TO_MATCH_ENVRCPT_SOME(0.00)[]; DKIM_TRACE(0.00)[enki-multimedia.eu:+]; DMARC_POLICY_ALLOW(-0.50)[enki-multimedia.eu,none]; NEURAL_HAM_SHORT(-1.00)[-1.000]; NEURAL_HAM_MEDIUM(-0.50)[-0.503]; MLMMJ_DEST(0.00)[freebsd-net]; RCVD_COUNT_ZERO(0.00)[0]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; SUBJECT_ENDS_QUESTION(1.00)[]; ASN(0.00)[asn:62371, ipnet:185.70.43.0/24, country:CH]; MID_RHS_MATCH_FROM(0.00)[] X-ThisMailContainsUnwantedMimeParts: N Hi Lutz, I tried your solution, so far it works (once i figured it was "link0" and n= ot "0" :) . But the notmatch bridge will only receive the native vlan it se= ems. Is there a way to get all the other tags, ie not filtered, as well? Beno=C3=AEt ------- Original Message ------- On Tuesday, April 26th, 2022 at 12:08, Benoit Chesneau wrote: > I am trying > > `mkpeer vlan0: bridge 100`but so fat it is returningan error. Should I cr= eate the node first? > > > > Beno=C3=AEt Chesneau > > Sent with ProtonMail secure email. > ------- Original Message ------- > On Saturday, April 23rd, 2022 at 23:20, Lutz Donnerhacke lutz@donnerhacke= .de wrote: > > > > > On Thu, Apr 21, 2022 at 02:11:54PM +0200, Patrick M. Hausen wrote: > > > > > > Am 21.04.2022 um 11:29 schrieb Benoit Chesneau benoitc@enki-multime= dia.eu: > > > > I have an interface on which multiple vlans are connected. I would = like to bridge the vlan 100 and 200 but also have a bridge for the "native"= vlan 1. I Can setup a bridge for vlan 100 and 200 the way below I think bu= t how to create a bridge for the "native" vlan? > > > > > > I don't have any experience with netgraph but I do know that > > > you cannot do that with if_bridge(4). If you make the physical > > > interface the member of a bridge, you cannot use additional > > > VLANs on that interface, anymore. > > > > > > Does anybody know if the same restriction applies to ng_bridge(4)? > > > > ng_bridge does not inspect the ethertypes only the mac addresses of the= frames. > > So you can split the VLANs using ng_vlan and connect them to the three = bridges: > > > > : mkpeer em0: vlan lower downstream > > : name em0:lower vlan0 > > : mkpeer vlan0: bridge 100 0 > > : mkpeer vlan0: bridge 200 0 > > : mkpeer vlan0: bridge nomatch 0 > > : msg vlan0: addfilter { vid=3D100 hook=3D"100" } > > : msg vlan0: addfilter { vid=3D200 hook=3D"200" } > > : name vlan0:100 bridge100 > > : name vlan0:200 bridge200 > > > > : mkpeer em1: vlan lower downstream > > : name em1:lower vlan1 > > : connect vlan1: bridge100: 100 1 > > : connect vlan1: bridge200: 200 1 > > : connect vlan1: bridge_untagged: nomatch 1 > > : msg vlan1: addfilter { vid=3D100 hook=3D"100" } > > : msg vlan1: addfilter { vid=3D200 hook=3D"200" } > > > > : mkpeer em2: vlan lower downstream > > : name em2:lower vlan2 > > : connect vlan2: bridge100: 100 2 > > : connect vlan2: bridge200: 200 2 > > : connect vlan2: bridge_untagged: nomatch 2 > > : msg vlan2: addfilter { vid=3D100 hook=3D"100" } > > : msg vlan2: addfilter { vid=3D200 hook=3D"200" }