[systemd-devel] [PATCH] Add support for DHCP static route options in networkd

Tom Gundersen teg at jklm.no
Sun Jun 29 14:45:54 PDT 2014


On Fri, Jun 27, 2014 at 8:09 PM, Marcel Holtmann <marcel at holtmann.org> wrote:
> Hi Lennart,
>
>>>> I am tempted to say that we should try to apply as much information from
>>>> DHCP as we can by default, but make sure it doesn't become a security
>>>> problem. i.e. we should probably use metrics or so so that manual routes
>>>> always win, or routes to other interfaces.
>>>
>>> I think using metrics is a good idea. Are there some accepted
>>> guidelines on what reasonable
>>> values for route metrics should be? Static routes (from [Route]) are
>>> added with 0, what would
>>> a good value for DHCP routes be? 100? 1000?
>>
>> Hmm, something in the middle of the range, I figure, that is still nice
>> to type and look at for whatever that is. pick something... Also I
>> figure the default route added due to dhcp config should also use this
>> same metric.
>
> it might actually make sense to provide a configuration option for the metric value here. And if not present just default to something that make sense. Seems like 1024 is pretty popular.
>
> Allowing different metrics for multi homing situation seems like a neat benefit. If by all means possible, add all routes provided by DHCP for eth0 with metric A and for eth1 use metric B. You never know what kind of datacenter network configuration you encounter. I have seen really crazy ones in my lifetime ;)

Yeah, this makes sense. I've added it to the TODO.

Cheers,

Tom


More information about the systemd-devel mailing list