Home  >  Article  >  Operation and Maintenance  >  What should I do if centos cannot automatically obtain the IP address?

What should I do if centos cannot automatically obtain the IP address?

王林
王林Original
2020-05-17 11:33:393426browse

What should I do if centos cannot automatically obtain the IP address?

解决办法如下:

1、如果是图形界面,需要关闭NetworkManager服务

service NetworkManager stop
service network restart

因为该服务与network服务冲突。

2、编辑/etc/sysconfig/network-scripts/ifcfg-ethX文件

X代表网卡的序号

vim /etc/sysconfig/network-scripts/ifcfg-ethX

3、把ONBOOT=no改为ONBOOT=yes

这样就可以自动获取ip地址了。

推荐教程:centos教程

The above is the detailed content of What should I do if centos cannot automatically obtain the IP address?. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn