centos7 Failed to start LSB: Bring up/down networking

文章描述了在CentOS7系统中,如何在虚拟机中处理网卡名称变更(ens33到ens34),包括删除旧的ifcfg-ens33配置、添加新的网络连接、手动配置IPv4地址并重启网络服务的过程。
摘要由CSDN通过智能技术生成

centos7 Failed to start LSB: Bring up/down networking

前言

在虚拟机重新配置网卡后 网卡名称从ens33变为ens34
但是在/etc/sysconfig/network-scripts/下无ifcfg-ens34配置

操作

# 查看所有网络连接
$ nmcli conn
NAME                UUID                                  TYPE      DEVICE  
ens33               uuid  ethernet  ens33   
ens37               uuid  ethernet  ens37   
Wired connection 1  uuid  ethernet  ens34   

# 删除网络连接的配置文件
$ nmcli conn delete 'Wired connection 1'
Connection 'Wired connection 1' (uuid) successfully deleted.

# 添加网络连接的配置文件
$ nmcli conn add con-name ens38 ifname ens38 type ethernet
Connection 'ens38' (uuid) successfully added.

# 修改网络连接的配置文件
$ nmcli conn modify ens38 ipv4.method manual ipv4.address 192.168.10.2/24 autoconnect yes

$ systemctl restart network

$ ip addr

# 发现网卡配置文件已经出现了
$  vim /etc/sysconfig/network-scripts/ifcfg-ens38

同时删除老的ifcfg-ens33

systemctl restart network

参考文章
https://blog.csdn.net/weixin_44654329/article/details/106575526

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值