1

A computer on the network is running a DHCP server unnecessarily.

However, it seems that Debian will always override whatever I put in /etc/network/interfaces with what it gets from the DHCP server?

However, if I remove the DHCP server from the network then the network interface on Debian doesn't come up at all.

All I want is a static address on the ethernet interface. Is that possible?

/etc/network/interfaces

# 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
#allow-hotplug enp2s0
auto enp2s0
iface enp2s0 inet static
        address 192.168.1.51
        netmask 255.255.255.0
        gateway 192.168.1.1

but

# ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host
       valid_lft forever preferred_lft forever
2: enp2s0: <BROADCAST,MULTICAST,DYNAMIC,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
    link/ether 00:16:cb:9c:eb:ce brd ff:ff:ff:ff:ff:ff
    inet 192.168.2.14/24 brd 192.168.2.255 scope global enp2s0
       valid_lft forever preferred_lft forever
    inet6 fe80::216:cbff:fe9c:ebce/64 scope link
       valid_lft forever preferred_lft forever

If I go to the Debian machine and do ifdown then ifup then the interface comes back up with both the required static address and the nonsense DHCP address!

Update

root@imac51:~# systemctl status NetworkManager systemd-networkd
Unit NetworkManager.service could not be found.
● systemd-networkd.service - Network Service
   Loaded: loaded (/lib/systemd/system/systemd-networkd.service; disabled; vendor preset: enabled)
   Active: inactive (dead)
     Docs: man:systemd-networkd.service(8)
root@imac51:~#
10
  • Do you have anything in /etc/network/interfaces.d/? Commented Oct 6, 2020 at 12:48
  • 1
    Check if you have systemd-networkd or network-manager. Another process seems to be configuring the interface. Commented Oct 6, 2020 at 12:49
  • interfaces.d is empty and neither systemd-networkd nor network-manager are on my $PATH as root. Commented Oct 6, 2020 at 13:09
  • If your system is using systemd, systemctl status NetworkManager systemd-networkd will tell you whether those services are running. If not, you should be able to detect NetworkManager with pgrep NetworkManager.
    – fra-san
    Commented Oct 6, 2020 at 13:50
  • 1
    It's just a default installation of Debian, so which one should it be? (It seems really crap that there are lots of ways to configure the network, they fight with eachother, it's unclear which is in use, and it's unclear which is supposed to be being used.) Commented Oct 6, 2020 at 13:54

0

You must log in to answer this question.

Browse other questions tagged .