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

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章