Mail archive
alpine-devel

[alpine-devel] [RFC] replace network config with dhcpcd

From: Natanael Copa <natanael.copa_at_gmail.com>
Date: Thu, 22 Jul 2010 16:45:37 +0200

Hi,

Here is a crazy idea: let dhcpcd handle all network config.

Yes. dhcpcd is more than just a dhcp client, its like a netinterface
monitoring tool that can do link detection, set static ip address,
monitor ppp interface (and run hooks) and more.

Why?
Basically, ifup/ifdown and /etc/network/interfaces is not good enough.
Some of the problems:
* ifup -a (called by network start) will exit with failure if a dhcp
configured interface fails. this is not good as since the "net"
serivices is not started, none of the serivces depending on it won't
start. So you won't be able ssh to your box if ISP (via dhcp) is down.
* ifup <dhcp interface>, change interfaces file to static , ifdown &&
ifup. whoops! dhcp was not killed.
* only a wrapper to configure vlans, bonding and ppp interfaces. (you
put your script in the interfaces file)
* no link detection (do actions when link is detected)
* other distros seems to move to NetworkManager and such.

Some benefits with dhcpcd
* you can do fork to background on boot so "net" service starts
sucessful, even if ISP is down so all services depending on net starts
(firewall, sshd etc)
* link detection
* support for monitoring 3rdparty interfaces like ppp0 and execute
hooks on events. (useful for multi-isp with failover)
* dbus management interface that can modify the config file for you
(will probably make the ACF coding simpler)
* IPv4LL support (rfc 3927)

Some drawbacks:
* This is a *big* change that will basically break every configuration
out there. Way scary. However, most of it is there already.
Configuring static ip address and dhcp is there and works very well
(with link detection - plug out cable and static ip goes away from
interface - unless 'nolink' is configured in dhcpcd.conf)
* we need figure out how to configure ppp interfaces and how to set up
vlans/bond interfaces. Basically, we need to move the scripts some
place else (dhcp hooks?)
* there is currently no easy/obvious way to 'disable' an interface
temporarily. Well, there is: 'ip link set dev eth0' down will flush
the address and 'ip link set dev0 up' will have dhcpcd to reconfigure
it.
* lots of documentation needs to be written

Thoughts?

Since alpine-2.0 is breaking alots of things already, this might be a
good time to break even more things...

-- 
Natanael Copa
---
Unsubscribe:  alpine-devel+unsubscribe_at_lists.alpinelinux.org
Help:         alpine-devel+help_at_lists.alpinelinux.org
---
Received on Thu Jul 22 2010 - 16:45:37 UTC