---
title: "centos7 ip lose"
author: "maxer025"
date: "2026-08-03T10:00:02Z"
tags: []
categories: ["操作系统"]
slug: "centos7-ip-lose"
draft: false
lastmod: "2026-08-03T10:00:02Z"
id: 2540574
url: "https://maxer025.iteye.com/blog/2540574"
---

When a CentOS system loses its IP address after a reboot, it is usually because the network interface was not configured to start automatically 
or the NetworkManager service is down

1. Enable "Start on Boot" (Most Common)By default, CentOS network interfaces are often set to not start automatically after a reboot
sudo vi /etc/sysconfig/network-scripts/ifcfg-ens192
2.Look for the line ONBOOT=no and change it to ONBOOT=yes
3,Restart the network service to apply changes:
     CentOS 7: sudo systemctl restart network
    CentOS 8 / Stream: sudo systemctl restart NetworkManager