1、修改网络配置文件:
vim /etc/sysconfig/network-scripts/ifcfg-ens32
BOOTPROTO=static
IPADDR=192.168.100.21
GATEWAY=192.168.100.2
NETMASK=255.255.255.0
DNS1=192.168.1.1
DNS1=8.8.8.8
2、重启网络
service network restart
3、给网卡增加或删除ip
ip addr add/delete 192.168.100.21/24 dev ens32
原文地址:https://www.cnblogs.com/HappyEveryDay9013/p/12019086.html
时间: 2024-11-02 18:19:32