Debian 13 Tutorial / Identify Network and DNS Management

Before changing Debian 13 networking, identify whether ifupdown, NetworkManager or systemd-networkd manages the particular interface. Compare service activity with that interface’s configuration and runtime records, then separately trace the Domain Name System (DNS) configuration. An installed command alone does not identify the manager; this guide uses queries without restarting networking or changing addresses.

Inspect Interfaces, Addresses and Routes

Log in to Debian as a regular user and execute the following. Verify this while keeping remote SSH access and the VM console open. Do not bring down any interfaces or restart network services yet.

ip -br link
ip -br address
ip route

Interfaces are the units of network connections that the operating system handles. 'lo' is the loopback for self-communication, and physical or virtual network cards have other names like 'enp0s3'. Check the names in your own output and use the same values in the examples that follow. IP addresses are separate from device names, and even if an address is assigned, external communication can fail if the default route or DNS is incorrect.

In the verified minimal Debian 13.7 VM, 'enp0s3' was UP with IPv4 10.0.2.15/24, and the default gateway was 10.0.2.2. These values are from a VirtualBox NAT lab and are not recommended fixed addresses for a company or home network. There were also separate IPv6 addresses, so the overall status was not judged based on the single IPv4 line alone.

Record the current addresses and routes before changing anything. Use the server baseline collection script or store the query output in access-controlled work records. Review address and host details before sharing network information externally.

Compare Service State with Interface Ownership

As in Debian networking reference, network tools may differ depending on the installation configuration. Do not assume a single default configuration for minimal servers, desktops, or cloud images. First, check the status of the related services.

systemctl show -p Id -p ActiveState -p SubState networking.service NetworkManager.service systemd-networkd.service systemd-resolved.service
command -v nmcli
command -v networkctl
command -v resolvectl

If there is no output from command -v, it means it was not found in the current command search path. That alone does not confirm the absence of all settings. Compare installation and activation status along with actual interface settings. Do not blindly install a new network manager that would compete with the existing connection manager just to use query commands.

Management method Main items to check Clues to actual management
ifupdown /etc/network/interfaces and the files included The interface definition and /run/network/ifstate record
NetworkManager Connection profile and device status Active profile connected to the device in nmcli
systemd-networkd .network file and link status Corresponding link configuration status and matching file in networkctl
systemd-resolved Name resolution service and per-link DNS It handles DNS resolution; its presence does not identify the tool configuring interface addresses.

In this VM, networking.service was active (exited). A service whose startup task has finished can remain active without a long-running daemon, so exited alone is not evidence of failure. Conversely, a running NetworkManager service can leave a particular device unmanaged. Decide ownership per interface rather than from a server-wide service name alone.

Match ifupdown Definitions with Runtime Records

ifupdown managed this minimal installation. Read /etc/network/interfaces and any files brought in by source directives before interpreting the runtime records.

cat /etc/network/interfaces
find /etc/network/interfaces.d -maxdepth 1 -type f -print
sudo ifquery --list
sudo ifquery --list --allow=hotplug
sudo ifquery --state enp0s3
cat /run/network/ifstate

The following is the relevant configuration observed in this VM. It is explanatory output, not a complete replacement file for another system.

