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

Marcel Holtmann marcel at holtmann.org
Fri Jun 27 11:09:15 PDT 2014


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

Regards

Marcel



More information about the systemd-devel mailing list