• vi /etc/sysconfig/network-scripts/ifcfg-eth0

DEVICE=eth0
TYPE=Ethernet
UUID=a20869f2-4095-4e5d-9b0c-9a5aa7b8b750
ONBOOT=yes   开机启动
NM_CONTROLLED=yes
BOOTPROTO=none   ip方式:dhcp static none
HWADDR=00:0C:29:9E:B4:51 mac地址  可删除
IPADDR=192.168.158.151   ip地址  局域网不可重复
PREFIX=24                子网掩码  netmask  255.255.255.0  点分十进制
GATEWAY=192.168.158.2     网关
DNS1=192.168.158.2        dns
DOMAIN=114.114.114.114    dns
DEFROUTE=yes
IPV4_FAILURE_FATAL=yes
IPV6INIT=no
NAME="System eth0"

 

 

posted on 2018-09-03 15:10  LXYuuuuuu  阅读(4417)  评论(0编辑  收藏  举报