Created
October 11, 2017 07:48
-
-
Save harrifeng/8b6d66e7739a7ef634f7a7b3cdcfef81 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
vim /etc/sysconfig/network-scripts/ifcfg-eno* | |
HWADDR=00:0C:29:8D:24:73 | |
TYPE=Ethernet | |
BOOTPROTO=static #启用静态IP地址 | |
DEFROUTE=yes | |
PEERDNS=yes | |
PEERROUTES=yes | |
IPV4_FAILURE_FATAL=no | |
IPV6INIT=yes | |
IPV6_AUTOCONF=yes | |
IPV6_DEFROUTE=yes | |
IPV6_PEERDNS=yes | |
IPV6_PEERROUTES=yes | |
IPV6_FAILURE_FATAL=no | |
NAME=eno16777736 | |
UUID=ae0965e7-22b9-45aa-8ec9-3f0a20a85d11 | |
ONBOOT=yes #开启自动启用网络连接 | |
IPADDR0=192.168.21.128 #设置IP地址 | |
PREFIXO0=24 #设置子网掩码 | |
GATEWAY0=192.168.21.2 #设置网关 | |
DNS1=8.8.8.8 #设置主DNS | |
DNS2=8.8.4.4 #设置备DNS | |
:wq! #保存退出 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment