Debian 10 keeps asking for dhcp IP even with static ip configuration

debiannetworkingstatic-ip

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
        address 192.168.3.202/24
        gateway 192.168.3.1
        dns-nameservers 192.168.3.200

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.

Best Answer

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.