source /etc/network/interfaces.d/*

auto lo
iface lo inet loopback

allow-hotplug enp0s3
iface enp0s3 inet dhcp
iface enp0s3 inet6 auto

inet dhcp is an item that receives IPv4 settings via DHCP (Dynamic Host Configuration Protocol). inet6 auto is a separate item for automatic IPv6 configuration. The syntax of auto, allow-hotplug, and included files can be checked in the interfaces manual. allow-hotplug is a processing condition based on device recognition and should not be assumed to behave in the same way each time a network cable is reconnected.

The actual ifquery --list only displayed lo. According to the ifquery manual, the default list is the auto items, and after specifying --allow=hotplug, enp0s3 was visible. Therefore, it should not be judged that ifupdown does not manage a target simply because it is not in the first list.

ifquery --state enp0s3 and ifstate showed enp0s3=enp0s3. This is the state recorded by ifupdown. After manually changing with the ip command, the recorded and actual states may differ, so we compare it together with the previous address and route lookup. Ifquery is a command that reads the configuration, and it is distinguished from commands like ifdown/ifup that modify connections.

Inspect NetworkManager or networkd When Applicable

On a system where NetworkManager is installed and running, query the device and active profile as follows. NetworkManager was not installed in the minimal lab VM, so this branch gives documented commands rather than a claimed lab result.

nmcli device status
nmcli connection show --active
nmcli device show enp0s3

According to the nmcli manual, check the status of the device and the connected profile. If it is unmanaged, read the unmanaged policy and investigate whether another tool is actually responsible. The presence of a profile file in the directory alone does not confirm that the profile is currently active.

If systemd-networkd is running and manages the link, check the following. We do not stop the current ifupdown to perform this check.

networkctl list --no-pager
networkctl status enp0s3 --no-pager

In the SETUP column described by the networkctl manual, unmanaged means networkd does not manage that link. Another tool may still provide working networking. Compare the matching .network file with the link’s actual state.

In the practice VM, the networkctl command itself existed, but the networkd service was not running. An actual status request triggered a warning that the information might be incomplete because the service was not running, along with a connection error. This is an example showing that the presence of the command alone cannot be concluded to indicate networkd management.

Trace DNS Configuration and Name Lookup

DNS (Domain Name System) is used to look up names into addresses. The tool that assigns addresses and the tool that handles name resolution do not have to be the same program. Check the actual file path and the system's lookup order.

ls -l /etc/resolv.conf
readlink -f /etc/resolv.conf
cat /etc/resolv.conf
grep '^hosts:' /etc/nsswitch.conf
pgrep -a dhcpcd
getent hosts localhost
getent ahostsv4 deb.debian.org

If resolv.conf is a symbolic link, check whether the final target is under /run/systemd/resolve or if it is another path such as NetworkManager or resolvconf. Even if it is a regular file, it does not mean it is managed manually by a person. The program that creates it may rewrite it regularly. The hosts line in nsswitch.conf determines the name resolution path used by programs, and getent queries through that system path.

In this VM, resolv.conf was a regular file with a header identifying dhcpcd as its generator. The dhcpcd process and installed dhcpcd-base 10.1.0 package were also verified. The dhcpcd manual explains that it uses resolvconf when available and otherwise writes resolv.conf directly. Neither resolvconf nor systemd-resolved was installed here, and the hosts lookup line was files dns.

The nameserver addresses in the file vary depending on DHCP, router, and VM environment. Do not arbitrarily change them to public DNS for the example; check your organization's internal name resolution and policies. Directly editing the file managed by dhcpcd can be overwritten during updates, so you should determine the location to change first.

On a system actually using systemd-resolved, resolvectl status reports per-link DNS and resolution paths. The minimal lab VM had no resolvectl command, so do not assume its output applies here. Successful name resolution and a successful connection to a remote service port are separate checks.

Record the Findings Before Making Changes

Once the checks are complete, record the following items for your own reference. Do not copy the conclusions of this example as defaults for other Debian servers.

  • The actual name of the interface to change, current address, and default route
  • Tools managing the respective interface and applied configuration files
  • Whether DHCP or static is set, inclusion files, and whether they match the current execution records
  • The actual path of the DNS file, its creator, and the system name lookup method
  • Backup before changes, console access method, and recovery path if failure occurs

The lab evidence identifies ifupdown as configuring enp0s3 through DHCP and dhcpcd as updating its DNS file. The other managers were inactive or absent. Actual output distinguishes this from the misleading conclusions one could draw from the presence of networkctl or the default ifquery list alone. No addresses, routes or configuration files were changed, and no network service was restarted during these queries.

If different managers apply addresses or paths to the same interface simultaneously, settings can be overwritten or connections interrupted. On the other hand, the mere fact that multiple managing services are installed cannot be concluded as a conflict. The ownership scope of each interface should be confirmed first, and only the configuration of the required tools should be changed.