Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 27 Apr 2022 15:53:12 +0000
From:      Benoit Chesneau <benoitc@enki-multimedia.eu>
To:        "freebsd-net@FreeBSD.org" <freebsd-net@FreeBSD.org>
Subject:   Re: how to bridge "native" vlan?
Message-ID:  <xRO6Af1g7oqvf6E4KlwACRuEBqmWNT14p6Yao8NKqvzCdHDrNP2yD5-fbnkBzs4us4JBP7vWCY4siLAfXJg4k9ty9UJu4AQ3cvj2hEuUpX0=@enki-multimedia.eu>
In-Reply-To: <0RhhcsKLKqJaufaFaFO3ySBXX1Ldy-BC2hhzfUNVwjmqu6aokSy7ICFmAO8x3Gb3JoV_MplmrA0rt0BLFIlnvCtq3FaEaDLaVAx3oFRbsBg=@enki-multimedia.eu>
References:  <mOEoiwDtLyUdBfav7_Ygz5qfW3nQuT7KM1CnKoXN4haHc-j3gQIYC5GK-eIsCWScLlBhntQNZr42XD-2txcOpHG1rykfrb8CbWvcP84iXxs=@enki-multimedia.eu> <8E5C5DFB-B029-4B32-A67B-D09042ACCEE3@punkt.de> <20220423212002.GC3774@belenus.iks-jena.de> <fZ_IfYND_h1ZgPvR4GzRu_iJO7oHHQQSKW6uq1G9zjlxhVEhnPA1KjB6p7HWamL9wZ80RYQ16Kp1wr7f8dMWYLK7Vi-GKBnxGwPTKi0Rs2s=@enki-multimedia.eu> <0RhhcsKLKqJaufaFaFO3ySBXX1Ldy-BC2hhzfUNVwjmqu6aokSy7ICFmAO8x3Gb3JoV_MplmrA0rt0BLFIlnvCtq3FaEaDLaVAx3oFRbsBg=@enki-multimedia.eu>

next in thread | previous in thread | raw e-mail | index | archive | help

Do I read it well ? It seems that not matched tag are still decoded  in nom=
atch hook :

https://github.com/freebsd/freebsd-src/blob/373ffc62c158e52cde86a5b934ab4a5=
1307f9f2e/sys/netgraph/ng_vlan.c#L576-L599


Beno=C3=AEt

> Hi Lutz,
>
> I tried your solution, so far it works (once i figured it was "link0" and=
 not "0" :) . But the notmatch bridge will only receive the native vlan it =
seems. 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 benoitc@enki-multi=
media.eu wrote:
>
>
>
> > I am trying
> >
> > `mkpeer vlan0: bridge 100`but so fat it is returningan error. Should I =
create 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@donnerhac=
ke.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-multi=
media.eu:
> > > > > I have an interface on which multiple vlans are connected. I woul=
d like to bridge the vlan 100 and 200 but also have a bridge for the "nativ=
e" vlan 1. I Can setup a bridge for vlan 100 and 200 the way below I think =
but 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 t=
he frames.
> > > So you can split the VLANs using ng_vlan and connect them to the thre=
e 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" }



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