1.修改网卡配置
# vi /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE="eth0"
HWADDR="00:0C:12:34:56:78"
NM_CONTROLLED="no"
ONBOOT="yes"
BOOTPROTO=static
IPADDR=192.168.1.202
NETMASK=255.255.255.0
GATEWAY=192.168.1.1
###注意字段名要"大写"
2.修改DNS配置
# vi /etc/resolv.conf
# 填写相应的域名服务器DNS地址
nameserver 192.168.1.1
3.重启网络服务
# service network restart
# 重启完毕后ping网关,外网测试