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:~#
/etc/network/interfaces.d/
?systemd-networkd
ornetwork-manager
. Another process seems to be configuring the interface.interfaces.d
is empty and neithersystemd-networkd
nornetwork-manager
are on my$PATH
asroot
.systemctl status NetworkManager systemd-networkd
will tell you whether those services are running. If not, you should be able to detect NetworkManager withpgrep NetworkManager
.