On Sat, Oct 12, 2024 at 19:00:08 -0600, William Torrez Corea wrote: > I want to assign a static ip but the dhcp then takes the order and changes > the configuration.
OK. Let's say you're using /etc/network/interfaces and you have the default configuration that the installer usually creates: # The primary network interface allow-hotplug eno1 iface eno1 inet dhcp If you've booted the machine with this configuration, there is a DHCP client daemon running, associated with this interface. If you simply change this file and then do the ifdown/ifup dance, that will not kill the DHCP client daemon. The daemon will continue running. After some number of hours, it'll nuke your static IP. I'm guessing that's what you did, and what you experienced. There are a couple ways to work around this. One way would be: a) Edit /etc/network/interfaces. b) Reboot. That's a simple one, but it's overkill. Another way would be: a) Edit /etc/network/interfaces. b) Find the running DHCP client daemon and kill it. c) Do the ifdown/ifup dance. That might the one that most people end up doing. A third way would be: a) Bring the interface down with ifdown. b) Edit /etc/network/interfaces. c) Bring the interface up with ifup. That's the "cleanest" way. When you bring the interface down while the config file still says "dhcp", ifdown will know that there's a running DHCP daemon it needs to kill, and it will kill it for you. If you edit the file first, ifdown has no idea that there's a running DHCP client daemon, so it doesn't kill it for you.