David Christensen composed on 2024-07-04 20:29 (UTC-0700): > 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 - Usually the only unit among the above I need enabled is systemd-networkd.socket. >> Do the same with whatever "manages" /etc/resolv.conf, > How do I determine what manages /etc/resolv.conf? I expect whatever /etc/resolv.conf symlinks to could be the clue you need, if you can't grep some "solv" from list-unit-files output, and if it's not just a symlink to something in the /run/ tree. /etc/resolv.d/ might be another place to look. I've been using systemd-network so long I don't remember the hodgepodge of old ways to "manage" this file that normally needs no management with static IP usage. NetworkMangler is probably one candidate not installed here. Could be part of what networking.service does too. It's also not available here. Packages named knot-resolver, resolvconf and systemd-resolved exist, perhaps others. >> 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 systemd-network is the package name in newer versions of systemd. That URL shows the relevant systemd unit names are systemd-networkd.*. man systemd-networkd works here in the newer releases I have booted. > How do you use systemd-network to configure an interface with a static > IP address? That URL shows how I did it, a file in /etc/systemd/network/ with the vitals, similar to more traditional NIC setup files. -- Evolution as taught in public schools is, like religion, based on faith, not based on science. Team OS/2 ** Reg. Linux User #211409 ** a11y rocks! Felix Miata