On Sat, May 30, 2026 at 01:42:00PM +0200, Eivind Eide wrote:
> Thanks for suggestions. I tried to alter my setup, but only managed to
> stop traffic. It seems I could use help to get this right.
> 
> So as I said, on box2 there are only em0->vlan20
> cat /etc/hostname.em0
>   up
> cat /etc/hostname.vlan20
>   parent em0 vlan 20 vnetid 20
>   inet 192.168.20.2 255.255.255.0 192.168.20.255
>   up
> And I guess I can keep it that way.

makes sense.

> The issue is that I got different things going on box1, so I'll show.
> (There was vlan20 connected to vport2 connected to veb0.)
> First I guess I can then scrap vlan20 here and move the configuration to 
> vport2.
> cat /etc/hostname.vport2
>   inet 192.168.20.1 255.255.255.0 192.168.20.255
>   up
> 
> My current setup of veb0 was:
> cat /etc/hostname.veb0
>   add em1
>   add em2
>   add vport0
>   add vport1
>   add vport2
>   link0
>   up
> 
> (I guess I can remove link0.) What I want here is for em1 and em2 to
> be one pool, so the physical interfaces are just one interface.
> And then I currently want vport0 and vport1 to transmit any kind of
> traffic, but vport2 to ONLY transmit packets with the vnetid 20.
> I tried a couple of variations of tagged and untagged here, but it
> only resulted in no traffic on any interface.
> Anybody can give me a hand in getting this right?

sure.

you basically just have to add lines allowing vlan tags on specific
interfaces. you say you want em1 and em2 to carry vlan 20 tagged
packets, so you need to configure that like this:

    tagged em1 20
    tagged em2 20

and then you want vport2 to interact with vlan 20:

    untagged vport2 20

fyi, as sthen said in a previous email, you can use vlan on top of
vport, but it is an extra layer of packet processing. however, you would
have to allow the vlan tagged packets to travel over the vport
interface for that to work, ie:

    tagged vport2 20

> 
> -- 
> 
> 
> 
> Eivind Eide
> 
> "ONLY THOSE WHO ATTEMPT THE IMPOSSIBLE WILL ACHIEVE THE ABSURD"
> - Oceania Association of Autonomous Astronauts
> 

Reply via email to