Re: how to bridge "native" vlan?

From: Benoit Chesneau <benoitc_at_enki-multimedia.eu>
Date: Wed, 27 Apr 2022 15:01:22 UTC
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ît

------- Original Message -------
On Tuesday, April 26th, 2022 at 12:08, Benoit Chesneau <benoitc@enki-multimedia.eu> wrote:


> I am trying
>
> `mkpeer vlan0: bridge 100`but so fat it is returningan error. Should I create the node first?
>
>
>
> Benoît 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-multimedia.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 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 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=100 hook="100" }
> > : msg vlan0: addfilter { vid=200 hook="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=100 hook="100" }
> > : msg vlan1: addfilter { vid=200 hook="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=100 hook="100" }
> > : msg vlan2: addfilter { vid=200 hook="200" }