Fix CentOS 8 NetworkManager DHCP Failure by Setting Hostname to localhost
A CentOS 8 system may fail to acquire a DHCP address after reboot due to a NetworkManager bug that aborts DHCP activation; by changing the system hostname to localhost as a workaround, the DHCP process succeeds, providing a simple fix until an updated NetworkManager package is available.
After initializing and rebooting a CentOS 8 system, NetworkManager fails to obtain a DHCP address, repeatedly logging “dhcp-start-failed” errors.
Investigation of the system journal shows a series of state changes for device ens33 ending in DHCP activation failures, and a Google search identifies the issue as a known NetworkManager bug (see Red Hat Bugzilla 1744427).
Because CentOS 8 lacks an updated NetworkManager package that fixes the bug, the practical workaround is to set the system hostname to localhost, which bypasses the hostname‑related DHCP failure.
for i in static pretty transient; do hostnamectl set-hostname localhost --$i; doneAfter applying the hostname change and rebooting, the system successfully obtains a DHCP IP address.
Signed-in readers can open the original source through BestHub's protected redirect.
This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactand we will review it promptly.
Open Source Linux
Focused on sharing Linux/Unix content, covering fundamentals, system development, network programming, automation/operations, cloud computing, and related professional knowledge.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
