For discussion of Alpine Linux development and developer support

3 2

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

Natanael Copa
Details
Message ID
<AANLkTikbcgrKEfjCvnFx5yMlDeDQKP34trnm8DIqnGKD@mail.gmail.com>
Sender timestamp
1279809937
DKIM signature
missing
Download raw message
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@lists.alpinelinux.org
Help:         alpine-devel+help@lists.alpinelinux.org
---

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

Natanael Copa
Details
Message ID
<AANLkTilT9hNKi9cK_EvSXAeqePi53qiqhEIdd6_vjuwG@mail.gmail.com>
In-Reply-To
<AANLkTikbcgrKEfjCvnFx5yMlDeDQKP34trnm8DIqnGKD@mail.gmail.com> (view parent)
Sender timestamp
1279810947
DKIM signature
missing
Download raw message
On Thu, Jul 22, 2010 at 4:45 PM, Natanael Copa <natanael.copa@gmail.com> wrote:
> Hi,
>
> Here is a crazy idea: let dhcpcd handle all network config.

I forgot to say, the biggest benefit would probably be that networking
would probably be alot more reliable.

Some options we have to configure loopback interface if we go for full
dhcpcd - since dhcpcd does not handle looopback interfaces at all:
* keep 'iface lo inet loopback' in  /etc/network/interfaces and start
'networking' service in addition to 'dhcpcd' service. (I dot this on
my lappy now - i'm not too happy with it)
* create a separate /etc/init.d/loopback service that only brings up
the lo interface.
* add a config option to /etc/conf.d/dhcpcd: enable_loopback=yes and
have the dhcpcd init.d script to configure it together with starting
dhcpcd.

I think I prefer the third option, but i woudl be ok with the separate
loopback service too (and have dhcpcd depend on it).

-- 
Natanael Copa


---
Unsubscribe:  alpine-devel+unsubscribe@lists.alpinelinux.org
Help:         alpine-devel+help@lists.alpinelinux.org
---

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

Nathan Angelacos
Details
Message ID
<4C48E747.1060200@nothome.org>
In-Reply-To
<AANLkTilT9hNKi9cK_EvSXAeqePi53qiqhEIdd6_vjuwG@mail.gmail.com> (view parent)
Sender timestamp
1279846215
DKIM signature
missing
Download raw message
Just so we are all talking about the same thing, do you mean

1. http://www.phystech.com/download/dhcpcd.html
2. http://roy.marples.name/projects/dhcpcd
3. http://developer.berlios.de/projects/dhcpcd/
5. busybox udhcpcd
or another dhcpcd?






---
Unsubscribe:  alpine-devel+unsubscribe@lists.alpinelinux.org
Help:         alpine-devel+help@lists.alpinelinux.org
---

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

Natanael Copa
Details
Message ID
<AANLkTi=0z9nP-tehiC=5aQASU5aS6MHcOzHpZ1Nuasun@mail.gmail.com>
In-Reply-To
<4C48E747.1060200@nothome.org> (view parent)
Sender timestamp
1279867017
DKIM signature
missing
Download raw message
On Fri, Jul 23, 2010 at 2:50 AM, Nathan Angelacos <nangel@nothome.org> wrote:
> Just so we are all talking about the same thing, do you mean
>
> 1. http://www.phystech.com/download/dhcpcd.html
No

> 2. http://roy.marples.name/projects/dhcpcd
> 3. http://developer.berlios.de/projects/dhcpcd/

Those two are the same. Yes, its Roy Marples' dhcpcd (also author of
openrc). No #2 is the correct homepage.

> 5. busybox udhcpcd
> or another dhcpcd?

No. this does not do link state and interface monitoring.

-- 
Natanael Copa


---
Unsubscribe:  alpine-devel+unsubscribe@lists.alpinelinux.org
Help:         alpine-devel+help@lists.alpinelinux.org
---