[Solved] new install on bullseye/bookworm/trixie delivers DHCP network config if DHCP availible

Linux Kernel, Network, and Services configuration.
Post Reply
Message
Author
arussell
Posts: 3
Joined: 2025-02-17 05:03

[Solved] new install on bullseye/bookworm/trixie delivers DHCP network config if DHCP availible

#1 Post by arussell »

I have found the advanced install feature, that allows me to configure the network in "/etc/network/interfaces"
but once I reboot, it is still doing DHCP config, and I can't find NetworkManager to disable it.

I did one install with the network cable disconnected, and was able to have the proper configuration in "/etc/network/interfaces"

Thank you for your time,
Last edited by arussell on 2025-02-17 21:59, edited 1 time in total.

Aki
Global Moderator
Global Moderator
Posts: 4347
Joined: 2014-07-20 18:12
Location: Europe
Has thanked: 127 times
Been thanked: 585 times

Re: new install on bullseye/bookworm/trixie

#2 Post by Aki »

Hello,
arussell wrote: 2025-02-17 05:16 I have found the advanced install feature, that allows me to configure the network in "/etc/network/interfaces"
but once I reboot, it is still doing DHCP config, and I can't find NetworkManager to disable it.

I did one install with the network cable disconnected, and was able to have the proper configuration in "/etc/network/interfaces"

Thank you for your time,
You can manually edit the /etc/network/interfaces using the "root" account.

What are the content of /etc/network/interfaces ?
⢀⣴⠾⠻⢶⣦⠀
⣾⠁⢠⠒⠀⣿⡁ Debian - The universal operating system
⢿⡄⠘⠷⠚⠋⠀ https://www.debian.org
⠈⠳⣄⠀

arussell
Posts: 3
Joined: 2025-02-17 05:03

Re: new install on bullseye/bookworm/trixie delivers DHCP network config if DHCP availible

#3 Post by arussell »

I have edited the /etc/network/interfaces, and it is pointing to DMZ address availible to NIC

The interfaces file is as follows:

Code: Select all

arussell@thud109:~$ cat /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 enp0s3
iface enp0s3 inet static
        address 108.252.38.59/29
        gateway 108.252.38.62
        # dns-* options are implemented by the resolvconf package, if installed
        dns-nameservers 8.8.8.8
        dns-search hos.net
ifconfig -a shows the following:

Code: Select all

enp0s3: flags=-28605<UP,BROADCAST,RUNNING,MULTICAST,DYNAMIC>  mtu 1500
        inet 192.168.16.108  netmask 255.255.255.0  broadcast 192.168.16.255
        inet6 2600:1700:ad14:3500::1d  prefixlen 64  scopeid 0x0<global>
        inet6 2600:1700:ad14:3500:a00:27ff:fea4:2a16  prefixlen 64  scopeid 0x0<global>
        inet6 fe80::a00:27ff:fea4:2a16  prefixlen 64  scopeid 0x20<link>
        ether 08:00:27:a4:2a:16  txqueuelen 1000  (Ethernet)
        RX packets 1682  bytes 126139 (123.1 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 377  bytes 42356 (41.3 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        inet6 ::1  prefixlen 128  scopeid 0x10<host>
        loop  txqueuelen 1000  (Local Loopback)
        RX packets 24  bytes 2546 (2.4 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 24  bytes 2546 (2.4 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
Last edited by arussell on 2025-02-17 18:09, edited 1 time in total.

Aki
Global Moderator
Global Moderator
Posts: 4347
Joined: 2014-07-20 18:12
Location: Europe
Has thanked: 127 times
Been thanked: 585 times

Re: new install on bullseye/bookworm/trixie delivers DHCP network config if DHCP availible

#4 Post by Aki »

Hello,

So, what's wrong with this configuration ?

If you don't want to use /etc/network/interface to configure the enp0s3 network interface, you can simply comment out the following lines:

Code: Select all

# 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 enp0s3
# iface enp0s3 inet static
#        address 108.252.38.59/29
#        gateway 108.252.38.62
          # dns-* options are implemented by the resolvconf package, if installed
#        dns-nameservers 8.8.8.8
#        dns-search hos.net
If the NetworkManager is installed, it will kick in.

Hope this helps.

--
note: Please, use code tags to include commands and/or their logs in the body of a message. Fixed it for you this time.
⢀⣴⠾⠻⢶⣦⠀
⣾⠁⢠⠒⠀⣿⡁ Debian - The universal operating system
⢿⡄⠘⠷⠚⠋⠀ https://www.debian.org
⠈⠳⣄⠀

arussell
Posts: 3
Joined: 2025-02-17 05:03

Re: new install on bullseye/bookworm/trixie delivers DHCP network config if DHCP availible

#5 Post by arussell »

Hi,

I would like to "Not" use DHCP.

I have done several installs using virtualbox, and in the instance that I had the network cable "disconected"
was I able to have the network configured with the settings in /etc/network/interface.

I do want to use "/etc/network/interface"

I don't know how to turn off the network choosing DHCP over the "/etc/network/interface"

I've used netplan, I've used ifup/ifdown from long ago, I'm learning networkctl on ubuntu.

I have one instance in production that I have both DHCP and "/etc/network/interface" giving me 2 ip's on the enp0s0 without one being an alias, I'd like to understand that one.

I want to embrace debian for LXDE the desktop I really enjoy using.

arussell
Posts: 3
Joined: 2025-02-17 05:03

Re: new install on bullseye/bookworm/trixie delivers DHCP network config if DHCP availible

#6 Post by arussell »

Hi,

I've removed isc-dhcp* and connman

Code: Select all

apt --purge --autoremove remove isc-dhcp* connman
When I rebooted I am only using the config in "/etc/network/interface"

Thank you for your help

Also, thank you for pointing out how to use the the Code Tags, that would have been another question. ;->

Another Also, How do I set this as solved?

Thank you again
Last edited by arussell on 2025-02-17 21:25, edited 1 time in total.

CwF
Global Moderator
Global Moderator
Posts: 3268
Joined: 2018-06-20 15:16
Location: Colorado
Has thanked: 69 times
Been thanked: 290 times

Re: new install on bullseye/bookworm/trixie delivers DHCP network config if DHCP availible

#7 Post by CwF »

arussell wrote: 2025-02-17 21:23 How do I set this as solved?
Go to the first post and click the edit icon in the upper right, then edit the original title with [Solved] and submit.
Mottainai

Post Reply