0

I do have a huge linux router setup. there are 3 real IFs and ~ 200 bridges with IPs and ubuntu takes to long to bring them up during boot phase..

I though no worries and removed the auto ens19.xxx stuff and bring them up later inside my own startup scripts ....

but since than the interfaces config partly not found.

here the IF config file content for the specific bridge. This worked succesful with the auto ens ... part existing!

 #auto ens19.2023
iface ens19.2023 inet manual
   vlan-raw-device ens19

#auto ens19.2023.4
iface ens19.2023.4 inet manual
   vlan-raw-device ens19.2023

#auto ens19.2023.4090
iface ens19.2023.4090 inet manual
   vlan-raw-device ens19.2023

#auto br_TB123
iface br_TB123 inet static
   address 10.160.61.97
   netmask 255.255.255.240
   dns-nameservers 10.160.5.2
   bridge_ports ens19.2023 ens19.2023.4 ens19.2023.4090

ifup -v ens19.2023 works as expected

Parsing file /etc/network/interfaces.d/TB123.cfg
Reading directory /etc/network/interfaces.d
if test -d /sys/class/net/ens19 -a             ! -d /sys/class/net/ens19.2023 ;     then         if test -d /sys/class/net/ens19/device/infiniband; then             echo 0x2023 > /sys/class/net/ens19/create_child;         else             /bin/ip link set up dev ens19;             /bin/ip link add link ens19 name ens19.2023 type vlan id 2023;      fi;     fi

Configuring interface ens19.2023=ens19.2023 (inet)
/bin/run-parts --exit-on-error --verbose /etc/network/if-pre-up.d
run-parts: executing /etc/network/if-pre-up.d/bridge
run-parts: executing /etc/network/if-pre-up.d/ethtool
run-parts: executing /etc/network/if-pre-up.d/ifenslave
+ [ inet = meta ]
+ IF_BOND_SLAVES=
+ [  ]
+ [  ]
+ [ -z  ]
+ exit
run-parts: executing /etc/network/if-pre-up.d/vlan
Set name-type for VLAN subsystem. Should be visible in /proc/net/vlan/config
run-parts: executing /etc/network/if-pre-up.d/wpasupplicant


/bin/ip link set dev ens19.2023 up 2>/dev/null || true
/bin/run-parts --exit-on-error --verbose /etc/network/if-up.d
run-parts: executing /etc/network/if-up.d/000resolvconf
run-parts: executing /etc/network/if-up.d/ethtool
run-parts: executing /etc/network/if-up.d/ifenslave
+ [ inet = meta ]
+ [  ]
run-parts: executing /etc/network/if-up.d/ip
run-parts: executing /etc/network/if-up.d/openssh-server
run-parts: executing /etc/network/if-up.d/vlan
run-parts: executing /etc/network/if-up.d/wpasupplicant
root@dsr-router-1:/etc/network#

but the following ifup -v ens19.2023.4 failed

if test -d /sys/class/net/ens19 -a             ! -d /sys/class/net/ens19.2023.4 ;     then         if test -d /sys/class/net/ens19/device/infiniband; then             echo 0x2023 > /sys/class/net/ens19/create_child;         else             /bin/ip link set up dev ens19;             /bin/ip link add link ens19 name ens19.2023.4 type vlan id 2023;  fi;     fi
RTNETLINK answers: File exists
Ignoring unknown interface ens19.2023.4=ens19.2023.4.

for me the ip link part is faulty here

//// update /////

I added a print to /etc/network/if-pre-up.d/vlan and started just the master vlan ifup ens19.2023

but see by your self

root@dsr-router-1:~# ifup ens19.2023
ens19.2023
Set name-type for VLAN subsystem. Should be visible in /proc/net/vlan/config
ens19.2023.4
Set name-type for VLAN subsystem. Should be visible in /proc/net/vlan/config
Added VLAN with VID == 4 to IF -:ens19.2023:-
ens19.2023.4090
Set name-type for VLAN subsystem. Should be visible in /proc/net/vlan/config
Added VLAN with VID == 4090 to IF -:ens19.2023:-
root@dsr-router-1:~#

ifup is iterating over all interfaces which name starts with ens19.2023 which is definitly wrong

4
  • What version of Ubuntu are you using? – David Jan 7 at 14:47
  • I use 18.04.2 LTS and due to some restrictions we installed the old interface conf stuff ... and it was working with the auto set – stackelk Jan 7 at 15:28
  • and ifquery shows correct main interfaces root@dsr-router-1:/etc/network/if-up.d# ifquery ens19.2023.4090 vlan-raw-device: ens19.2023 root@dsr-router-1:/etc/network/if-up.d# ifquery ens19.2023.4 vlan-raw-device: ens19.2023 root@dsr-router-1:/etc/network/if-up.d# ifquery ens19.2023 vlan-raw-device: ens19 – stackelk Jan 7 at 15:32
  • The ip link command must be /bin/ip link add link ens19.2023 name ens19.2023.4 type vlan id 4 in stead of /bin/ip link add link ens19 name ens19.2023.4 type vlan id 2023 so where can I write the real ticket for ? – stackelk Jan 7 at 16:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.