Network management using DHCPCD/zh-cn

本文基于发布在Gentoo论坛的帖子 并解释了如何使用dhcpcd进行完整的网络堆栈管理.

设置
确保 dhcpcd 已经安装. 接下来，将它添加到默认运行级别并启动服务：

此设置偏离了Gentoo手册中的默认网络说明. 它具有在有线和无线网络接口之间提供自动切换的优点.

无线
For wireless, wpa_supplicant should be used. Create the configuration file if it does not exist.

测试
Stop and, then start  with debugging enabled and in the foreground to see  starting the connection.

静态IP地址
In case the network interface card should be configured with a static IP address, type it into the graphical user interface. Without the graphical user interface, entries can also be manually added to as described in Dhcpcd.

从 Gentoo net.* 脚本迁移
When migrating from Gentoo's net.* scripts it is essential to remove the scripts from the runlevels.

Any match starting with  must not have a runlevel assigned. In the above example, needs to be removed.

Once the network setup works well, it is possible to completely remove the old Gentoo scripts. To do so, disable the  useflag, re-emerge OpenRC and finally unmerge :

还可以删除旧的配置文件和符号链接：

网络依赖服务
Manipulating network dependent services by is no longer supported since openrc-0.16.4.

图形用户界面
A dhcpcd graphical user interface is provided by.

另请参阅

 * Dhcpcd
 * dhcpcd-ui

外部资源

 * Post 93 of Gentoo Forums :: View topic - TIP: Complete network stack without net.* scripts