Re: /etc/network/interfaces with multiple network interfaces
- Date: Thu, 10 Jan 2019 07:41:49 +0300
- From: Reco <recoverym4n@xxxxxxxxxxxx>
- Subject: Re: /etc/network/interfaces with multiple network interfaces
On Wed, Jan 09, 2019 at 11:09:58PM +0100, Rainer Dorsch wrote:
> I have a system with two network interfaces, connecting to two subnets.
> For some reason the default route is going through eth0.3, I would want to
> have it through eth0.7.
Both of your VLANs are configured by DHCP, and have the same metric (0
> Is the default route determined by the order in /etc/network/interface of the
> interfaces or is there another algorithm behind?
What really happens is one default route get replaced by another.
Whichever happens to be getting the lease last - wins.
If you need the default route on eno1.7 to appear and to be used -
assign lower metric to it. Like this (32 and 64 are arbitrary):
iface eno1.3 inet dhcp
iface eno1.3 inet6 auto
iface eno1.7 inet dhcp
iface eno1.7 inet6 auto