This article describes possibilities for managing the network stack. Gentoo provides several tools for bringing up networking interfaces and managing network connections. In addition, Gentoo provides tools for managing dialup modem connections and for managing wifi connections and network authentication.
If you boot a Linux kernel all network interfaces are down. Something is needed to automatically bring them up, set static addresses, obtain dhcp leases on dynamic addresses, configure routes, DNS et cetera. Broadly speaking, we call this network management and netifrc or NetworkManager is used for this, or in simple situations dhcpcd can be used. In addition, specific tools are used for network authentication, ppp connections, vpn connections and for dhcp leases also the dedicated dhcpcd client can be used.
Gentoo's standard for network management is using netifrc (the net.* scripts described in the Gentoo Handbook). Alternatively, dhcpcd can be used in this role. Also work is ongoing to provide a new networking stack as part of OpenRC. If you only use static interfaces, you can already try this out by emerging OpenRC with the
newnet use flag and configuring /etc/conf.d/network and /etc/conf.d/staticroute.
sys-apps/openrc -netifrc -newnet
Comparison of provided functionality
Gentoo provides several tools for managing your network stack. Some perform overall management, while others mainly perform specific subfunctions, but may also perform overall management.
|Software||Manage interfaces||IP layer Including static addresses, routes, DNS||DHCP||WPA Wireless network authentication||802.1X Wired network authentication||PPP||GUI|
|Netifrc||Yes||Yes||Yes||No||No||No||No Can use gui of wpa_supplicant|
|DHCPCD||Yes||Yes||Yes||No||No||No||Yes See dhcpcd-ui article|
|NetworkManager||Yes||Yes||Yes As of version 1.20||No||No||No||Yes|
|wpa_supplicant||Yes||No||No||Yes||Yes||No||Yes qt5 use flag provides wpa_gui|
|iwd||Yes||No||Yes As of version 0.19||Yes||No||No||No|
|Point-to-point protocol (PPP)|
Comparison of network managers
There are different solutions for overall management of network connections. The differences between them are as such:
|Netifrc||Yes||Yes||Yes||Yes||Yes||Yes||Yes||No Can use gui of wpa_supplicant||Yes|
|DHCPCD||Yes||Yes||No||No||No||No||No||Yes See dhcpcd-ui article||Yes|
|ConnMan ConnMan is a command-line network manager designed for use with embedded devices, see also ||Template:?||Template:?||Template:?||Template:?||Template:?||Template:?||Template:?||Template:?||Template:?|
|OpenRC The <var>newnet</var> USE flag enables OpenRC's new network stack (experimental)]||Template:?||Template:?||Template:?||Template:?||Template:?||Template:?||Template:?||Template:?||Template:?|
- Sysfs#Usage — Which network interfaces are on the computer?
- How to keep classic network interface naming
- Dependency behavior (OpenRC)