vlan naming scheme different between interfaces conf and run time change

Bug #1722534 reported by Immo
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
vlan (Ubuntu)
Won't Fix
Undecided
Unassigned

Bug Description

if my interfaces file contains an entry for vlan 0 (e.g. ens19.1991.0) the vname naming schema is automatically changed from no_pad to pad

but I do need the no pad schema.

it looks like /etc/network/if-pre.up/vlan works incorrect during startup phase.

Is there any way to fix the schema or is padding a must for prio tag ?

auto ens19
iface ens19 inet manual

auto ens19.1991
iface ens19.1991 inet manual
   vlan-raw-device ens19

auto ens19.1991.4090
iface ens19.1991.4090 inet manual
   vlan-raw-device ens19.1991

auto br_TB991_DPU
iface br_TB991_DPU inet static
   address 10.160.60.1
   netmask 255.255.255.240
   dns-nameservers 10.160.5.2
   bridge_ports ens19.1991 ens19.1991.4090 ens19.1991.0
   bridge_stp off
   bridge_fd 0
   bridge_maxwait 0
   pre-up ifup ens19

auto ens19.1991.0
iface ens19.1991.0 inet manual
   vlan-raw-device ens19.1991

Immo (iwetzel)
description: updated
Revision history for this message
Immo (iwetzel) wrote :

what can i do to get someone assigned

Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

@ddstreet (now subscribed) - I know you look for src:vlan is this something you have more context about?

Revision history for this message
Dan Streetman (ddstreet) wrote :

oh my, ifupdown/vlan is still in use?

you appear to be doing "QinQ" (802.1ad) not 802.1q. The ifupdown/vlan 'magic' detection of vlan interface naming wasn't designed to support that; it only was designed to support 802.1q (see 'VLAN INTERFACES' here: https://manpages.debian.org/buster/ifupdown/interfaces.5.en.html )

Also, 'vlan 0' typically means 'untagged' (is it even valid to tag with id 0?), so i'm not sure what exactly you want to do with a nested vlan id 0 inside another vlan.

Finally, you should be using systemd-networkd. In Ubuntu, ifupdown has long been deprecated and is no longer officially supported.

Anyway, if you *must* do things this way, try changing your interface names to remove the dots; e.g. instead of 'ens19.1991.0' call it 'ens19_1991_0', and that should avoid all the ifupdown/vlan magic 'auto-vlan' code that tries to detect in-name vlan ids and padding.

Changed in vlan (Ubuntu):
status: New → Won't Fix
Revision history for this message
Dan Streetman (ddstreet) wrote :

to be clear, this could arguably be considered a bug (that ifupdown/vlan doesn't correctly handle the magic auto-vlan-id detection for qinq, even if the vlan-raw-device is specified), but as we no longer support ifupdown/vlan, i don't think Ubuntu is the place to fix this; if it would be fixed at all, it should be reported to, and fixed by, Debian.

Revision history for this message
Immo W (immo-wetzel) wrote :

OK I see your points... It makes me sad. systemd.networkd is a mass and not useful for my requirements.

networkctl currently reporting 634 links listed at one of my SW routers here.
And I really do need a config file per group of links and bridges and IPs. Currently I dont see a way to implement this with systemd.networkd.

Regarding Vlan 0. This is quite important. Cos this is used to transport priorisation tags on layer 2. No need to inspect layer 3 or 4. So I can priotag some traffic and my switches can handle this correctly without additonal vlan tags.
Really common on telco world.

Revision history for this message
Dan Streetman (ddstreet) wrote :

> And I really do need a config file per group of links and bridges and IPs.
> Currently I dont see a way to implement this with systemd.networkd.

networkd's config design does tend to assume more of a 1:1 configfile-to-interface relationship, although it is possible to use a single network config file for multiple interfaces, by setting the [Match] section more widely (e.g. matching Name= on a pattern, like Name=ens3*). However I suspect you don't want to configure lots of interfaces in identical ways, so that may not help.

If you can attach/paste your ifupdown config file(s), I may be able to suggest corresponding networkd config, or at least it might help me understand typical telco networking config needs. Also you may want to check upstream systemd issue tracker to see if anyone has asked for changes to better accomodate telco needs, or open an issue yourself:
https://github.com/systemd/systemd/issues

There's also the systemd mailing list if you want to email them, or search for telco-related discussions:
https://lists.freedesktop.org/archives/systemd-devel/

Finally, you also can look at using netplan, which is a frontend for systemd-networkd (or NetworkManager) and its config files might be better for your use case - you can have one netplan config file to configure multiple interfaces, unlike systemd-networkd (netplan will auto-generate any/all needed networkd config files from the netplan config data).
http://manpages.ubuntu.com/manpages/hirsute/en/man5/netplan.5.html

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.