We have discus with @runar in slack and have some result with testing VM with 20+ interfaces.
When router booting, part of interfaces adding by coldplug function and other by hotplug.
And after boot system we have next:
vyos@vyos:~$ show interfaces
Codes: S - State, L - Link, u - Up, D - Down, A - Admin Down
Interface IP Address S/L Description
--------- ---------- --- -----------
eth0 - A/D
eth1 - A/D
eth2 - A/D
eth3 - u/u
eth4 - A/D
eth5 - A/D
eth6 - u/u
eth7 - A/D
eth8 - u/u
eth9 - A/D
eth10 - A/D
eth11 - A/D
eth12 - A/D
eth13 - A/D
eth14 - A/D
eth15 - A/D
eth16 - A/D
eth17 - A/D
eth18 - A/D
eth19 - A/D
eth20 - A/D
eth21 - A/D
lo 127.0.0.1/8 u/u
::1/128If we look in to configuration
vyos@vyos:~$ show configuration commands | match interface set interfaces ethernet eth3 hw-id '50:00:00:05:00:03' set interfaces ethernet eth6 hw-id '50:00:00:05:00:06' set interfaces ethernet eth8 hw-id '50:00:00:05:00:08' set interfaces loopback lo
And for this task @runar have workaround, which can solve this issue, and some issues with interface naming. We can modify vyos-router and add next:
# On boot time udev migth take quite a lot of time to reorder nic's, this will ensure that
# all udev activity is completed and all nics present at boot-time will have their final name before
# continuing with vyos-router initialization.
echo "`date '+%a %b %d %H:%M:%S %Y'`: vyos-router: Waiting for NIC's to settle down" | tee -a /run/udev/log/vyatta-net-name.coldplug
SECONDS=0
udevadm settle
echo "`date '+%a %b %d %H:%M:%S %Y'`: vyos-router: NIC's used ${SECONDS}sec to settle down" | tee -a /run/udev/log/vyatta-net-name.coldplug