centos6.5 静态IP网络配置

1.配置ip等信息
/etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE=eth0
BOOTPROTO=none
BROADCAST=192.168.1.255
HWADDR=00:0C:29:61:63:59
IPADDR=192.168.1.12
#IPV6INIT=yes
#IPV6_AUTOCONF=yes
NETMASK=255.255.255.0
#NETWORK=192.168.1.253   
GATEWAY=192.168.1.1
ONBOOT=yes

2.配置dns
/etc/resolv.conf
nameserver 192.168.1.1

3.重启服务
service network restart

你可能感兴趣的:(linux)