On 7/4/24 19:30, 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?


David

Reply via email to