[systemd-devel] Forcing default route as the one provided by one interface

Lennart Poettering lennart at poettering.net
Thu Aug 14 11:41:59 PDT 2014


On Thu, 17.07.14 15:44, Mauricio Tavares (raubvogel at gmail.com) wrote:

>       Newbie question: if I have two interfaces (in separate networks)
> with each of them using DHCP, how can I specify that I want the
> default route to be the one being obtained by, say, interface A? I
> read through http://www.freedesktop.org/software/systemd/man/systemd.network.html
> and did not see any option to specify that a given interface is
> providing the default gateway. Am I missing something?
> 
> If such an option does not exist, would it be possible to have a, say,
> SetDefaultGateway/UseDefaultGateway (boolean) option to do so?

networkd should probably gain a way to define a default metric for all
routes defined on a specific .network, and maybe a second one as default
metric for all DHCP acquired routes on a specify network. That way you
could just set two different defaults for your two networks and the IP
stack will always use the right one.

Added to the TODO list.

Lennart

-- 
Lennart Poettering, Red Hat


More information about the systemd-devel mailing list