Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.user > #204280

Re: /etc/network/interfaces with multiple network interfaces

From Reco <recoverym4n@enotuniq.net>
Newsgroups linux.debian.user
Subject Re: /etc/network/interfaces with multiple network interfaces
Date 2019-01-10 05:50 +0100
Message-ID <xeAs1-351-1@gated-at.bofh.it> (permalink)
References <xeumC-7Tz-5@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


	Hi.

On Wed, Jan 09, 2019 at 11:09:58PM +0100, Rainer Dorsch wrote:
> Hi,
> 
> 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
by default).


> 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):

# cam
auto eno1.3
allow-hotplug eno1.3
iface eno1.3 inet dhcp
	metric 64
iface eno1.3 inet6 auto
	accept_ra 0

# data
auto eno1.7
allow-hotplug eno1.7
iface eno1.7 inet dhcp
	metric 32
iface eno1.7 inet6 auto
	accept_ra 0

Reco

Back to linux.debian.user | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

/etc/network/interfaces with multiple network interfaces Rainer Dorsch <ml@bokomoko.de> - 2019-01-09 23:20 +0100
  Re: /etc/network/interfaces with multiple network interfaces Lee <ler762@gmail.com> - 2019-01-10 00:50 +0100
  Re: /etc/network/interfaces with multiple network interfaces Reco <recoverym4n@enotuniq.net> - 2019-01-10 05:50 +0100
    Re: /etc/network/interfaces with multiple network interfaces Rainer Dorsch <ml@bokomoko.de> - 2019-01-10 21:40 +0100

csiph-web