[systemd-devel] systemd-networkd + VLANs problems

Tom Gundersen teg at jklm.no
Mon Feb 10 09:58:39 PST 2014


On Sat, Feb 8, 2014 at 8:39 AM, Oleksii Shevchuk <alxchk at gmail.com> wrote:
> So, I try to use VLANs feature introduced to systemd-networkd/git two
> weeks ago (54abf461d6b10dc270c4bb2aeac65f240ff1c5cd).
>
> I want to have next layout:
>
> Links:
>
> 1. Eth
> 1.1 Vlan1
> 1.2 Vlan2 (Ring1)
> 2. Bridge (Ring0)
> 2.1 Vlan2
>
> Networks:
>
> 1. Vlan1
> 2. Bridge
>
> So, I try next configs:
>
>> cat Ring0.netdev
> [NetDev]
> Name=br0
> Kind=bridge
>
>> cat Ring1.netdev
> [NetDev]
> Name=vlan2
> Kind=vlan
>
> [VLAN]
> Id=2
>
>> cat LocalLink.network
> [Match]
> Name=vlan2
>
> [Network]
> Bridge=br0
>
> .. and some other .network configs with IP configuration.
>
> At this point, nothing works -- no vlan links were created. So, I grep
> sources, and find out the Network.VLAN option (note - missing in man
> page). So I add some more configs:
>
>> cat Switch1.network
> [Match]
> Name=net1
>
> [Network]
> VLAN=vlan1
>
>> cat Switch2.network
> [Match]
> Name=net1
>
> [Network]
> VLAN=vlan2
>
> At this point I have successfully running/configured vlan1, but not
> vlan2.
>
> Then I manually create and up vlan2 with iproute2. At this point device
> were up, but systemd-networkd didn't put it to bridge.
>
> So, the question is: how should I configure this layout with two vlans
> on one ethernet, where one of vlans is bridged?

Hi Oleksii,

Thanks for the report.

I have just fixed a bug causing networkd not to allow more than one
vlan on a given device. You'll want a configuration file like:

>> cat Switch1.network
> [Match]
> Name=net1
>
> [Network]
> VLAN=vlan1
> VLAN=vlan2

The problem with having two .network files is that only the first one
(in alphabetical order) will be applied to your link (which is by
design).

I have not yet tested your full setup with the bridge as I'm at a
conference, but I'll get back to that in a coulpe of days.

Cheers,

Tom


More information about the systemd-devel mailing list