方式一、图形界面配置
二、命令行方式:
终端输入命令:vi /etc/sysconfig/network-scripts/ifcfg-eth0
编辑:
DEVICE="eth0"
BOOTPROTO=none
IPV6INIT="no"
NM_CONTROLLED="yes"
ONBOOT="yes"
TYPE="Ethernet"
UUID="d9398296-a5c6-47a8-a701-2190dbb656d9"
IPADDR=192.168.1.202
PREFIX=24
GATEWAY=192.168.1.1
DEFROUTE=yes
IPV4_FAILURE_FATAL=yes
IPV6_AUTOCONF=yes
IPV6_DEFROUTE=yes
IPV6_FAILURE_FATAL=no
NAME="System eth0"
HWADDR=00:0C:29:B8:67:FD
IPV6_PEERDNS=yes
IPV6_PEERROUTES=yes
LAST_CONNECT=1539794815
DNS1=8.8.8.8
最后两种方式都需机器重启