Centos6.5安装完毕之后进行网络配置
修改步骤:
-
编辑ifcfg-eth0命令: vi /etc/sysconfig/network-scripts/ifcfg-eth0
注:下边为ifcfg-eth0的一个模板文件,注意
DEVICE=eth0
HWADDR=00:0C:29:8E:B2:4D
TYPE=Ethernet
UUID=0675948a-b96c-497d-8945-2e53b875e44f
ONBOOT=yes
NM_CONTROLLED=yes
BOOTPROTO=staticIPADDR=192.168.8.100
NETMASK=255.255.255.0
GATEWAY=192.168.8.1
DNS1=8.8.8.8
DNS2=4.4.4.4 - 重启网络服务:service network restart
3.测试网络是否已经通了:ping www.baidu.com
显示结果如下表示已经配置OK了
[root@master ~]# ping www.baidu.com
PING www.a.shifen.com (119.75.217.109) 56(84) bytes of data.
64 bytes from 119.75.217.109: icmp_seq=1 ttl=128 time=4.50 ms
64 bytes from 119.75.217.109: icmp_seq=2 ttl=128 time=11.9 ms
64 bytes from 119.75.217.109: icmp_seq=3 ttl=128 time=6.81 ms
64 bytes from 119.75.217.109: icmp_seq=4 ttl=128 time=11.7 ms
CentOS—网络配置详解 参考方链接
http://blog.chinaunix.net/uid-26495963-id-3230810.html