CentOS6配置静态IP

1. 编辑网卡配置 vi /etc/sysconfig/network-scripts/ifcfg-eth0

DEVICE=eth0
HWADDR=不需要改
TYPE=Ethernet
UUID=不需要改
ONBOOT=yes
NM_CONTROLLED=yes
BOOTPROTO=static
IPADDR=192.168.1.110
NETMASK=255.255.255.0
NETWORK=192.168.1.0
BROADCAST=192.168.1.255

2. 修改网关 vi /etc/sysconfig/network

NETWORKING=yes
NETWORKING_IPV6=no
HOSTNAME=不需要改
GATEWAY=192.168.1.1

3. 修改DNS vi /etc/resolv.conf

nameserver 114.114.114.114
nameserver 8.8.8.8

 

posted @ 2016-09-29 14:41  smismile  阅读(2586)  评论(0编辑  收藏  举报