[systemd-devel] Ignoring default gateway when configuring via dhcp

Jetchko Jekov jetchko.jekov at gmail.com
Sat Aug 15 03:20:41 PDT 2015


Umm, not exactly what I meant. Let me quote an excerpt from RFC3442.

"If the DHCP server returns both a Classless Static Routes option and
   a Router option, the DHCP client MUST ignore the Router option."

As you see ignoring Router option is not an optional in this case. The
default route (if dhcp server want to offer one) must be in included
in rfc3442 option.
What I ask for is a consistent way to specify that I don't want
default gateway installed. I want the rest of the routes if DHCP
server offers some.

And I don't think that too specific.  My use case is deploying multi
vm applications on OpenStack. Virtual networks there are managed by
neutron and you get IP/routes via dhcp.
I need an option to ignore default route on specific interface in some
VMs but not in other VMs connected to same virtual network.
If you think that's too specific, its OK I will continue to use
dhclient. But I though that it will be good thing to remove yet
another package (simplification and minimization of the base image)
and use systemd inbuilt features as its there anyway.

Jeka


On Fri, Aug 14, 2015 at 7:32 PM, Lennart Poettering
<mzerqung at 0pointer.de> wrote:
> On Mon, 10.08.15 11:47, Jetchko Jekov (jetchko.jekov at gmail.com) wrote:
>
>> Greetings,
>>
>> I am investigating a possibility for using systemd-networkd for
>> networking setup but I am not able to figure out how to configure
>> networkd to skip installing a default gateway even if dhcp server
>> offers one.
>> Just for clarification, I guess UseRoutes=false can be used if there
>> is only default gateway offered, but in case when dhcp server provides
>> classless static routes option (RFC3442) with additional routes, the
>> default gateway is specified there too and I cant find a way to ignore
>> it.
>
> Hmm, so let me get this right: if both the default route and the
> rfc3442 routes are contained in the DHCP lease, then you want us to
> optionally ignore the default route, but keep the rfc3442 routes?
>
> What#s the usecase for this? Sounds quite specific too me, and not
> useful in the general case, no?
>
> Lennart
>
> --
> Lennart Poettering, Red Hat


More information about the systemd-devel mailing list