centos配置静态ip地址

1、centos配置静态IP地址

[root@manage-host ~]# vim /etc/sysconfig/network-scripts/ifcfg-ens33

TYPE=Ethernet
BOOTPROTO=static
NAME=enp2s0
DEVICE=enp2s0
ONBOOT=yes
IPADDR=192.168.0.117
NETMASK=255.255.255.0
GATEWAY=192.168.0.1
DNS1=192.168.0.194
DNS2=192.168.0.1
DNS2=202.96.134.133

2、重启网卡

centos6系统

[root@manage-host ~]# service network restart

centos7系统

[root@manage-host ~]# systemctl restart network

centos8系统

[root@localhost ~]# nmcli c reload ens33

发布了161 篇原创文章 · 获赞 69 · 访问量 25万+

猜你喜欢

转载自blog.csdn.net/baidu_38432732/article/details/105315733
今日推荐