Switching Debian Bookworm install from DHCP to static IP
How to do this?
I'm running into numerous examples online that lead nowhere. Mainly editing /etc/network/interfaces has gotten nothing but error messages when I try to restart the network services. I'm trying to configure a static address to deal with a problem with NFS mount failures that I strongly suspect are due to my network having gotten configured for DHCP. Here's the problem: Code:
# ip addr list I'm using the following file -- patterned from an post found online (so it could be trash for all I know) -- in /etc/network/interfaces.d: Code:
auto enp3s0 Code:
# systemctl status networking.service Journalctl's output is: Code:
# journalctl -xeu networking.service "ip addr list" shows that the address was, indeed modified with no apparent errors. Sadly, I have both the static IP and the one assigned by DHCP assigned to "enp3s0" now. (I'm still receiving access denied error messages when I try to mount an NFS filesystem on the LAN.) I'm going to reboot (when did Linux become Windows, I wonder) so see what the network card has assigned to it but I'm not holding out much hope. (I'm prepared to be surprised, though.) Any hints most welcome. TIA... UPDATE: Yes. A reboot was needed. And it solved the NFS problem. Q: Could the reboot have somehow been avoided? Perhaps by stopping the network by hand and restarting it by hand? (I thought that's what "systemctl restart networking.service" would do for you. Silly me.) |
Networking is controlled by Network Manager now days. If you are running a desktop the easiest method would be to use the NM applet and configure enp3s0 with a static IP address. You can also do it from the command line using nmcli.
Is your NFS share mounted via fstab? If so are you using the _netdev option? Are you running nfs V3 or V4 on the server? |
All times are GMT -5. The time now is 05:25 PM. |