Comment 0 for bug 1771834

Revision history for this message
Stanislav Makar (smakar) wrote :

Is very useful feature in cases when you have two interfaces receiving default routes via dhcp

It was supported by ifupdown once ifmetric package was installed

http://manpages.ubuntu.com/manpages/bionic/man8/ifmetric.8.html

root@test:~# dpkg -L ifmetric
/.
/etc
/etc/network
/etc/network/if-up.d
/etc/network/if-up.d/ifmetric
/usr
/usr/sbin
/usr/sbin/ifmetric
/usr/share
/usr/share/doc
/usr/share/doc/ifmetric
/usr/share/doc/ifmetric/README.gz
/usr/share/doc/ifmetric/changelog.Debian.gz
/usr/share/doc/ifmetric/copyright
/usr/share/man
/usr/share/man/man8
/usr/share/man/man8/ifmetric.8.gz
root@vsamodid-test:~# cat /etc/network/if-up.d/ifmetric
#!/bin/sh
if [ -x /usr/sbin/ifmetric -a "${IF_METRIC}" ]; then
    /usr/sbin/ifmetric "${IFACE}" "${IF_METRIC}"
fi