When it comes to configuring network interfaces on Raspberry Pi OS (formerly known as Raspbian), many users find themselves confused about what tools are actually managing their connection behind the scenes. Since Raspberry Pi OS is based on Debian, it inherits the flexibilityβand sometimes the complexityβof multiple coexisting network interface managers.
π‘ Note: Raspberry Pi OS typically uses dhcpcd
as its default network management daemon for headless versions, while NetworkManager
is used in the desktop variant.
You can check the active services using:
systemctl status dhcpcd
systemctl status NetworkManager
systemctl status systemd-networkd
systemctl status networking
Let’s break down the key players.
1. What is a Network Interface Management Framework?
A network interface management framework is a system or daemon that configures and manages network settings such as:
– Bringing up interfaces (e.g., eth0
, wlan0
)
– Assigning IP addresses (via static config or DHCP)
– Setting DNS servers
– Defining routes
These frameworks can operate at different levelsβfrom low-level tools to high-level, GUI-driven managers.
2. Available Network Management Frameworks on Raspberry Pi OS
a. dhcpcd
( in Raspberry Pi OS Lite)
- Type: Lightweight DHCP client daemon
- Service:
dhcpcd.service
- Config File:
/etc/dhcpcd.conf
- Usage: Although online resource says this is the default in most Raspberry Pi OS Lite images, but as far as I have seen, this is not really the default. lol
β How to install:
sudo apt update
sudo apt install dhcpcd5
β Example – Set static IP:
Edit /etc/dhcpcd.conf
:
interface eth0
static ip_address=192.168.1.100/24
static routers=192.168.1.1
static domain_name_servers=8.8.8.8 1.1.1.1
Then restart the service:
sudo systemctl restart dhcpcd
b. ifupdown
- Type: Traditional Debian tool
- Service:
networking.service
- Config File:
/etc/network/interfaces
- Usage: Legacy method, still supported
β How to install:
sudo apt update
sudo apt install ifupdown
β Example:
# /etc/network/interfaces
auto eth0
iface eth0 inet static
address 192.168.1.100
netmask 255.255.255.0
gateway 192.168.1.1
Restart:
sudo systemctl restart networking
π Debian network interface guide
c. systemd-networkd
- Type: Modern, systemd-integrated
- Service:
systemd-networkd.service
- Config Files:
/etc/systemd/network/*.network
- Usage: Ideal for headless, server-like setups
β How to install:
sudo apt update
sudo apt install systemd-networkd
Enable and start service:
sudo systemctl enable --now systemd-networkd
β Example:
Create a file /etc/systemd/network/10-eth0.network
:
[Match]
Name=eth0
[Network]
Address=192.168.1.200/24
Gateway=192.168.1.1
DNS=8.8.8.8
d. NetworkManager
(Default in Raspberry Pi OS Desktop)
- Type: Desktop-oriented network manager
- Service:
NetworkManager.service
- Config Files:
/etc/NetworkManager/*
, usuallykeyfile
format - Usage: Comes with GUI and CLI tools
β How to install:
sudo apt update
sudo apt install network-manager
β Tools:
- CLI:
nmcli
- TUI:
nmtui
- GUI: Default network icon in desktop taskbar
β
Example – Using nmcli
:
nmcli con add type ethernet ifname eth0 con-name static-ip \
ip4 192.168.1.150/24 gw4 192.168.1.1
nmcli con mod static-ip ipv4.dns "8.8.8.8 1.1.1.1"
nmcli con up static-ip
π NetworkManager docs
3. Comparison Table
Feature | dhcpcd | ifupdown | systemd-networkd | NetworkManager |
---|---|---|---|---|
Headless-friendly | β | β | β β | β (needs config) |
GUI support | β | β | β | β β |
DHCP support | β | β (via dhclient) | β | β |
Static IP | β | β | β | β |
VPN/Wi-Fi profiles | β | β | β | β β |
Complexity | Low | Medium | Medium | High |
Config file | /etc/dhcpcd.conf |
/etc/network/interfaces |
/etc/systemd/network/ |
/etc/NetworkManager/ |
Default on RPi OS Lite | β | β | β | β (Desktop only) |
4. When to Use What?
β For Raspberry Pi OS Lite (Headless)
- Use
dhcpcd
if you want simplicity and quick static IP setup - Use
systemd-networkd
if you want more control (e.g., multiple interfaces, VLANs, bridges)
β For Raspberry Pi OS Desktop
- Stick with
NetworkManager
, it integrates well with the desktop GUI - Use
nmcli
ornmtui
for CLI/TUI configuration
β Advanced Networking
- Use
systemd-networkd
for precise setups and automation - Avoid
dhcpcd
andifupdown
in complex scenarios (like routing tables, bridges)
5. How to Tell Which One is Active
Use systemctl
to check running network services:
systemctl is-active dhcpcd
systemctl is-active NetworkManager
systemctl is-active systemd-networkd
Use ps aux | grep network
to see running daemons.
6. How to Switch Between Managers Safely
- Disable the current one:
sudo systemctl disable --now dhcpcd
sudo systemctl disable --now NetworkManager
- Enable the one you want:
sudo systemctl enable --now systemd-networkd
- Check interface naming (
eth0
,enx...
, etc.) and update your config files accordingly.