Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 4878

Troubleshooting • Re: Cannot assign hostname to static IP without creating a dynamic IP

$
0
0
A dynamic IP address comes from a DHCP client program. That program queries a server over the network, and if it receives an answer, configures the local machine. After setting up the network interface, the program stays idle and wakes up when the DHCP lease is half due in order to refresh the configuration.

Apparently your “nmcli connection modify” command does not tell NM to stop running the DHCP client, so after reboot the dynamic address appears to “come back” (in fact the server was queried by the DHCP client process, and given back the same address)

The “ip address del” command does what it says, it deletes an address, nothing less, nothing more.

I don’t know how to use NM but what you want is to tell it to stop using DHCP, and configure a static address instead.
Maybe like this? https://serverfault.com/a/1006635

Statistics: Posted by epoch1970 — Sat Feb 03, 2024 11:41 pm



Viewing all articles
Browse latest Browse all 4878

Trending Articles