debian-user:
I have built a VirtualBox virtual machine and installed Debian 11 with
SSH server and standard system utilities only. I plan to use the VM to
run the UniFi Network Controller to manage the UniFi equipment on my
SOHO LAN:
root@unifi:~# cat /etc/debian_version ; uname -a
11.10
Linux unifi 5.10.0-30-amd64 #1 SMP Debian 5.10.218-1 (2024-06-01) x86_64 GNU/Linux
The VM currently has a DHCP address. I would like to set a static IPv4 address. The Debian wiki tells me to edit /etc/network/interfaces and provides some example settings that I believe I can adapt to my use-case:
https://wiki.debian.org/NetworkConfiguration#Configuring_the_interface_manually
auto eth0
iface eth0 inet static
address 192.0.2.7/24
gateway 192.0.2.254
The Debian wiki also says:
"Make sure to disable all DHCP services, e.g. dhcpcd."
What is the correct method to "disable all DHCP services"?
David Christensen composed on 2024-07-04 19:06 (UTC-0700):
I have built a VirtualBox virtual machine and installed Debian 11 with
SSH server and standard system utilities only. I plan to use the VM to
run the UniFi Network Controller to manage the UniFi equipment on my
SOHO LAN:
<snip>
The VM currently has a DHCP address. I would like to set a static IPv4
address. The Debian wiki tells me to edit /etc/network/interfaces and
provides some example settings that I believe I can adapt to my use-case:
<snip>
The Debian wiki also says:
"Make sure to disable all DHCP services, e.g. dhcpcd."
What is the correct method to "disable all DHCP services"?
I think there are more than one. One thing is to check what is enabled, then disable or uninstall whatever owns the unit(s):
systemctl list-unit-files | egrep 'net|dhcp'
Do the same with whatever "manages" /etc/resolv.conf,
and create a regular file of your own design.
I don't use VMs, but I did several hours ago instruct several hours ago using systemd-network to setup static IP service for a *buntu user who couldn't get netplan sorted: <https://www.linuxquestions.org/questions/ubuntu-63/netplan-apply-no-longer-setting-static-ip-address-4175738702/#post6512274>
I've been using systemd-network static IPs on everything for several years, including Bullseye.
Felix Miata wrote:
David Christensen composed on 2024-07-04 19:06 (UTC-0700):
I have built a VirtualBox virtual machine and installed Debian 11 with
SSH server and standard system utilities only. I plan to use the VM to
run the UniFi Network Controller to manage the UniFi equipment on my
SOHO LAN:
<snip>
The VM currently has a DHCP address. I would like to set a static IPv4
address. The Debian wiki tells me to edit /etc/network/interfaces and
provides some example settings that I believe I can adapt to my use-case: >>> <snip>
The Debian wiki also says:
"Make sure to disable all DHCP services, e.g. dhcpcd."
What is the correct method to "disable all DHCP services"?
I think there are more than one. One thing is to check what is enabled, then >> disable or uninstall whatever owns the unit(s):
systemctl list-unit-files | egrep 'net|dhcp'
2024-07-04 20:26:35 root@unifi ~
# systemctl list-unit-files | egrep 'net|dhcp'
networking.service enabled enabled systemd-network-generator.service disabled disabled systemd-networkd-wait-online.service disabled disabled systemd-networkd.service disabled enabled systemd-networkd.socket disabled enabled network-online.target static -
network-pre.target static -
network.target static -
Do the same with whatever "manages" /etc/resolv.conf,
How do I determine what manages /etc/resolv.conf?
and create a regular file of your own design.
I don't use VMs, but I did several hours ago instruct several hours ago using
systemd-network to setup static IP service for a *buntu user who couldn't get
netplan sorted:
<https://www.linuxquestions.org/questions/ubuntu-63/netplan-apply-no-longer-setting-static-ip-address-4175738702/#post6512274>
I've been using systemd-network static IPs on everything for several years, >> including Bullseye.
2024-07-04 20:15:43 root@laalaa ~
# man systemd-network
No manual entry for systemd-network
How do you use systemd-network to configure an interface with a static
IP address?
On 7/4/24 21:08, Felix Miata wrote:
<snip>
On 7/4/24 21:10, jeremy ardley wrote:
<snip>
On 7/5/24 11:44, Franco Martelli wrote:
<snip>
Thank you all for the replies.
I can find no statement in The Debian Administrator's Handbook regarding disabling DHCP when using a static IP:
https://www.debian.org/doc/manuals/debian-handbook/sect.network-config.en.html#sect.interface-ethernet
Similarly, when STFW "Debian 11 static IP" and reading articles.
Browsing the Debian Wiki page "NetworkConfiguration" -> "Info" link:
https://wiki.debian.org/NetworkConfiguration?action=info
The following sentence:
"Make sure to disable all DHCP services, e.g. dhcpcd."
Was added at revision 97:
97 2017-12-27 10:50:07 25741 to previous ?mrsgreen note for static
ip's: disable dhcp services view
Who is "mrsgreen"?
David
On 7/5/24 19:06, Max Nikulin wrote:
On 7/5/24 21:14, George at Clug wrote:
Thank you for your replies.
The underlying issue appears to be that my old-school Linux consoleand
network administration skills have been rendered obsolete by systemd
NetworkManager. I typically install Xfce when installing Debian,and
the panel NetworkManager Applet has made it too easy to "monkey see,
monkey do" without understanding the details.
What I really need is a good book
or document that explains the design
and implementation of networking with systemd and Network Manager on
modern Debian GNU/Linux systems. Recommendations?
David
As I said in my earlier post, it's not necessary to disable dhcpd and in
fact it is likely undesirable.
Though as a pointed out before, your machine very likely will have NetworkManager running and it's probably a good idea to disable it.
The underlying issue appears to be that my old-school Linux console
network administration skills have been rendered obsolete by systemd and NetworkManager.
On 06/07/2024 08:16, David Christensen wrote:
The following sentence:
"Make sure to disable all DHCP services, e.g. dhcpcd."
Was added at revision 97:
From my point of view this warning makes sense. Primary it is a troubleshooting step if an attempt to configure static has IP failed.
The assumption is that a reader is either aware what network management
tools are installed on their machine or is able to review installed
packages, active services, running processes. DHCP client activity may
appear in logs.
What I really need is a good book or document that explains the design and implementation of networking with systemd and Network Manager on modern Debian GNU/Linux systems. Recommendations?
From the output of that, you can deduce which naming scheme is beingused. You should be able to figure out which interfaces are ethernet
What I really need is a good book
or document that explains the design
and implementation of networking with systemd and Network Manager on
modern Debian GNU/Linux systems. Recommendations?
Sadly I have not found any documentation (or books) for any thing
Linux. It seems to be a 'piecing together of random statements' from
comments and howtos on the Internet, and much personal
experimentation.
The only thing that's always annoying is that too many programs
believe they have to overwrite /etc/resolv.conf...
Sysop: | Keyop |
---|---|
Location: | Huddersfield, West Yorkshire, UK |
Users: | 546 |
Nodes: | 16 (0 / 16) |
Uptime: | 167:09:01 |
Calls: | 10,385 |
Calls today: | 2 |
Files: | 14,057 |
Messages: | 6,416,529 |