This is my interfaces file:

    # This file describes the network interfaces available on your system
    # and how to activate them. For more information, see interfaces(5).

    source /etc/network/interfaces.d/*

    # The loopback network interface
    auto lo
    iface lo inet loopback

    # The primary network interface

    auto ens3
    iface ens3 inet static

Whenever I restart networking of do ifdown ens3 and ifup ens3, it still asks for a dhcp ip, and it gets a dhcp ip in addition to the static ip that is configured above. I'd rather it didnt and took the static ip only.

I don't have network manager installed.

  • Maybe there's some configuration in /etc/network/interfaces.d/ ?
    – ppuschmann
    Dec 7, 2020 at 7:48

3 Answers 3


Most likely dhcp queries aree caused by other configuration files.
Which dchp clients are installed?

man interfaces

The dhcp Method
This method may be used to obtain an address via DHCP with any of the tools: dhclient, pump, udhcpc, dhcpcd. (They have been listed in their order of precedence.) If you have a complicated DHCP setup you should note that some of these clients use their own configuration files and do not obtain their configuration information via ifup.

  • I did: locate dhcp And based on that output picked a file, and: $ dpkg -S /etc/dhcp/dhclient.conf isc-dhcp-client: /etc/dhcp/dhclient.conf So I definitely have isc-dhcp-client installed. Based on some of the other matches above I'm pretty sure this is the only dhcp client installed. I tried uncommenting everything in dhclient.conf, but this did not change what I see
    – Sirius
    Dec 4, 2020 at 13:58

I had to do the following two things

    systemctl stop systemd-networkd
    systemctl disable systemd-networkd
    systemctl stop systemd-networkd.socket
    systemctl disable systemd-networkd.socket
  • Note that you have disabled the new network configuration method, and you are continuing to use the antiquated method. At most one of these methods should be enabledf. Dec 4, 2020 at 15:41
  • I don't see that I need anything on offer than what I already get with the interfaces file. What's anitquated about it, apart from being mature?
    – Sirius
    Dec 7, 2020 at 14:39

Another way is to delete /etc/network/interfaces and /etc/network/interfaces.d/ , reboot and check what nmcli has to say about your interfaces. The tool called nmcli should be a part of a package called network-manager . Maybe make sure you have nmcli in the system, before you zap those legacy config files (or just move them into a backup location instead of deletion).

  • I already stated that I don't have network manager installed
    – Sirius
    Dec 7, 2020 at 14:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.