centos配置网络

3/8/2017来源:ASP.NET技巧人气:2543

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

修改内容

DEVICE="eth0"
BOOTPROTO="static"
HWADDR="00:50:56:98:06:D0"
IPV6INIT="no"
MTU="1500"
NM_CONTROLLED="no"
ONBOOT="yes"
TYPE="Ethernet"
UUID="3149affb-acb6-45ad-b5d6-68c1c4d7f515"
IPADDR=172.17.210.124
NETMASK=255.255.255.0
GATEWAY=172.17.210.254
重启网卡
service network restart