标签:failure init ipv4 dns 配置 add rip 重启 tar ifcfg
vim /etc/sysconfig/network-scripts/ifcfg-eth0
修改如下内容
BOOTPROTO="static" #dhcp改为static
ONBOOT="yes" #开机启用本配置
IPADDR=192.168.12.132 #静态IP
GATEWAY=192.168.12.123 #默认网关
NETMASK=255.255.255.0 #子网掩码
DNS1=192.168.12.123 #DNS 配置
修改后效果
HWADDR="00:15:5D:07:F1:02"
TYPE="Ethernet"
BOOTPROTO="static" #dhcp改为static?
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="eth0"
UUID="bb3a302d-dc46-461a-881e-d46cafd0eb71"
ONBOOT="yes" #开机启用本配置
IPADDR=192.168.12.132 #静态IP
GATEWAY=192.168.12.123 #默认网关
NETMASK=255.255.255.0 #子网掩码
DNS1=192.168.12.123 #DNS 配置
# service network restart
ip addr
标签:failure init ipv4 dns 配置 add rip 重启 tar ifcfg
原文地址:https://www.cnblogs.com/imxiaoqi/p/10583181.html