Score:0

Cannot disable DHCP on Debian 11

cn flag

I have an IBM BladeCenter E with Debian 11 install on a blade server, and I am trying to set up the network with two interfaces (provided on each blade server): one for local network for NFS and one for occasional internet access with static address. NFS works and sometimes the static address did, too... Until I installed LXDE and all the stuff which comes along with it.

In the beginning, I just installed what comes with the Debian 11 netinst distribution on a USB stick because I couldn't set up the network at the time of installation. Then I somehow was able to statically configure the network via /etc/network/interfaces and installed NFS client side and LXDE and some other stuff like GCC and vim, and numpy.

But after I rebooted it to see if the NFS works (which it did), I couldn't connect to the Internet anymore. It keeps now adding dynamic addresses to all interfaces sans lo, in the range 169.254.x.x, which, as I now have learned, means it fails to connect to a DHCP server (because there is no any). There is no NetworkManager or netplan installed, and systemd-networkd is disabled. I tried adding systems configuration as well (as described here: https://forums.debian.net/viewtopic.php?f=5&t=142839&sid=ca6b09a442b04ebec06fbcb6c64f0f9e) but this did not help.

Can anyone please point me towards the possible solutions to this problem? Thanks in advance!

ip a output:

    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: enp16s0f0: <BROADCAST,MULTICAST,DYNAMIC,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
    link/ether e4:1f:13:18:9c:50 brd ff:ff:ff:ff:ff:ff
    inet 192.168.2.32/24 brd 192.168.2.255 scope global enp16s0f0
       valid_lft forever preferred_lft forever
    inet 169.254.15.226/16 brd 169.254.255.255 scope global enp16s0f0
       valid_lft forever preferred_lft forever
    inet6 fe80::e61f:13ff:fe18:9c50/64 scope link 
       valid_lft forever preferred_lft forever
3: enp16s0f1: <BROADCAST,MULTICAST,DYNAMIC,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
    link/ether e4:1f:13:18:9c:52 brd ff:ff:ff:ff:ff:ff
    inet 169.254.23.223/16 brd 169.254.255.255 scope global enp16s0f1
       valid_lft forever preferred_lft forever
    inet6 2001:67c:2198:44:e61f:13ff:fe18:9c52/64 scope global dynamic mngtmpaddr 
       valid_lft 2591997sec preferred_lft 604797sec
    inet6 fe80::e61f:13ff:fe18:9c52/64 scope link 
       valid_lft forever preferred_lft forever
4: enxe61f13199c53: <BROADCAST,MULTICAST,DYNAMIC,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UNKNOWN group default qlen 1000
    link/ether e6:1f:13:19:9c:53 brd ff:ff:ff:ff:ff:ff
    inet 169.254.130.234/16 brd 169.254.255.255 scope global enxe61f13199c53
       valid_lft forever preferred_lft forever
    inet6 fe80::e41f:13ff:fe19:9c53/64 scope link 
       valid_lft forever preferred_lft forever

And here are the contents of /etc/network/interfaces :

# 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

auto enp16s0f0
iface enp16s0f0 inet static
address 192.168.2.32
netmask 255.255.255.0


# The primary network interface
allow-hotplug enp16s0f1
auto enp16s0f1
iface enp16s0f1 inet static
address A-PERFECTLY-VALID-IP-ADDREESS
netmask 255.255.255.0
gateway A-WORKING-GATEWAY-ADDRESS
## dns-* options are implemented by the resolvconf package, if installed
#dns-nameservers WORKING-DNS-SERVER-ADDRESS1 WORKING-DNS-SERVER-ADDRESs2 8.8.8.8

Also:

root@lomc32:/home/igors# systemctl status networking.service
● networking.service - Raise network interfaces
     Loaded: loaded (/lib/systemd/system/networking.service; enabled; vendor preset: enabled)
     Active: active (exited) since Sat 2022-06-04 16:57:47 EEST; 5min ago
       Docs: man:interfaces(5)
    Process: 593 ExecStart=/sbin/ifup -a --read-environment (code=exited, status=0/SUCCESS)
   Main PID: 593 (code=exited, status=0/SUCCESS)
        CPU: 48ms

Jun 04 16:57:47 lomc32 systemd[1]: Starting Raise network interfaces...
Jun 04 16:57:47 lomc32 systemd[1]: Finished Raise network interfaces.


root@lomc32:/home/igors# systemctl status networkd.service
Unit networkd.service could not be found.

I also tried adding the systemd-networkd configuration as described in the link above, with the same information as in /etc/network/interfaces (/etc/systemd/networkd.conf has all lines commented out) but this did not help.

Also, I tried removing some DHCP-related software:

apt remove dhcpcd5 isc-dhcp-client isc-dhcp-common

Of which dhcpcd5 was not installed anyway but this did it help either.

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.